Repository navigation
Python: Run the local CI MCP server on mcp 2.x - #10077
Closed
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
Closed
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Naveen Chatlapalli (1aifanatic)
temporarily deployed
to
github-app-auth
November 4, 2026 05:36 — with
GitHub Actions
Inactive
Naveen Chatlapalli (1aifanatic)
temporarily deployed
to
github-app-auth
November 4, 2026 05:36 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the mcp 2.x migration of the local test server and integration tests.
No open issues 🎉
What changed in this PR
Updates the local Python CI MCP server and its integration tests for mcp 2.x, addressing #10075 without changing framework runtime code.
Changes:
- Replaces
FastMCPwithMCPServerand moves HTTP configuration torun(), preserving plain-text tool output. - Updates integration tests to check connection state and verify reconnection through the normalized connection rather than the deprecated session.
| File | Description |
|---|---|
python/scripts/local_mcp_streamable_http_server.py |
Migrates the local test server to mcp 2.x APIs while preserving CLI options and health checks. |
python/packages/core/tests/core/test_mcp.py |
Updates connection assertions and simulated failure handling for the mcp 2.x client path. |
Review effort: Balanced
Member
|
Thanks Naveen Chatlapalli (@1aifanatic) for the update. We’re going to make the MCP 2.x local CI server change as part of our maintainer-owned GitHub Actions and tooling updates tracked in #10075, so I’m closing this PR. No workflow runs from this head will be authorized. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation & Context
.github/actions/setup-local-mcp-serverstartspython/scripts/local_mcp_streamable_http_server.pyso the MCP integration tests run against a deterministic local server. The script still importsmcp.server.fastmcp.FastMCP, which doesn't exist in the locked mcp 2.3.0. The server exits on import, the action's health check fails, and it falls back to the externalvars.LOCAL_MCP__URL. There's no failure, just a quiet switch to the remote server.The two integration tests that use
LOCAL_MCP_URLwould fail against any server anyway. They asserttool.session is not None, but with mcp 2.xMCPToolconnects throughmcp.Client, and the deprecatedsessionproperty isNoneon that path. Details in #10075.Description & Review Guide
scripts/local_mcp_streamable_http_server.pyusesmcp.server.mcpserver.MCPServer. In 2.x, host, port and path move from the constructor torun(transport="streamable-http", ...). The tool setsstructured_output=Falseso it keeps returning plain text. The/healthzroute and the CLI arguments are unchanged.test_streamable_http_integrationcheckstool.is_connectedinstead ofsession.test_mcp_connection_reset_integrationmakes its simulated failure on the normalized connection (tool._connection.call_tool) and checks that the connection, not the session, is replaced after reconnecting.tool._connection. That's the object the tool reconnects through, but if you'd rather keep integration tests off private attributes, I can rework it.Verification:
search_agent_framework_docs. The tool lists and returns the expected text.LOCAL_MCP_URL=http://127.0.0.1:8011/mcp uv run pytest packages/core/tests/core/test_mcp.py -m integrationpasses (2 tests). Onmainboth fail withassert None is not None.test_mcp.pysuite still passes (512 tests), and pyright and mypy are clean on the script.Related Issue
Fixes #10075
AI Assistance
AI assistance details: Claude Code helped find the stale import with a type-check scan, port the server, update the integration tests, verify them against the local server, and draft this description.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.🤖 Generated with Claude Code