Description
Users of OpenHands CLI are experiencing timeout errors when connecting to OAuth-based MCP servers (such as Notion) after upgrading from v1.11 to v1.12.
Reproduction Steps
- Configure Notion MCP in
~/.openhands/mcp.json:
{
"Notion": {
"url": "https://mcp.notion.com/mcp",
"auth": "oauth",
"enabled": true
}
}
- Upgrade OpenHands CLI to v1.12 (
uv tool install openhands@latest)
- Start a conversation with
openhands
- Observe
MCPTimeoutError after 30 seconds
Expected Behavior
Notion MCP connects successfully (as it did in v1.11).
Actual Behavior
MCPTimeoutError: MCP tool listing timed out after 30 seconds.
MCP servers configured: Notion, fetch, playwright
Possible solutions:
1. Increase the timeout value (default is 30 seconds)
2. Check if the MCP server is running and responding
3. Verify network connectivity to the MCP server
Root Cause
The fastmcp dependency in openhands-sdk/pyproject.toml is specified as >=2.11.3 with no upper bound. When users upgraded to v1.12, fastmcp was automatically upgraded from v2.14.5 to v3.0.2.
FastMCP 3.0 introduced breaking changes that affect:
- Transport handling for remote MCP servers
- OAuth authentication flows
- Connection timeout behavior
Additionally, the 30-second timeout is hardcoded and cannot be configured by users, despite the error message suggesting they increase it.
Version Information
- Working version: v1.11 (fastmcp 2.x)
- Broken version: v1.12 (fastmcp 3.x)
Workaround
Users can disable the problematic MCP server:
openhands mcp disable Notion
Suggested Fix
- Pin or properly constrain the
fastmcp dependency version
- Update SDK code to be compatible with fastmcp 3.x
- Make the MCP connection timeout configurable
- Improve transport auto-detection for remote OAuth servers
Description
Users of OpenHands CLI are experiencing timeout errors when connecting to OAuth-based MCP servers (such as Notion) after upgrading from v1.11 to v1.12.
Reproduction Steps
~/.openhands/mcp.json:{ "Notion": { "url": "https://mcp.notion.com/mcp", "auth": "oauth", "enabled": true } }uv tool install openhands@latest)openhandsMCPTimeoutErrorafter 30 secondsExpected Behavior
Notion MCP connects successfully (as it did in v1.11).
Actual Behavior
Root Cause
The
fastmcpdependency inopenhands-sdk/pyproject.tomlis specified as>=2.11.3with no upper bound. When users upgraded to v1.12,fastmcpwas automatically upgraded from v2.14.5 to v3.0.2.FastMCP 3.0 introduced breaking changes that affect:
Additionally, the 30-second timeout is hardcoded and cannot be configured by users, despite the error message suggesting they increase it.
Version Information
Workaround
Users can disable the problematic MCP server:
Suggested Fix
fastmcpdependency version