Microsoft.Agents.CopilotStudio.Mcp 1.0.1

Prefix Reserved
dotnet tool install --global Microsoft.Agents.CopilotStudio.Mcp --version 1.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Microsoft.Agents.CopilotStudio.Mcp --version 1.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
#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

  1. Go to Copilot Studio
  2. Select the agent you want to use as an MCP server
  3. Click on Channels
  4. Click on MCP Client (Preview) in the "Other channels" section
  5. Copy the Connection string
  6. Extract the URL (format shown below)
  7. 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

  1. Open VS Code
  2. Press Ctrl + Shift + P (or Cmd + Shift + P on Mac)
  3. Type "MCP: Open Workspace Folder MCP Configuration" and select it
  4. This will create and open .vscode/mcp.json in 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

  1. Open Claude Desktop's configuration file:

    • Press Windows + R
    • Type: %APPDATA%\Claude
    • Open claude_desktop_config.json
  2. 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"
      ]
    }
  }
}
  1. Replace YOUR_AGENT_URL_HERE with your agent's URL from Step 1
  2. Adjust the scope if you're not using the Prod environment
  3. 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

  1. Verify the tool is installed: Microsoft.Agents.CopilotStudio.Mcp --help
  2. Check the JSON configuration is valid (use a JSON validator)
  3. Ensure Claude Desktop is completely closed (check system tray)
  4. Restart Claude Desktop
  5. 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-logging to 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.1 490 11/20/2025