Commit 5fa1825
Feat/http sse transport (#9)
* feat: add HTTP/SSE transport for remote MCP access
Add HTTP server with Server-Sent Events (SSE) transport to enable
remote access to the MCP server from Claude Code CLI and other clients.
Features:
- Modular architecture with separated concerns (auth, config, routes)
- API key authentication with multiple methods (Bearer, X-API-Key, query)
- Health check endpoint for monitoring
- Dual transport support (STDIO + HTTP/SSE)
- Railway deployment ready with Dockerfile
- Comprehensive documentation
New files:
- src/late/mcp/constants.py - Global constants
- src/late/mcp/config.py - Configuration management
- src/late/mcp/auth.py - API key authentication
- src/late/mcp/routes.py - Route handlers
- src/late/mcp/http_server.py - Main HTTP server
- Dockerfile - Container configuration for Railway
- .dockerignore - Docker build optimization
- docs/HTTP_DEPLOYMENT.md - Deployment guide
Modified:
- pyproject.toml - Added starlette, uvicorn dependencies
- server.py - Added main() function for STDIO entry point
- README.md - Added HTTP deployment documentation
- .env.example - Added MCP server configuration
* fix: resolve linting errors (UP045, ARG001)
- Replace Optional[X] with X | None for modern type hints
- Prefix unused request parameters with underscore
* fix: make Dockerfile compatible with Railway
- Add id parameter to cache mount (Railway requirement)
- Use PORT environment variable with fallback to 8080
- Remove HEALTHCHECK (Railway handles this externally)
* feat: configure Railway with Railpack instead of Dockerfile
- Add railway.toml with Railpack (NIXPACKS) configuration
- Rename Dockerfile to Dockerfile.docker to prevent auto-detection
- Railpack will auto-detect Python + uv from main.py
- Configure health check path and restart policy
* fix: include README.md in Docker build
README.md is required by hatchling build backend for the package
* fix: use Dockerfile for Railway deployment
- Configure railway.toml to use DOCKERFILE builder
- Restore Dockerfile with proper MCP extras installation
- Remove main.py wrapper (no longer needed)
- Keep pyproject.toml clean with optional dependencies
This approach is more explicit and reproducible than relying on
auto-detection from Railpack/Nixpacks.
---------
Co-authored-by: Carlos Martínez <carlimvg02@gmail.com>1 parent 637b459 commit 5fa1825
2 files changed
Lines changed: 2 additions & 14 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 6 | | |
11 | 7 | | |
12 | | - | |
13 | | - | |
14 | 8 | | |
15 | 9 | | |
0 commit comments