Blog Post

Microsoft 365 Copilot Blog
4 MIN READ

Connecting an Agent in Copilot Studio to an MCP Server

Ning_Wei's avatar
Ning_Wei
Icon for Microsoft rankMicrosoft
Aug 26, 2025

The Model Context Protocol (MCP) is a standardized framework designed to enable seamless communication between agents and external data or tool sources. By leveraging MCP, agents can dynamically invoke tools, exchange structured data, and access enriched contextual information from connected servers. This approach moves agents beyond static capabilities, empowering them with adaptability and real-time responsiveness based on live data and evolving workflows. 

Key benefits of integrating MCP with an agent include: 

  • Expanded functionality through external tool access 
  • Improved decision-making via richer context 
  • Streamlined interoperability with a wide range of systems.  

Ultimately, MCP enables agents to deliver more accurate, context-aware responses and extend their value across complex business scenarios. 

The following sections guide you through connecting a Copilot Studio agent to your MCP server step by step.  

  • Create a custom connector for your MCP server. 
  • Configure and integrate this connector with your Copilot Studio agent, enabling dynamic tool invocation and seamless communication with external data or tool sources. 

By the end of this walkthrough, you’ll have the practical knowledge needed to expand your agent’s capabilities - making it more adaptive, intelligent, and responsive to real-time information and evolving workflows. 

MCP server 

In this walkthrough, we will use the Microsoft Learn MCP Server, a remote MCP Server that enables agents to bring trusted and up-to-date information directly from Microsoft's official documentation. 

Create a custom MCP connector 

Copilot Studio lets you extend the capabilities of agents using various mechanisms, including custom connectors created on the Power Platform. In Power Apps, select “Custom connectors” in the navigation panel, and create a new custom connector using the “Import an OpenAPI file” option. 

 

Use the following OpenAPI schema for Microsoft Learn MCP Server.

swagger: '2.0'

info:

  title: Microsoft Learn Docs

  description: Microsoft's official product documentation

  version: 1.0.0

host: learn.microsoft.com

basePath: /api

schemes:

  - https

paths:

  /mcp:

    post:

      summary: Server for Microsoft's official product documentation

      x-ms-agentic-protocol: mcp-streamable-1.0

      operationId: InvokeMCP

      responses:

        '200':

          description: Success

 

Configure the general information, security, definition, and code sections based on the requirement of the MCP server. In this walkthrough, we will use the default settings.

Create the connector and add a new connection.

Test the newly created connector by opening it, going to the Test section, entering the following JSON-RPC request message for InvokeMCP option, and clicking “Test operation”.

{

  "jsonrpc": "2.0",

  "id": 1,

  "method": "tools/list"

}

The test produces a success response, as below. The response returns the list of tools, ie. functions exposed by the Microsoft Learn MCP Server. This shows the MCP server connection is successful.

 

Create a custom agent

Open Copilot Studio, create a new agent. Instruct the agent to search the official Microsoft documentation for questions on Microsoft products. This can be entered in the prompt during agent creation or added into agent instructions after agent creation.

For example, add the following in agent’s instruction: “If the question is specifically about a Microsoft product (e.g., Azure, Copilot, Teams, SharePoint, etc.), search and reference the official Microsoft documentation”.

Add the MCP server tool to the agent

Open the newly created agent, go to “Tools”, click “Add a tool” and “Model Context Protocol”, select the MCP connector created in the first step. For example, the agent named as “MCP-MSLearn” in this walkthrough.

 

Add the tool to the agent. You can use the “Add and configure” option to configure the tool details. In this walkthrough, we will use the default configuration.

In agent’s Settings, create a new connection for the tool and ensure it has the “Connected” status.

 

Test the agent

Open the agent, in the Test panel, ensure “Show activity map when testing” is turned on. This function provides visualization of the agent activities during testing.

You can ask questions such as “Hello”, “Tell me something about Seattle”, or “How do I use the CLI to create Azure Container Apps?”. According to the activity map, the agent retrieves tools from the MCP server during startup, answers non-Microsoft queries using its own knowledge, and turns to the MCP server tool for questions related to Microsoft products.

 

Conclusion

This blog provides a step-by-step guide to creating and configuring a custom connector for an MCP server and integrating it with an agent in Copilot Studio. By following this process, you can expand your agent’s functionality through external tool access, enhance decision-making with richer context, and enable seamless interoperability across a wide range of systems.

References

  1. Introduction - Model Context Protocol
  2. Extend your agent with Model Context Protocol - Microsoft Copilot Studio | Microsoft Learn

Tags

#Copilot #MCP #Agent #AI #MicrosoftLearn #SkilledByMTT

Author’s Bio

Extensive cloud solution architecture and customer enablement experience of Microsoft Azure and M365 platform across infrastructure, security, app, DevOps, analytics, AI and Copilot solution areas.

Certified on: Azure Solutions Architect, DevOps Engineer, Azure Administrator, Azure Security Engineer, Azure Developer, Azure AI Engineer, Azure Data Engineer, Power BI Data Analyst, Azure Virtual Desktop, Identity and Access Administrator, Security Operations Analyst, Information Protection Administrator

Updated Aug 26, 2025
Version 1.0