Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - Model Context Protocol
Suggested answer

Copilot Studio MCP Client is incompatible with Servers using python SDK

(6) ShareShare
ReportReport
Posted on by 12
I have observed that servers making use of the official python sdk are not working with MS Copilot Studio. 

After a lot of digging we have found the exact reason for this problem. Python servers send back the following payload on an initialize request:
{
  "jsonrpc":"2.0",
  "id":1,
  "result":{
     "protocolVersion":"2024-11-05",
      "capabilities":{"experimental":{},"tools":{"listChanged":false}},
      "serverInfo":{"name":"mcp-streamable-http-demo","version":"1.9.5.dev14+d0443a1"}}
}
 
In node, the following payload is sent:
 
{"result":{"protocolVersion":"2024-11-05","capabilities":{"logging":{},"tools":{"listChanged":true},"prompts":{"listChanged":true},"completions":{},"res
ources"
:{"listChanged":true}},"serverInfo":{"name":"simple-streamable-http-
server"
,"version":"1.0.0"}},"jsonrpc":"2.0","id":"1"}

As you can see the type of the "id" field is integer in python, and string in node.

An integer id seems to cause the Copilot Studio Client to crash, and the follow up requests after this exchange simply don't come.

The Microsoft MCP client should support integer id's as well, since this is also part of the official spec
  • chrisburns Profile Picture
    2 on at
    Copilot Studio MCP Client is incompatible with Servers using python SDK
    @zankard - I don't think the issue is that copilot studio doesn't support it, i think it is to do with the fact that copilot studio sends the ID out in string format, but the SDK responds in a integer. It should be solveable with @CU24061549-1 's idea.. But can i hell as get the custom code to accept the modified return response. (it is almost like MCP does not want to see a manipulated return).

    This is the proxy code (i have tried to boil it down to absolute basics) - I cannot get it to work - @CU24061549-1 I would love to see how you got it to work.
     
    EDIT:

    I got it working.... For anyone else stumbling on this post and needing a fix at Copilot Studio level, here is the proxy code i used to get it to work. (The reason i struggled was i kept assuming the response was pure JSON. it wasn't it is SSE Events. 

    https://github.com/EgoManiac/CopilotStudioMCPFix/blob/main/README.md
     
     
  • Suggested answer
    FW-24061242-0 Profile Picture
    12 on at
    Copilot Studio MCP Client is incompatible with Servers using python SDK and not spec compliant
    See this MCP python issue:

    https://github.com/modelcontextprotocol/python-sdk/issues/961

    I will publish a workaround there.
  • FW-24061242-0 Profile Picture
    12 on at
    Copilot Studio MCP Client is incompatible with Servers using python SDK and not spec compliant
    @zankard if i understand the protocol correctly, i guess the type of the response id has to match the one that is requested ( MS Copilot Studio has a string as request id ).

    So it might be that the Python SDK is itself not compliant there, and the issue is not on your side. 
  • FW-24061242-0 Profile Picture
    12 on at
    Copilot Studio MCP Client is incompatible with Servers using python SDK and not spec compliant
    This is our swagger file, it's unmodified apart from the host, and taken from your tutorial 

    swagger: '2.0'
    info:
      title: MCP Server Python
      description: >-
        This MCP Server will work with Streamable HTTP and is meant to work with
        Microsoft Copilot Studio Python
      version: 1.0.0
    host: sm1cnpjm-8100.euw.devtunnels.ms
    basePath: /mcp
    schemes:
      - https
    consumes: []
    produces: []
    paths:
      /:
        post:
          summary: MCP Server Streamable HTTP
          x-ms-agentic-protocol: mcp-streamable-1.0
          operationId: InvokeServer
          responses: {}
    definitions: {}
    parameters: {}
    responses: {}
    securityDefinitions: {}
    security: []
    tags: []

    I tried to start a conversation with the broken agent tool in the conversation with id 1e9861f2-12a0-4fd9-93e4-33e468297794, maybe it helps.
  • FW-24061242-0 Profile Picture
    12 on at
    Copilot Studio MCP Client is incompatible with Servers using python SDK and not spec compliant
  • FW-24061242-0 Profile Picture
    12 on at
    Copilot Studio MCP Client is incompatible with Servers using python SDK and not spec compliant
    @GO-20061201-0 the example you referenced uses SSE and i can't find a workaround there for this issue. Did you get Copilot Studio to work with python via streamable-http?

    @zankard i don't think it does. I recorded a demonstration here, i think it's pretty evident that the type of the "ID" field is the issue. Can you have a look? I will also attach reproduction steps to the post.
  • CU24061549-1 Profile Picture
    2 on at
    Copilot Studio MCP Client is incompatible with Servers using python SDK and not spec compliant
    I had the same issue. I've been able to fix this by modifying the response from int to string through the proxy code available in the connector from powerapp.
  • GO-20061201-0 Profile Picture
    on at
    Copilot Studio MCP Client is incompatible with Servers using python SDK and not spec compliant
    I experienced the same thing. I'll watch this space to see the solution. In the meantime, I found this repo that demonstrates an alternative technique. Hope it helps! (Sadly, it doesn't work with streamable http)
     
  • CU25060137-1 Profile Picture
    2 on at
    Copilot Studio MCP Client is incompatible with Servers using python SDK and not spec compliant
    i am getting the issue with no tools being listed but the mcp server works in claude and vscode. i added it using the github dev streamable-http connector config. the mcp server is in python.
  • zankard Profile Picture
    Moderator on at
    Copilot Studio MCP Client is incompatible with Servers using python SDK and not spec compliant
    Hi @FW-24061242-0 - sorry to hear you are encountering some issues. Copilot studio does support integer IDs as well. Can you please share the conversation ID, and if possible your swagger file? This will help us further investigate and help with troubleshooting. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 169 Super User 2025 Season 1

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 150

#3
sandeep_angara Profile Picture

sandeep_angara 75