feat: add /health endpoint and switch to fastmcp 2.0
All checks were successful
Build and Push Komodo MCP Docker Image / build (push) Successful in 42s
All checks were successful
Build and Push Komodo MCP Docker Image / build (push) Successful in 42s
- Switch from mcp package to fastmcp>=2.0 for Streamable HTTP support
- Fixes 405 Method Not Allowed for MCP clients like Gemini CLI
- MCP endpoint now at /mcp (POST) instead of /sse (GET)
- Removes MCP_ALLOWED_HOSTS (handled at reverse proxy level)
- Add /health endpoint for Docker health checks
- Returns {"status": "ok"} (200) or {"status": "degraded"} (503)
- Enables health checks without transport security issues
- Add curl to Docker image for health checks
- Add healthcheck config to docker-compose files
- Add test-health and test-mcp Makefile targets
- Update documentation
This commit is contained in:
18
README.md
18
README.md
@@ -33,7 +33,6 @@ A Model Context Protocol (MCP) server for [Komodo](https://komo.do/) Docker mana
|
||||
| `KOMODO_URL` | Yes | Komodo Core URL |
|
||||
| `KOMODO_API_KEY` | Yes | API key |
|
||||
| `KOMODO_API_SECRET` | Yes | API secret |
|
||||
| `MCP_ALLOWED_HOSTS` | No | Allowed Host headers |
|
||||
|
||||
### Deploy with Docker Compose
|
||||
|
||||
@@ -45,14 +44,21 @@ services:
|
||||
- KOMODO_URL=https://komodo.example.com
|
||||
- KOMODO_API_KEY=your-key
|
||||
- KOMODO_API_SECRET=your-secret
|
||||
- MCP_ALLOWED_HOSTS=komodo-mcp.example.io,localhost:*
|
||||
ports:
|
||||
- "8000:8000"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
```
|
||||
|
||||
### Connect MCP Client
|
||||
### Endpoints
|
||||
|
||||
SSE endpoint: `https://your-host/sse`
|
||||
| Endpoint | Method | Description |
|
||||
|----------|--------|-------------|
|
||||
| `/mcp` | POST | MCP protocol endpoint |
|
||||
| `/health` | GET | Health check for Docker |
|
||||
|
||||
## Local Development
|
||||
|
||||
@@ -67,12 +73,12 @@ make dev
|
||||
|
||||
# Test
|
||||
make logs
|
||||
make test-sse
|
||||
make test-mcp
|
||||
make stop
|
||||
```
|
||||
|
||||
## Tech Stack
|
||||
|
||||
- Python 3.11+ / FastMCP / httpx
|
||||
- SSE transport / uvicorn
|
||||
- Streamable HTTP transport / uvicorn
|
||||
- Docker with multi-stage build
|
||||
|
||||
Reference in New Issue
Block a user