Skip to content

Commit 1e47b07

Browse files
committed
Update documentation for current implementation
- Update streamable-http-design.md with correct file references - Reflect current dual transport architecture (SSE + Streamable HTTP) - Update file paths to match actual implementation structure - Clarify stateful session management approach - Remove outdated research content, focus on current implementation
1 parent 40773bd commit 1e47b07

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

docs/streamable-http-design.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,30 @@
1-
# Design Document: Implementing Streamable HTTP Transport for Example Remote Server
1+
# Design Document: Streamable HTTP Transport Implementation
22

3-
## Research Summary
3+
## Current Implementation
44

5-
### Current SSE Transport Architecture
5+
### Dual Transport Architecture
66

7-
The example remote server currently uses the following architecture:
7+
The example remote server implements both transport methods:
88

9+
**Legacy SSE Transport:**
910
1. **SSE Endpoint**: `/sse` - Creates SSE connection using `SSEServerTransport`
1011
2. **Message Endpoint**: `/message` - Receives POST requests and forwards them via Redis
11-
3. **Redis Integration**: Messages are published/subscribed through Redis channels using session IDs
12-
4. **Auth**: Uses `requireBearerAuth` middleware with `EverythingAuthProvider`
13-
5. **Session Management**: Each SSE connection gets a unique session ID used as Redis channel key
12+
13+
**Modern Streamable HTTP Transport:**
14+
1. **Unified Endpoint**: `/mcp` - Handles GET, POST, DELETE with `StreamableHTTPServerTransport`
15+
2. **Stateful Sessions**: Requires initialization and session ID tracking
16+
3. **SSE Response Format**: Returns results via Server-Sent Events streams
17+
18+
**Shared Infrastructure:**
19+
1. **Redis Integration**: Messages published/subscribed through Redis channels using session IDs
20+
2. **Auth**: Uses `requireBearerAuth` middleware with mode-dependent auth providers
21+
3. **Session Management**: Session ownership tracked via Redis for multi-user isolation
1422

1523
**Key Files:**
16-
- `/src/index.ts:91` - SSE endpoint with auth and headers
17-
- `/src/handlers/mcp.ts:55-118` - SSE connection handler with Redis integration
18-
- `/src/handlers/mcp.ts:120-144` - Message POST handler
24+
- `/src/index.ts:156-162` - SSE and Streamable HTTP endpoints with auth
25+
- `/src/handlers/sse.ts` - SSE connection handler with Redis integration
26+
- `/src/handlers/shttp.ts` - Streamable HTTP handler
27+
- `/src/services/mcp.ts` - MCP server implementation with tools, resources, prompts
1928

2029
### Streamable HTTP Transport Specification (2025-03-26)
2130

0 commit comments

Comments
 (0)