Skip to content

feat: Add Streamable HTTP transport support#19

Open
debowd wants to merge 3 commits intobnb-chain:mainfrom
debowd:jadwd/streamable-http-support
Open

feat: Add Streamable HTTP transport support#19
debowd wants to merge 3 commits intobnb-chain:mainfrom
debowd:jadwd/streamable-http-support

Conversation

@debowd
Copy link

@debowd debowd commented Nov 9, 2025

feat: Add Streamable HTTP transport support

Summary

  • Implemented Streamable HTTP transport (protocol 2025-03-26) alongside existing SSE transport.
  • Added production-ready features: session TTL, method guards, and Accept-header validation.
  • Split server logic into dedicated transport files for cleaner separation.
  • Updated documentation across all MCP clients.

Changes

  • Added src/server/http.ts for Streamable HTTP transport.
  • Simplified src/server/sse.ts to handle SSE only.
  • Updated src/index.ts to include --http and --sse flags.
  • Added end-to-end tests for the HTTP transport.
  • Updated README with configuration and usage examples.

Test Plan

  • All HTTP transport e2e tests pass
  • Verified with Claude Desktop
  • Verified with n8n (Docker)
  • Verified with curl
  • Tested with MCP Inspector (via Proxy)

  - 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
@debowd
Copy link
Author

debowd commented Nov 20, 2025

Hi, just politely bumping this PR. Would love any feedback when you have time! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant