Skip to main content
Any Framework

Enables MCP clients like GitHub Copilot or Claude Desktop to use published 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.

Published
Nov 20, 2025
11mo ago
Total Downloads
648
648

Install

dotnet add package Microsoft.Agents.CopilotStudio.Mcp --version 1.0.1

No framework information available.

README

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.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.