Wiki source code of Connect Microsoft Copilot

Last modified by gabrielc on 2026/11/02 17:31

Show last authors
1 Connect a Microsoft Copilot Studio agent to a wiki's MCP endpoint, from creating the MCP tool to an agent that answers from the wiki's content. You need an existing agent in Copilot Studio. Read [[Agent Authentication>>doc:documentation.extensions.user.llm.mcp-server.agent-authentication.WebHome]] for what the connected agent is then allowed to do. The sign-in in step 7 needs the XWiki OIDC Provider; the FAQ covers what to do when it fails.
2
3 1. Open "Tools" in Copilot Studio, click "New tool" and select "Model Context Protocol".(((
4 {{image reference="new-tool-mcp.png" size="extra" alt="The Tools page of Copilot Studio with the New tool button and the Model Context Protocol option of the New tool dialog highlighted"/}}
5 )))
6 1. Fill in "Server name" and "Server description", and set "Server URL" to your wiki's endpoint URL. Your administrator can copy that URL from the MCP administration page.(((
7 {{code language="none"}}https://<server>/<webapp>/rest/wikis/xwiki/aiLLM/mcp{{/code}}
8
9 {{image reference="mcp-server-details.png" size="large" alt="The Model Context Protocol dialog with the Server name, Server description and Server URL fields filled in and highlighted"/}}
10 )))
11 1. Select "OAuth 2.0" under "Authentication" and "Dynamic discovery" under "Type", then click "Create".(((
12 {{image reference="mcp-authentication.png" size="large" alt="The Authentication part of the Model Context Protocol dialog with OAuth 2.0 and Dynamic discovery selected, and the Create button, highlighted"/}}
13 )))
14 1. Open your agent, go to its "Tools" tab and click "Add a tool".(((
15 {{image reference="agent-add-tool.png" size="extra" alt="The Tools tab of a Copilot Studio agent with the Add a tool button highlighted"/}}
16 )))
17 1. Click the "Model Context Protocol" filter, search for the server name you set in step 2 and select the server.(((
18 {{image reference="select-mcp-server.png" size="large" alt="The Add tool dialog filtered on Model Context Protocol, with the filter and the XWiki MCP server highlighted"/}}
19 )))
20 1. Open the "Connection" list, click "Create new connection", then click "Create" in the dialog that opens.(((
21 {{image reference="create-connection.png" size="large" alt="The Add tool dialog with the Connection list open and Create new connection highlighted"/}}
22 )))
23 1. Sign in to the wiki if asked, and click "Accept" on the consent screen.(((
24 {{image reference="copilot-consent.png" size="large" alt="The wiki's OpenID Connect consent screen listing what Copilot Studio requests access to, with the Accept button highlighted"/}}
25 )))
26 1. Click "Add and configure", then check that the "Tools" section of the page that opens lists the wiki's MCP tools.(((
27 {{image reference="xwiki-tools.png" size="extra" alt="The configuration page of the MCP tool in Copilot Studio, showing a working connection and, highlighted, the list of the wiki's MCP tools"/}}
28 )))
29 1. Ask the agent about a wiki page in the "Test your agent" panel, for example "Use the <server name> MCP server, and summarize the content on this page: Sandbox.WebHome", and check that it answers from the page's content.(((
30 {{image reference="test-answer.png" size="large" alt="The Test your agent panel, where the agent answers with a summary of the requested wiki page, highlighted"/}}
31 )))

Get Connected