Skip to content

Regression: OAuth MCP servers (e.g., Notion) timeout after upgrading to v1.12 #2184

@jpshackelford

Description

@jpshackelford

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

  1. Configure Notion MCP in ~/.openhands/mcp.json:
    {
      "Notion": {
        "url": "https://mcp.notion.com/mcp",
        "auth": "oauth",
        "enabled": true
      }
    }
  2. Upgrade OpenHands CLI to v1.12 (uv tool install openhands@latest)
  3. Start a conversation with openhands
  4. 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

  1. Pin or properly constrain the fastmcp dependency version
  2. Update SDK code to be compatible with fastmcp 3.x
  3. Make the MCP connection timeout configurable
  4. Improve transport auto-detection for remote OAuth servers

Metadata

Metadata

Assignees

Labels

StalebugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions