Skip to content

Swap to the real FastMCP and streamable-http#24

Open
M4Al wants to merge 1 commit intovoska:masterfrom
M4Al:master
Open

Swap to the real FastMCP and streamable-http#24
M4Al wants to merge 1 commit intovoska:masterfrom
M4Al:master

Conversation

@M4Al
Copy link
Copy Markdown

@M4Al M4Al commented Aug 20, 2025

This is probably not what you want, but you can use this as inspiration to implement Streamable HTTP (sse compatible) for this MCP server.

@frzifus
Copy link
Copy Markdown

frzifus commented Nov 10, 2025

I think we should keep the stdio option and provide some kind of flag to expose the port.

Copy link
Copy Markdown

@TheLastFrame TheLastFrame left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe you could use an environment variable like this to keep the default behaviour, but also support standalone usage?

Comment thread app/run.py
Comment on lines +6 to +7
"""Run the MCP server with treamable-http communication"""
mcp.run(transport="streamable-http", host="0.0.0.0", port=8000)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""Run the MCP server with treamable-http communication"""
mcp.run(transport="streamable-http", host="0.0.0.0", port=8000)
if os.environ.get("STANDALONE", false):
"""Run the MCP server with streamable-http communication"""
mcp.run(transport="streamable-http", host="0.0.0.0", port=8000)
else:
"""Run the MCP server with stdio communication"""
mcp.run()

Comment thread app/__main__.py
Comment on lines +8 to +9
"""Run the MCP server with treamable-http communication"""
mcp.run(transport="streamable-http", host="0.0.0.0", port=8000)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""Run the MCP server with treamable-http communication"""
mcp.run(transport="streamable-http", host="0.0.0.0", port=8000)
if os.environ.get("STANDALONE", false):
"""Run the MCP server with streamable-http communication"""
mcp.run(transport="streamable-http", host="0.0.0.0", port=8000)
else:
"""Run the MCP server with stdio communication"""
mcp.run()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants