-
Notifications
You must be signed in to change notification settings - Fork 39
Swap to the real FastMCP and streamable-http #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
I think we should keep the stdio option and provide some kind of flag to expose the port. |
TheLastFrame
left a comment
There was a problem hiding this 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?
| """Run the MCP server with treamable-http communication""" | ||
| mcp.run(transport="streamable-http", host="0.0.0.0", port=8000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| """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() |
| """Run the MCP server with treamable-http communication""" | ||
| mcp.run(transport="streamable-http", host="0.0.0.0", port=8000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| """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() |
This is probably not what you want, but you can use this as inspiration to implement Streamable HTTP (sse compatible) for this MCP server.