[BUG] timeout field in claude_desktop_config.json not honored for MCP servers
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Note: This issue occurs in the Claude Desktop App (Windows 11) using the built-in Code tab,
not the Claude Code CLI. The Code tab embeds Claude Code and shares the same MCP infrastructure,
but does not honor MCP timeout configuration the way the CLI does.
Environment:
Claude Desktop App (Windows 11)
GNOME / Desktop Code tab
MCP server: ollama-mcp (local Ollama instance)
Expected behavior:
Adding "timeout": 300000 to an MCP server entry in claude_desktop_config.json should extend the request timeout for that server beyond the default 60 seconds.
Actual behavior:
The timeout field is ignored. MCP tool calls that take longer than ~60 seconds return MCP error -32001: Request timed out regardless of the configured value. The DEFAULT_REQUEST_TIMEOUT_MSEC = 60000 constant in the bundled MCP SDK is never overridden.
Impact:
Makes it impossible to use local LLM MCP servers (e.g. Ollama) for code generation tasks where inference takes longer than 60 seconds. The Claude Code CLI likely handles this correctly but the desktop app does not.
Workaround:
None that don't involve patching files inside node_modules.
What Should Happen?
When "timeout": 300000 is set in the MCP server config in claude_desktop_config.json, the desktop app should pass that value to the MCP client connection for that server, overriding the default 60 second timeout. Tool calls to that server should be allowed up to 300 seconds (or whatever value is configured) before timing out.
Error Messages/Logs
From %APPDATA%\Claude\logs\mcp.log:
Message from server: {"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"Only URLs with a scheme in: file, data, and node are supported by the default ESM loader..."}}
From %APPDATA%\Claude\logs\mcp-server-ollama.log:
MCP error -32001: Request timed out
Root cause identified: DEFAULT_REQUEST_TIMEOUT_MSEC = 60000 in the bundled MCP SDK at:
%APPDATA%\npm\node_modules\ollama-mcp\node_modules\@modelcontextprotocol\sdk\dist\esm\shared\protocol.js
The timeout field in claude_desktop_config.json is not being read and passed to the MCP client — manually patching the constant above to 300000 confirms the timeout is the issue, but this workaround is fragile and gets wiped on package updates.
Steps to Reproduce
Steps to Reproduce
- Install Claude Desktop app on Windows 11
- Add an MCP server to
%APPDATA%\Claude\claude_desktop_config.jsonwith atimeoutfield:
{
"mcpServers": {
"ollama": {
"command": "node",
"args": ["path\\to\\ollama-mcp\\dist\\index.js"],
"timeout": 300000,
"env": {
"OLLAMA_HOST": "http://your-ollama-host:11434"
}
}
}
}
- Restart Claude Desktop
- In the Code tab, invoke the MCP tool with a prompt that will take longer than 60 seconds to complete (e.g. asking a large local Ollama model to generate a 150+ line code file)
- Observe that the tool call fails with
MCP error -32001: Request timed outafter exactly ~60 seconds regardless of thetimeoutvalue set in config
Expected Behavior
The timeout value in claude_desktop_config.json should override the default 60 second MCP timeout for that server, allowing tool calls up to the configured duration.
Actual Behavior
The timeout field is silently ignored. All MCP tool calls time out after exactly 60 seconds regardless of configuration.
Root Cause
DEFAULT_REQUEST_TIMEOUT_MSEC = 60000 is hardcoded in the bundled MCP SDK:%APPDATA%\npm\node_modules\ollama-mcp\node_modules\@modelcontextprotocol\sdk\dist\esm\shared\protocol.js
The timeout field in claude_desktop_config.json is never read and applied to the MCP client connection.
Workaround
Manually patch the constant in the file above from 60000 to a higher value. This is fragile and gets wiped on package updates.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.87
Platform
Other
Operating System
Windows
Terminal/Shell
Other
Additional Information
Note: This issue occurs in the Claude Desktop App (Windows 11) using the built-in Code tab,
not the Claude Code CLI. The Code tab embeds Claude Code and shares the same MCP infrastructure,
but does not honor MCP timeout configuration the way the CLI does.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗