Skip to content

MCP Server times out on windows #3130

Closed

Description

@TheFrok

What happened?

I constantly getting the McpError: MCP error -32001: Request timed out when I try my MCP on windows, while working fine on linux.

What did you expect to happen?

I wanted the MCP to finish running and return the result.

Client information

  • CLI Version: 0.1.9
  • Git Commit: 34935d6
  • Operating System: win32 v22.17.0
  • Sandbox Environment: no sandbox
  • Model Version: gemini-2.5-pro
  • Memory Usage: 131.2 MB

Login information

I use vertex AI credentials

Anything else we need to know?

This using FastMCP, and the tool invokes a different process to get its stdout.
The MCP transport is stdio.

Activity

  1. added
    area/coreIssues related to User Interface, OS Support, Core Functionality
    priority/p2Important but can be addressed in a future release.
    and removed
    status/need-triageIssues that need to be triaged by the triage automation.
    on Jul 3, 2025
  2. NTaylorMullen commented on Jul 3, 2025

    @NTaylorMullen
    Collaborator

    Few questions:

    • What's your MCP server config look like?
    • If you run the command to start it locally does it work?
    • If you boot Gemini CLI with the -d parameter and then hit ctrl + o (will open the output pane) could you share the output there
  3. TheFrok commented on Jul 3, 2025

    @TheFrok
    Author

    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.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.

  4. NTaylorMullen commented on Jul 5, 2025

    @NTaylorMullen
    Collaborator

    @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?

  5. TheFrok commented on Jul 7, 2025

    @TheFrok
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to User Interface, OS Support, Core Functionalitypriority/p2Important but can be addressed in a future release.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions