feat: add serve command to mount MCP as SSE server#239
Closed
ezyang wants to merge 2 commits intogh/ezyang/182/basefrom
Closed
feat: add serve command to mount MCP as SSE server#239ezyang wants to merge 2 commits intogh/ezyang/182/basefrom
ezyang wants to merge 2 commits intogh/ezyang/182/basefrom
Conversation
ezyang
added a commit
that referenced
this pull request
Apr 13, 2025
It is possible to mount the mcp to an SSE server. Add a new command 'codemcp serve' which mounts the MCP as an SSE server. Set CORS so claude.ai is allowed. Below is sample code how to do this. ```git-revs 5ef9e25 (Base revision) a65616f Snapshot before codemcp change 50c8fcb Add uvicorn and starlette as explicit dependencies 3262e89 Add imports for SSE server implementation dd5e30f Add create_sse_app function and serve CLI command 7882368 Add end-to-end test for serve command d9b4eef Add documentation for the serve command in README.md 1ce6649 Snapshot before auto-format c7911f9 Auto-commit format changes b87cc99 Auto-commit lint changes 83e50c0 Add main.py to ignoreExtraErrors for type checking 088e9c2 Add other modules to ignoreExtraErrors for type checking 9b988b4 Add requests as a dev dependency for tests a2b5170 Add sse_app method to FastMCP stub 58b418f Simplify test to avoid external dependency on requests HEAD Add pytest-asyncio as a dev dependency ``` codemcp-id: 252-feat-add-serve-command-to-mount-mcp-as-sse-server ghstack-source-id: 761a295 Pull-Request-resolved: #239
This was referenced Apr 13, 2025
Closed
Closed
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.
Stack from ghstack (oldest at bottom):
It is possible to mount the mcp to an SSE server. Add a new command 'codemcp serve' which mounts the MCP as an SSE server. Set CORS so claude.ai is allowed. Below is sample code how to do this.
codemcp-id: 252-feat-add-serve-command-to-mount-mcp-as-sse-server