Feature/issue 23 http factory - #36
Open
jpsiddharth2008 wants to merge 2 commits into
Open
jpsiddharth2008 wants to merge 2 commits into
jpsiddharth2008 wants to merge 2 commits into
Conversation
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.
What this does
mcpSDK became the sole owner of/mcp, but four era-dependent behaviors were left disagreeing between the two engines that used to share it.resources.subscribenow comes from one source (protocol_era != "modern") shared byNitroStackMcpServer.get_capabilities(),server/discover, and the real_subscribe_resourcehandler — previouslyget_capabilities()hardcodedTrueanddiscoverhardcodedFalse, both wrong for at least one era./json/versionnow reportsprotocol_version_for_era(protocol_era)instead of a hardcoded2025-06-18.CORSMiddlewareinbuild_http_app— and it now actually readsMCP_CORS_ALLOWED_ORIGINSinstead of hardcodingallow_origins=["*"].stdio.py'smodernera loop no longer imports the privatemcp.server.runner._serve_modern_stream; rebuilt from publicmcp.server.runnerAPIs (JSONRPCDispatcher,modern_on_request,Connection,ServerRunner,NotifyOnlyOutbound,aclose_shielded).Test plan
pytest tests/test_transport_http.py tests/test_lifecycle_http.py tests/test_mcp20_stdio.py tests/test_transports.py -q— the issue's own verify command → 31 passedpytest tests/test_mcp23_http_factory.py tests/test_mcp22_official_http_owner.py -v— new tests covering the issue's 5-point checklist, plus [mcp-2026] Remove JSON-RPC sidecar; one /mcp owner #34's regression tests → 15 passedexamples/calculator_server.pywithNITRO_MCP_PROTOCOL_VERSION=modern|auto|legacyand confirmGET /json/versionandserver/discover'sresources.subscribetrack the chosen era