===========================================================================
Introduction
Integrating Copilot Studio with a custom Model Context Protocol (MCP) server opens up powerful possibilities for extending your AI assistant's capabilities. Once you've set up your MCP server and exposed it via DevTunnel (accessible at https://5ldvknx5-8000.use.devtunnels.ms/mcp), you can configure Copilot Studio to act as an MCP client. This connection allows Copilot Studio to leverage your custom tools and data sources, such as querying pull requests, branches, and commits from your repositories. The MCP protocol provides a standardized way for AI assistants to communicate with external services, making it easier to build context-aware applications without hardcoding integrations.
Pre-requisites
Clone the GitHub repository and check the README.md for setting up the MCP Server locally:
GitHub Repo: https://github.com/Anilalkg/MCP-Server.git
Get the streamable HTTP URL as detailed in the setup (e.g., https://5ldvknx5-8000.use.devtunnels.ms/mcp)
Recommended Code Editors: VS Code or Anti-Gravity
Setup Steps
Step 1: Navigate to Copilot Studio (CPS)
Open Copilot Studio in your browser and log in to your account.
Step 2: Create a Blank Agent
Click on Create or New Agent
Select Blank Agent to start from scratch
Step 3: Add a Tool
Navigate to the Tools section
Click Add a tool
Select Model Context Protocol
Step 4: Configure the MCP Connection
Fill in the following details:
Server name: (e.g., "Agent DevOps MCP Server")
Server description: (e.g., "Custom MCP server for Azure DevOps operations")
Server URL: Enter your streaming URL - https://5ldvknx5-8000.use.devtunnels.ms/mcp
Step 5: Create and Connect
Click Create Connection
Select Connect to Agent DevOps
Click Add and Configure
Now the tools should be added successfully!
Step 6: Verify Tool Integration
In your Tools home page, under the Tools menu, you should see all the methods decorated with @mcp.tool() from your MCP server configurations.
Screen should look like this
Testing Your Agent
Now you should be able to ask questions in your Copilot Studio Test Panel. Here are some sample questions this agent can answer:
>list me all the pull requests
>list me all the branches available in AI-Solutions
>list me all the user names of the persons who did the commits to AI-Solutions
Conclusion
This architecture provides significant flexibility for enterprise scenarios where you need to connect AI assistants to internal systems, databases, or specialized APIs. By using the MCP protocol as a bridge, you maintain a clean separation between your AI interface (Copilot Studio) and your backend services. This means you can update your MCP server's functionality independently without reconfiguring Copilot Studio, and you can even reuse the same MCP server across multiple AI platforms.
Whether you're building developer tools, IT support bots, or business intelligence assistants, the combination of Copilot Studio and custom MCP servers creates a robust foundation for AI-powered workflows.
================================================================================
Tags: #CopilotStudio #MCP #AzureDevOps #AI #Automation #ModelContextProtocol