Repository navigation
Description
Observed Behavior
python/scripts/local_mcp_streamable_http_server.py is the deterministic MCP server that .github/actions/setup-local-mcp-server starts for the MCP integration tests (used by python-merge-tests.yml and python-integration-tests.yml). It still imports mcp.server.fastmcp.FastMCP. The workspace locks mcp 2.3.0, where that module no longer exists, so the server exits on import:
ModuleNotFoundError: No module named 'mcp.server.fastmcp'. This is mcp 2.x, where FastMCP was renamed to MCPServer ...
The action's health check then fails, and it logs "Local MCP server was unavailable; continuing with fallback LOCAL_MCP_URL". So the integration tests silently run against the external vars.LOCAL_MCP__URL instead of the local server the action is meant to provide.
Separately, both tests that use LOCAL_MCP_URL (test_streamable_http_integration and test_mcp_connection_reset_integration in packages/core/tests/core/test_mcp.py) fail against any server. They assert tool.session is not None, but with mcp 2.x MCPTool connects through a high-level mcp.Client, and the deprecated session property returns None for those connections. The reset test also patches tool.session.call_tool, which no longer exists on that path.
Expected Behavior
The local CI MCP server starts on mcp 2.x, and the MCP integration tests pass against it.
Steps to Reproduce
cd python && uv run python scripts/local_mcp_streamable_http_server.py- Observe the import error.
- With a working server, run
LOCAL_MCP_URL=http://127.0.0.1:8011/mcp uv run pytest packages/core/tests/core/test_mcp.py -m integration.
Minimal Reproduction
cd python
uv run python scripts/local_mcp_streamable_http_server.py --port 8011Error Messages and Stack Traces
ModuleNotFoundError: No module named 'mcp.server.fastmcp'. This is mcp 2.x, where FastMCP was renamed to MCPServer (from mcp.server.mcpserver import MCPServer) ...
FAILED packages/core/tests/core/test_mcp.py::test_streamable_http_integration - assert None is not None
FAILED packages/core/tests/core/test_mcp.py::test_mcp_connection_reset_integration - assert None is not None
Package Versions
mcp 2.3.0 (uv.lock); main at dc6617a
Python Version
Python 3.13
Operating System
macOS
Regression
Yes. The script was written for mcp 1.x, and the workspace moved to mcp>=2.2.0,<3.
Additional Context
Proposed fix:
- Port the script to
mcp.server.mcpserver.MCPServer. In 2.x, host, port and path are passed torun(transport="streamable-http", ...)instead of the constructor. Setstructured_output=Falseso the tool keeps returning plain text. - Update the two integration tests to check
tool.is_connectedand the normalized connection (tool._connection) instead of the deprecatedsession.
I have a PR ready and will link it here.
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
1aifanatic commentedon Nov 4, 2026
PR with the proposed fix: #10077
github-actions commentedon Nov 4, 2026
🤖 Automated triage reproduction notes (agent-authored — trust but verify)
Agent analysis
Repro:
python/scripts/local_mcp_streamable_http_server.py::<module>line 11 fails under locked MCP 2.3.0 when importingmcp.server.fastmcp.FastMCP; runcd python && uv run python scripts/local_mcp_streamable_http_server.py --port 801. Separately,python/packages/core/tests/core/test_mcp.py::test_streamable_http_integrationand::test_mcp_connection_reset_integrationfail at lines 424 and 427 after connecting to any MCP 2 streamable HTTP server becausetool.sessionisNone; start an MCP 2 server exposing one tool and run both node IDs withLOCAL_MCP_URLset.python/packages/core/tests/core/test_mcp.pymcp 2.3.0agent-framework-core 1.24.0