You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I run the server.py script (with the right python environment) I get 07/03/25 20:34:34] INFO Starting MCP server 'my-server' with transport 'stdio' server.py:1246, which I assumed is correct since I have the same result on Linux.
Also if I import server.py to the python interpreter and run call the function of the tools they return immediately.
When running with gemini -d and prompting to use the version tool of the server I get:
Debug Console (ctrl+o to close)
ℹ Authenticated via "vertex-ai".
ℹ Flushing log events to Clearcut. (x7)
✖ MCP ERROR (my_server): Error: Received a response for an unknown message ID: {"jsonrpc":"2.0","id":2,"result":{"content":[{"type":"text","text":"my_tool version 0.3.4\n"}],"isError":false}}
ℹ Flushing log events to Clearcut. (x3)
And "my_tool version 0.3.4\n" is the correct result from using the tool.
@TheFrok hmmm, so based on that error it seems your MCP server is misbehaving. How Json RPC typically works is that for each request you are given an id and each response must contain the corresponding id parameter. Does this MCP server work with other MCP clients by chance?
This was indeed an issue on my side. The subprocess I invoked raced with the server on reading from stdin.
Passing stdin=subprocess.DEVNULL when invoking the command solved it for me.
Activity
NTaylorMullen commentedon Jul 3, 2025
Few questions:
-dparameter and then hit ctrl + o (will open the output pane) could you share the output thereTheFrok commentedon Jul 3, 2025
My settings.json is this (I that's the server config you meant):
{ "theme": "Default", "selectedAuthType": "vertex-ai", "mcpServers": { "my_server": { "command": "C:\\Users\\admin\\venv\\Scripts\\python", "args": [ "C:\\Users\\admin\\server.py" ], "cwd": "C:\\Users\\admin", "timeout": 600000, "trust": true } } }If I run the
server.pyscript (with the right python environment) I get07/03/25 20:34:34] INFO Starting MCP server 'my-server' with transport 'stdio' server.py:1246, which I assumed is correct since I have the same result on Linux.Also if I import server.py to the python interpreter and run call the function of the tools they return immediately.
When running with
gemini -dand prompting to use the version tool of the server I get:And
"my_tool version 0.3.4\n"is the correct result from using the tool.NTaylorMullen commentedon Jul 5, 2025
@TheFrok hmmm, so based on that error it seems your MCP server is misbehaving. How Json RPC typically works is that for each request you are given an
idand each response must contain the correspondingidparameter. Does this MCP server work with other MCP clients by chance?TheFrok commentedon Jul 7, 2025
This was indeed an issue on my side. The subprocess I invoked raced with the server on reading from stdin.
Passing
stdin=subprocess.DEVNULLwhen invoking the command solved it for me.Fix Windows subprocess stdin hang in MCP server