We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/codester1000/raindrop-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
http-sse-implementation.mdā¢4.25 kB
## š Feature: Implement HTTP SSE Transport Support
### Summary
Implement full HTTP Server-Sent Events (SSE) transport support for the Raindrop MCP server following the latest Model Context Protocol specifications (2024-11-05).
### Background
The current implementation only supports STDIO transport, which limits deployment options and prevents web-based integrations. The MCP specification now recommends Streamable HTTP transport as the modern standard, while maintaining backwards compatibility with legacy SSE implementations.
### Goals
- [ ] Replace deprecated `SSEServerTransport` with modern `StreamableHTTPServerTransport`
- [ ] Implement proper session management with unique session IDs
- [ ] Add backwards compatibility support for legacy SSE clients
- [ ] Create comprehensive HTTP server with multiple endpoints
- [ ] Add CORS support for web client integration
- [ ] Implement health monitoring and API documentation endpoints
### Technical Requirements
#### 1. Modern Transport Implementation
- **Primary**: Use `StreamableHTTPServerTransport` for new clients
- **Fallback**: Maintain `SSEServerTransport` for legacy compatibility
- **Protocol**: Support MCP Protocol version 2024-11-05
- **Format**: JSON-RPC 2.0 compliant
#### 2. Session Management
- Generate unique session IDs using `randomUUID()`
- Track active sessions for both transport types
- Implement proper session cleanup on disconnect
- Support concurrent connections
#### 3. HTTP Endpoints
- `/mcp` - Modern Streamable HTTP transport (GET/POST/DELETE)
- `/sse` - Legacy SSE connection endpoint (GET)
- `/messages` - Legacy SSE message endpoint (POST)
- `/health` - Health check and status monitoring
- `/` - API documentation and server information
#### 4. Middleware and Features
- JSON request/response parsing with 50MB limit
- CORS headers for cross-origin web clients
- Request logging with session tracking
- Error handling with proper HTTP status codes
- Graceful shutdown handling
### Implementation Details
#### File Structure
```
src/
āāā http-server.ts # Main HTTP server implementation
āāā sse.ts # Enhanced legacy SSE server
āāā test-client.ts # Test client with auto-fallback
āāā services/
āāā mcp.service.ts # Existing MCP service (no changes)
```
#### Key Dependencies
- `@modelcontextprotocol/sdk` - Latest MCP SDK
- `express` - HTTP server framework
- `cors` support via middleware
- `uuid` for session ID generation
### Acceptance Criteria
- [ ] HTTP server starts successfully on configurable port
- [ ] Modern clients can connect via Streamable HTTP transport
- [ ] Legacy clients can connect via SSE transport
- [ ] Session management works for concurrent connections
- [ ] Health endpoint returns server status and session count
- [ ] API documentation endpoint provides usage information
- [ ] CORS enabled for web client integration
- [ ] Proper error handling and logging
- [ ] MCP Inspector integration works with HTTP transport
### Testing Requirements
- [ ] Unit tests for session management
- [ ] Integration tests for both transport types
- [ ] Test client that demonstrates auto-fallback
- [ ] Load testing for concurrent connections
- [ ] Health endpoint validation
- [ ] CORS functionality verification
### Documentation
- [ ] HTTP SSE setup guide
- [ ] API reference documentation
- [ ] Migration guide from STDIO to HTTP
- [ ] Troubleshooting guide
- [ ] Examples for different client types
### Benefits
1. **Web Integration**: Enable browser-based MCP clients
2. **Scalability**: Support multiple concurrent connections
3. **Future-Proof**: Use latest MCP transport specifications
4. **Backwards Compatible**: Existing SSE clients continue working
5. **Developer Experience**: Better tooling and debugging capabilities
### Breaking Changes
ā **None** - This is a backwards-compatible addition. Existing STDIO transport remains unchanged.
### Related Issues
- [ ] #XX - Add development scripts for HTTP server
- [ ] #XX - Create VS Code tasks for HTTP development
- [ ] #XX - Update documentation with HTTP transport examples
---
**Priority**: High
**Effort**: Medium
**Impact**: High - Enables web deployment and modern MCP integrations