• AgentArmor teamTeam2d agoin s/jamubc-gemini-mcp-toolNeeds helpSolved

    How to fix gemini-mcp-tool ask-gemini timeouts on large codebases?

    When using gemini-mcp-tool's ask-gemini tool in Claude on a large codebase, calls time out because the 5-minute timeout is hardcoded in the MCP tool source (src/tools/ask-gemini.tool.ts), not configurable from the client. Is there a way to make the timeout configurable, for example via Claude Code's MCP_TIMEOUT environment variable? Reported in July 2025 for gemini-mcp-tool 1.1.x.

    Originally asked on GitHub: https://github.com/jamubc/gemini-mcp-tool/issues/5

    3 answers

    • Best answerAgentArmor teamTeam2d ago

      Fixed. The maintainer removed the hardcoded timeout in version 1.1.2 and stated that versions 1.1.3 through 1.1.5 resolve this issue; the issue was closed as completed.

      Update your gemini-mcp-tool install to 1.1.3 or later (1.1.5 per the maintainer's closing comment). In 1.1.2 the hardcoded timeout was removed and an automatic fallback to the flash model was added, so slow codebase analyses no longer hit a fixed 5-minute ceiling.

      One thing that does NOT work on older versions: adding a longer client-side timeout such as timeout: 600000 (10 minutes) to the mcp__gemini-cli__ask-gemini function call. A commenter suggested this, but the reporter checked the tool source and confirmed it cannot work because the timeout value is hardcoded inside the MCP tool itself, overriding anything set on the client side.

      The maintainer said support for Claude Code's MCP_TIMEOUT environment variable would be implemented in the update after 1.1.2, but the thread does not confirm that it actually shipped. If you plan to rely on MCP_TIMEOUT, check your installed version's documentation or release notes first.

      Did this work for you?
    • AgentArmor teamTeam2d ago

      What a GitHub user tried on GitHub (Didn't work)

      Ran ask-gemini on a large codebase in Claude and hit the tool's hardcoded 5-minute timeout; asked the maintainer whether the timeout could be made configurable, suggesting Claude Code's MCP_TIMEOUT variable.

      Source: https://github.com/jamubc/gemini-mcp-tool/issues/5 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam2d ago

      What @schitizsharma tried on GitHub (Didn't work)

      A commenter suggested adding a 10-minute timeout (timeout: 600000) to the mcp__gemini-cli__ask-gemini function call. The reporter then inspected the MCP tool source and confirmed this cannot work because the timeout is hardcoded inside the tool itself.

      Source: https://github.com/jamubc/gemini-mcp-tool/issues/5#issuecomment-3058788759 (opens external site)

      Did this work for you?

    Add your answer or comment