Add a Model Context Protocol (MCP) server to your agent as a tool (GitHub Copilot) (preview)

[This article is prerelease documentation and is subject to change.]

Model Context Protocol (MCP) is a standard for exposing tools to an agent. When you add an MCP server to your agent, the agent can use every tool that the server exposes during a conversation.

Use this how-to when you want to add an MCP server to an agent powered by the GitHub Copilot harness. For an overview of tool types, see Available tools for agents (GitHub Copilot).

The MCP tab in the Add a tool dialog lists MCP servers that are already published for your organization, such as Microsoft 365 services, Foundry IQ, and Fabric IQ.

  1. Sign in to Copilot Studio and open your agent.

  2. In the agent navigation bar, select the Build tab.

  3. In the components panel on the right, select Tools, then Add tool.

  4. In the Add a tool dialog, select the MCP tab, and then select a server.

  5. On the server's detail page, review its description and, if available, the Docs link for information on what the server does. Select Add.

  6. What happens next depends on the server:

    • Some servers (for example, first-party Microsoft 365 servers such as Mail) connect automatically using your signed-in identity, and the server is added directly.
    • Other servers prompt you to create a connection, with fields specific to that server (for example, a display name and authentication type, or an endpoint URL and API key). Provide the requested values and select Create.

    These values are specific to each server. Use the server's Docs link, if available, for setup details.

Because each server can require different connection values and change independently of Copilot Studio, this article doesn't enumerate the fields for every server. Rely on the in-product description and Docs link for the server you're adding.

Add a custom MCP server by URL

Use this path to connect an MCP server that isn't already published in the gallery.

Prerequisites

Add an MCP server from the Build tab

  1. Sign in to Copilot Studio and open your agent.

  2. In the agent navigation bar, select the Build tab.

  3. In the components panel on the right, select Tools.

  4. In the Add a tool dialog, select Add next to the search bar, and then select Model Context Protocol (MCP).

  5. On the Add MCP server page, enter the following details:

    • Name: a short, descriptive name that helps the agent decide when to use this server's tools. This name is what the agent sees.
    • Description: a one- or two-sentence summary of what the server does and when the agent should use it.
    • Server URL: the HTTPS endpoint of the MCP server.
    • Authentication: choose the authentication method the server requires, and enter the credentials or configuration values that method needs.
  6. Select Add to connect.

    Copilot Studio contacts the MCP server, negotiates the protocol handshake, and then lists the tools the server exposes.

  7. Review the list of tools that appear.

    For each tool, verify the name and description. If a tool doesn't have a clear description, agent responses that involve the tool are less reliable. Ask the MCP server author to improve the description before you rely on the tool in production.

  8. Select Save to finish adding the server.

The server appears in the agent's Tools list on the Build tab.

Test the server

After you add the server, test it before you publish the agent.

  1. Select the Preview tab.

  2. Ask the agent a question that requires one of the server's tools.

  3. Review the agent's response. Open the activity trace to verify which tool was invoked, what arguments were passed, and what the tool returned. See Use the activity trace to debug your agent.

If the agent doesn't invoke the tool when you expect it to, refine the server name, the server description, or the agent's instructions. The individual tool names and descriptions come from the MCP server itself. If those need to change, ask the MCP server author to update them. Learn more in Configure agent details and instructions.

Manage the server after adding it

To remove an MCP server or turn one off temporarily, use the standard tool management flow. Learn more in Manage and delete tools in an agent (GitHub Copilot).

If a server's URL, authentication, or exposed tools change after you add it, edit the server entry in the same Tools dialog to refresh the connection and re-read the tool list.

Limits

  • Each agent can connect to multiple MCP servers, but the total number of MCP server instances that run concurrently in a single conversation is capped. If you attach more MCP servers than the cap allows and the agent tries to use them all in the same turn, the extra servers are skipped and their tools aren't available for that turn.
  • Keep the number of MCP servers attached to any single agent small, and remove servers you no longer use, so that the agent has room to invoke the servers you care about.
  • Each MCP server counts against the total number of tools an agent can host.