feat(mcp): add streamable-http transport option#4
Merged
Conversation
FastMCP supports three transports today: stdio, sse, streamable-http. The server's main() only exposed stdio and sse — clients that ship a streamable-http MCP tool (e.g. the Microsoft Agent Framework's MCPStreamableHTTPTool) couldn't talk to the kg-mcp server without a custom bridge. Add streamable-http as a third option behind the same MCP_TRANSPORT env var. Five-line change in main(); nothing else needs to move. Recommended for new docker deployments: MCP_TRANSPORT=streamable-http is the cleanest interop with MAF agents and other modern hosts.
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
FastMCPsupports three transports today:stdio,sse, andstreamable-http. The server'smain()only exposedstdioandsse. Clients that ship a streamable-http MCP tool — e.g. the Microsoft Agent Framework'sMCPStreamableHTTPTool— couldn't talk tokg-mcpwithout a custom bridge.Change
Add
streamable-httpas a third option behind the sameMCP_TRANSPORTenv var. Five-line change inmain(); nothing else needs to move. The handlers and tool registry stay identical.```
MCP_TRANSPORT=stdio # default — Claude Desktop / Claude Code
MCP_TRANSPORT=sse # legacy streaming
MCP_TRANSPORT=streamable-http # NEW — modern HTTP transport
```
Why
Kairos's chat agent (MAF Haiku) currently calls the KG via a custom
httpxwrapper on/querybecause there was no straightforward way to wire MAF's MCP client to an SSE-only server. Withstreamable-httpavailable, the chat can use the proper MCP tool surface (kg_query,kg_search_nodes,kg_traverse) and inherit the upstream's tool documentation automatically — no bespoke client glue.Recommended deployment
For new docker deployments use
MCP_TRANSPORT=streamable-http. SSE stays available for callers that haven't migrated yet.🤖 Generated with Claude Code