feat: Add Streamable HTTP transport support#19
Open
debowd wants to merge 3 commits intobnb-chain:mainfrom
Open
feat: Add Streamable HTTP transport support#19debowd wants to merge 3 commits intobnb-chain:mainfrom
debowd wants to merge 3 commits intobnb-chain:mainfrom
Conversation
- Add StreamableHTTPServerTransport alongside existing SSE transport for backward compatibility - Implement /mcp endpoint for Streamable HTTP (protocol 2025-03-26) - Add separate commands: dev:http (HTTP only) and dev:sse (both HTTP + SSE) - Update @modelcontextprotocol/sdk to v1.21.1 - Update all dependencies to latest versions (viem, zod, typescript, etc.) - Update README with configuration examples for Cursor, Claude Desktop, Claude Code, and n8n - Document new Streamable HTTP as recommended approach over deprecated SSE This change enables modern MCP clients to use the recommended Streamable HTTP transport while maintaining backward compatibility with SSE-based clients.
- Add Streamable HTTP transport (protocol 2025-03-26) in src/server/http.ts - Keep SSE transport (protocol 2024-11-05) in src/server/sse.ts for backward compatibility - Add separate commands: dev:http (Streamable HTTP) and dev:sse (SSE) - Add HTTP transport end-to-end test - Implement session TTL (15min) with automatic cleanup - Add method guards (405) and Accept header validation (406) - Update @modelcontextprotocol/sdk to v1.21.1 - Update all dependencies to latest versions - Update README with configuration examples for all clients This enables modern MCP clients to use the recommended Streamable HTTP transport while maintaining backward compatibility with SSE-based clients.
- Update all client configurations (Cursor, Claude Desktop, Claude Code) to use --http flag as recommended transport - Simplify Claude Code setup command - Fix PORT environment variable comment to reflect usage in both HTTP and SSE modes - Update dependencies
Author
|
Hi, just politely bumping this PR. Would love any feedback when you have time! Thanks! |
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.
feat: Add Streamable HTTP transport support
Summary
Changes
src/server/http.tsfor Streamable HTTP transport.src/server/sse.tsto handle SSE only.src/index.tsto include--httpand--sseflags.Test Plan