Microsoft.Agents.CopilotStudio.Mcp
1.0.1
Prefix Reserved
dotnet tool install --global Microsoft.Agents.CopilotStudio.Mcp --version 1.0.1
dotnet new tool-manifest
dotnet tool install --local Microsoft.Agents.CopilotStudio.Mcp --version 1.0.1
#tool dotnet:?package=Microsoft.Agents.CopilotStudio.Mcp&version=1.0.1
nuke :add-package Microsoft.Agents.CopilotStudio.Mcp --version 1.0.1
Microsoft Copilot Studio MCP Server Proxy
A .NET global tool that enables MCP clients like Claude Desktop to use Microsoft Copilot Studio agents as Model Context Protocol (MCP) servers. This proxy handles OAuth authentication so your MCP client can securely connect to Copilot Studio.
What is this?
This tool bridges the gap between MCP clients (like Claude Desktop, Cline, etc.) and Microsoft Copilot Studio agents. It acts as an authentication proxy that:
- Handles OAuth 2.0 authentication with Microsoft Identity
- Forwards MCP requests to your Copilot Studio agent
- Returns responses back to your MCP client
- Works transparently without modifying the MCP protocol
Prerequisites
.NET 8.0 Runtime (for using the tool):
winget install Microsoft.DotNet.Runtime.8
Installation
Install the tool globally using dotnet tools:
dotnet tool install --global Microsoft.Agents.CopilotStudio.Mcp
Verify the installation:
Microsoft.Agents.CopilotStudio.Mcp --help
Configuration
Step 1: Get Your Copilot Studio agent URL
- Go to Copilot Studio
- Select the agent you want to use as an MCP server
- Click on Channels
- Click on MCP Client (Preview) in the "Other channels" section
- Copy the Connection string
- Extract the URL (format shown below)
- Publish the agent if not already published
The URL will look like:
https://{ENV_ID}.{ENV_ID_LAST_NUMBER}.environment.api.powerplatform.com/copilotstudio/dataverse-backed/authenticated/bots/{AGENT_NAME}/adapter/modelcontextprotocol?api-version=2022-03-01-preview
Step 2: Determine Your OAuth Scope
Choose the scope based on your Power Platform environment:
Public Clouds:
- Prod (default):
https://api.powerplatform.com/.default
Gov Clouds:
- GCC/GovFR:
https://api.gov.powerplatform.microsoft.us/.default - GCC High:
https://api.high.powerplatform.microsoft.us/.default - DoD:
https://api.appsplatform.us/.default - Mooncake:
https://api.powerplatform.partner.microsoftonline.cn/.default - Ex:
https://api.powerplatform.eaglex.ic.gov/.default - Rx:
https://api.powerplatform.microsoft.scloud/.default
Usage
With VS Code Copilot
- Open VS Code
- Press
Ctrl + Shift + P(orCmd + Shift + Pon Mac) - Type "MCP: Open Workspace Folder MCP Configuration" and select it
- This will create and open
.vscode/mcp.jsonin your workspace
Add the following configuration:
{
"servers": {
"copilot-studio": {
"type": "stdio",
"command": "Microsoft.Agents.CopilotStudio.Mcp",
"args": [
"--remote-server-url",
"YOUR_AGENT_URL_HERE",
"--scopes",
"https://api.powerplatform.com/.default"
]
}
},
"inputs": []
}
Replace YOUR_AGENT_URL_HERE with your agent's URL, adjust the scope if needed and save the file.
With Claude Desktop
Open Claude Desktop's configuration file:
- Press
Windows + R - Type:
%APPDATA%\Claude - Open
claude_desktop_config.json
- Press
Add the proxy configuration:
{
"mcpServers": {
"copilot-studio": {
"command": "Microsoft.Agents.CopilotStudio.Mcp",
"args": [
"--remote-server-url", "YOUR_AGENT_URL_HERE",
"--scopes", "https://api.powerplatform.com/.default"
]
}
}
}
- Replace
YOUR_AGENT_URL_HEREwith your agent's URL from Step 1 - Adjust the scope if you're not using the Prod environment
- Save the file and restart Claude Desktop
With Other MCP Clients
Configure your MCP client to run:
Microsoft.Agents.CopilotStudio.Mcp --remote-server-url "YOUR_AGENT_URL_HERE" --scopes "YOUR_SCOPE"
Command-Line Options
| Option | Required | Description |
|---|---|---|
--remote-server-url |
Yes | URL of your Copilot Studio agent's MCP endpoint |
--scopes |
No | OAuth scopes (defaults to prod Power Platform) |
--client-id |
No | Custom OAuth client ID |
--tenant-id |
No | Azure AD tenant ID (defaults to common endpoint) |
--authority |
No | OAuth authority URL |
--debug |
No | Enable debug logging |
--enable-http-logging |
No | Log HTTP requests/responses |
--enable-msal-logging |
No | Log MSAL authentication details |
--enable-logging |
No | Log raw MCP traffic to file |
--request-timeout |
No | HTTP timeout in seconds (default: 30) |
--user-agent |
No | Custom User-Agent header |
--additional-headers |
No | Additional HTTP headers (format: key=value) |
Troubleshooting
"Tool is already installed" Error
dotnet tool uninstall --global Microsoft.Agents.CopilotStudio.Mcp
dotnet tool install --global Microsoft.Agents.CopilotStudio.Mcp
"'dotnet' is not recognized" Error
Install .NET Runtime:
winget install Microsoft.DotNet.Runtime.8
Tool Doesn't Show in Claude Desktop
- Verify the tool is installed:
Microsoft.Agents.CopilotStudio.Mcp --help - Check the JSON configuration is valid (use a JSON validator)
- Ensure Claude Desktop is completely closed (check system tray)
- Restart Claude Desktop
- Check logs at:
%APPDATA%\Claude\logs
Authentication Errors
- Ensure your agent is published in Copilot Studio
- Verify the correct scope for your environment
- Try with
--enable-msal-loggingto see authentication details - Check that you have access to the Copilot Studio agent
Connection Issues
- Verify the agent URL is correct and complete
- Test the URL is accessible from your network
- Try increasing timeout:
--request-timeout 60 - Enable HTTP logging:
--enable-http-logging
Updating
To update to a newer version:
dotnet tool update --global Microsoft.Agents.CopilotStudio.Mcp
Uninstalling
dotnet tool uninstall --global Microsoft.Agents.CopilotStudio.Mcp
License
© Microsoft Corporation. All rights reserved.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1 | 490 | 11/20/2025 |