🎉 MCP Server Framework v1.2.0 - Complete HTTP Streams Transport
🎉 Major Feature Release
This release completes the HTTP Streams transport implementation that was documented in v1.1.0 but never fully committed to the repository.
✨ What's New
🔧 HTTP Streams Transport (/mcp endpoint)
- Full MCP Protocol Compliance: Complete implementation of HTTP Streams transport as per MCP specification
- Session Management: Secure session-based communication with UUID session IDs
- Bidirectional Communication: POST for client→server, SSE for server→client responses
- Health Endpoint: /health endpoint for service monitoring
- CORS Support: Full CORS headers for web client compatibility
- Security: ReadHeaderTimeout configuration, proper error handling
🧪 Comprehensive Testing Infrastructure
- 42 Unit Tests: All passing with race detection
- 3 Integration Test Scripts: Complete end-to-end testing for all transports
- test_stdio_integration.py - STDIO transport testing
- test_sse_integration.py - SSE transport testing
- test_http_streams_integration.py - HTTP Streams transport testing
- Parallel Testing: GitHub Actions matrix strategy for concurrent transport testing
- Make Targets: Individual and combined test targets for all transports
🔄 CI/CD Enhancements
- GitHub Actions Workflow: Matrix strategy testing all three transports in parallel
- Python Dependencies: Proper requests package configuration
- Go 1.21+ Support: Updated build requirements
- Linting Integration: golangci-lint with comprehensive checks
- Security Scan: Trivy vulnerability scanner with SARIF upload
- 3-Phase Workflow: Core tests → Builds → Release
🏗️ Architecture
HTTP Streams Transport Flow:
- Initialize: POST /mcp with MCP initialize message → Returns session ID
- SSE Stream: GET /mcp with session ID → Establishes server→client stream
- Messages: POST /mcp with session ID → Responses via SSE stream
- Health: GET /health → Service status monitoring
Session Management:
- Cryptographically secure UUID session IDs
- Thread-safe session storage with mutex protection
- Automatic cleanup on client disconnect
- Session validation for all requests
🧹 Code Quality Improvements
Major Refactoring:
- Reduced Complexity: Broke down complex functions into smaller helpers
- handleMessage → 7 helper functions
- handleSSEStream → 4 helper functions
- Error Handling: Comprehensive error checking for all operations
- Security: Added HTTP server timeouts, proper CORS handling
- Formatting: Applied gofmt to all files
- Linting: Fixed all golangci-lint issues (line length, error messages, style)
🧪 Test Results
✅ All Tests Passing:
Unit Tests: 42/42 PASSING
Integration Tests: 3/3 PASSING
- STDIO Transport: ✅ WORKING
- SSE Transport: ✅ WORKING
- HTTP Streams Transport: ✅ WORKING
Build: ✅ PASSING
Lint: ✅ PASSING (0 issues)
Security Scan: ✅ PASSING
📋 Transport Comparison
| Feature | STDIO | SSE | HTTP Streams |
|---|---|---|---|
| Use Case | CLI tools | Web apps | Web apps |
| Communication | Bidirectional | Bidirectional | Bidirectional |
| Client→Server | stdin | POST /message | POST /mcp |
| Server→Client | stdout | SSE /sse | SSE /mcp |
| Session Management | Process-based | Session ID | Session ID |
| CORS Support | N/A | ✅ | ✅ |
| Health Check | N/A | /health | /health |
🔧 Usage Examples
HTTP Streams Transport:
# Start server
./mcp-server -transport http-streams -port 8080
# Initialize session
curl -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test-client","version":"1.0.0"}}}'
# Connect to SSE stream (use session ID from above)
curl -N http://localhost:8080/mcp?session=SESSION_ID
# Send messages
curl -X POST http://localhost:8080/mcp?session=SESSION_ID \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'All Transport Testing:
# Test all transports
make test-all-transports
# Test individual transports
make test-stdio
make test-sse
make test-http-streams🚀 Breaking Changes
None - this is a purely additive release that completes missing functionality.
📦 Assets
This release includes pre-built binaries for:
- Linux (amd64, arm64)
- macOS (amd64, arm64)
- Windows (amd64, arm64)
All binaries are statically linked and ready to use.
Full Changelog: v1.1.0...v1.2.0