Add stdio entrypoint so server can be launched directly#4
Open
danilobrando wants to merge 1 commit intoadelaidasofia:mainfrom
Open
Add stdio entrypoint so server can be launched directly#4danilobrando wants to merge 1 commit intoadelaidasofia:mainfrom
danilobrando wants to merge 1 commit intoadelaidasofia:mainfrom
Conversation
Without this, `python3 server.py` loads the module but never starts the MCP server, and Claude Code reports `Failed to connect`. Verified locally: after the patch, the server responds to MCP `initialize` on stdio and shows up as connected in `claude mcp list`.
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.
Summary
server.pydefines the FastMCP instance and 29 tools, but has no__main__block — runningpython3 server.pyloads the module without starting the server. Claude Code (and any MCP client following the README) reportsFailed to connect.Repro
Sending an MCP
initializeJSON-RPC over stdio also returns no response — the process exits as soon as stdin closes because nothing is reading from it.Fix
Add the standard FastMCP stdio entrypoint at the end of
server.py:show_banner=Falsekeeps stdout clean for the MCP protocol (FastMCP prints to stderr by default, but the banner can leak into stdout in some setups).Verified
After the patch:
And
test_connectionreturns the expected profile payload over the live MCP transport.