feat(mcp): add streamable HTTP MCP transport#1773
Open
rodboev wants to merge 3 commits into
Open
Conversation
Contributor
PR governanceThis PR follows the template and is marked ready for human review. |
JerrettDavis
approved these changes
Jul 3, 2026
JerrettDavis
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed the HTTP transport wiring, CLI surface, docs, and tests. Stdio remains the default, the HTTP mode reuses the existing MCP server/tool registration, path handling is explicit, and the SDK initialize/list-tools test gives useful coverage of the transport contract. Current PR checks are green; this looks ready.
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.
Description
headroom mcp serveonly exposes stdio today, which blocks MCP clients that need a Streamable HTTP endpoint. This adds an explicit HTTP transport mode around the existing Headroom MCP server while leaving stdio as the default and keeping tool registration single-sourced. Closes #1346.Type of Change
Changes Made
headroom mcp serve --transport httpsupport with host, port, and path options.headroom_compress,headroom_retrieve, andheadroom_statstools through the same MCP server instance used by stdio.headroom mcp servedefaulting to stdio for current Claude Code and local MCP host configs./mcp.Testing
uv run pytest tests/test_ccr_mcp_http.py tests/test_cli/test_mcp.py -q)uv run ruff check headroom/cli/mcp.py headroom/ccr/mcp_server.py headroom/ccr/mcp_http.py tests/test_ccr_mcp_http.py tests/test_cli/test_mcp.py)uv run mypy headroom --ignore-missing-imports)Test Output
Real Behavior Proof
headroom mcp serve --transport http --host 127.0.0.1 --port <test-port> --path /mcp, then perform an MCP SDK Streamable HTTP initialize/list-tools exchange.headroom mcp servewithout--transportstill selects stdio, and mixed-case--transport HTTProutes to the HTTP transport.Review Readiness
Checklist
Additional Notes
CHANGELOG.mdis not edited because this repository generates changelog entries from conventional commits. The HTTP proof is scoped to the MCP Python SDK transport contract and does not claim live validation against every external MCP host.Focused MCP and CLI tests passed locally; full-suite validation is left to CI.