Connect Microsoft Copilot

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

Tutorial

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 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.

  1. Open "Tools" in Copilot Studio, click "New tool" and select "Model Context Protocol".

    The Tools page of Copilot Studio with the New tool button and the Model Context Protocol option of the New tool dialog highlighted

  2. 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.
    https://<server>/<webapp>/rest/wikis/xwiki/aiLLM/mcp

    The Model Context Protocol dialog with the Server name, Server description and Server URL fields filled in and highlighted

  3. Select "OAuth 2.0" under "Authentication" and "Dynamic discovery" under "Type", then click "Create".

    The Authentication part of the Model Context Protocol dialog with OAuth 2.0 and Dynamic discovery selected, and the Create button, highlighted

  4. Open your agent, go to its "Tools" tab and click "Add a tool".

    The Tools tab of a Copilot Studio agent with the Add a tool button highlighted

  5. Click the "Model Context Protocol" filter, search for the server name you set in step 2 and select the server.

    The Add tool dialog filtered on Model Context Protocol, with the filter and the XWiki MCP server highlighted

  6. Open the "Connection" list, click "Create new connection", then click "Create" in the dialog that opens.

    The Add tool dialog with the Connection list open and Create new connection highlighted

  7. Sign in to the wiki if asked, and click "Accept" on the consent screen.

    The wiki's OpenID Connect consent screen listing what Copilot Studio requests access to, with the Accept button highlighted

  8. Click "Add and configure", then check that the "Tools" section of the page that opens lists the wiki's MCP tools.

    The configuration page of the MCP tool in Copilot Studio, showing a working connection and, highlighted, the list of the wiki's MCP tools

  9. 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.

    The Test your agent panel, where the agent answers with a summary of the requested wiki page, highlighted

FAQ

What if the sign-in fails or the consent screen never opens?

The "Dynamic discovery" type needs the wiki to register Copilot Studio as a client on the fly, which the XWiki OIDC Provider does once its clients are in "Dynamic mode". Ask your administrator to follow Set Up MCP Authentication.

Can I connect a wiki that only runs on my computer?

No. Copilot Studio calls the endpoint from Microsoft's cloud, so the wiki must be reachable from the internet.

Why can't the agent create or edit pages?

Your administrator chooses which tools the endpoint exposes, and the authoring tools are off by default. See MCP Tools for the full list.

Related

Get Connected