Repository navigation
Conversation
Closes the rename and the two changes that come with it. Import path and class: mcp.server.fastmcp.FastMCP -> mcp.server.mcpserver.MCPServer Client transport helper, in the two tests that use it: streamablehttp_client -> streamable_http_client Transport configuration. mcp 2.0 moved host and port off the constructor onto run() and the app factories, and Settings no longer carries them, so mcp.settings.host / mcp.settings.port raise on access. Both values are now read into module-level constants and used directly at the uvicorn call site. Behaviour and the NAVFLOW_MCP_HOST / NAVFLOW_MCP_PORT environment variables are unchanged. Dependency pin moved from mcp>=1.2,<2 to mcp>=2,<3. httpx is left alone deliberately. The SDK moved to httpx2, but that only affects objects handed to the SDK, and this project passes only a URL and headers to streamable_http_client. The httpx client here talks to navflowd and is unrelated.
This branch has not been 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.
Closes #45.
What changed
Import path and class
Client transport helper, in the two tests that use it
Transport configuration. This is the part worth reviewing. mcp 2.0 moved
hostandportoff the constructor ontorun()and the app factories, andSettingsno longer carries them, somcp.settings.hostandmcp.settings.portraise on access. Renaming the class alone would leave theserver unable to start.
Both values are now read into module-level constants and used directly at the
uvicorn call site:
NAVFLOW_MCP_HOSTandNAVFLOW_MCP_PORTbehave exactly as before.Pin moved from
mcp>=1.2,<2tomcp>=2,<3.Left alone deliberately
httpxstays as it is. The SDK moved tohttpx2, but that only affectsobjects handed to the SDK, and this project passes only a URL and headers to
streamable_http_client. The httpx client here talks to navflowd and isunrelated to the SDK.
Testing
I have not run the suite.
test_mcp_auth.pyandtest_mcp_remote.pyspawnnavflowdand bind ports, which I could not set up here. What I did verify isthat the changed files parse, that the only
mcp.settingsreference is the oneaddressed above, and that no other v1 import paths remain in the tree. Please
run CI before merging rather than taking my word for it.
Happy to adjust anything, including the constant names if you would rather they
live somewhere else.
The mechanical renames came from mcp-codemod, a tool I wrote for this migration. It flagged the host/port move rather than attempting it, so that part was done by hand.