web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Copilot Studio MCP Cli...
Copilot Studio
Suggested Answer

Copilot Studio MCP Client is incompatible with Servers using python SDK

(6) ShareShare
ReportReport
Posted on by 26
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
I have the same question (0)
  • zankard Profile Picture
    Moderator on at
    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. 
  • CU25060137-1 Profile Picture
    4 on at
    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.
  • GO-20061201-0 Profile Picture
    on at
    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)
     
  • CU24061549-1 Profile Picture
    4 on at
    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.
  • FW-24061242-0 Profile Picture
    26 on at
    @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.
  • FW-24061242-0 Profile Picture
    26 on at
  • FW-24061242-0 Profile Picture
    26 on at
    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
    26 on at
    @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. 
  • Suggested answer
    FW-24061242-0 Profile Picture
    26 on at
    See this MCP python issue:

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

    I will publish a workaround there.
  • chrisburns Profile Picture
    2 on at
    @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
     
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 251 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 201 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard