Files
komodo-mcp-custom/README.md
Ben bf80ae577e
All checks were successful
Build and Push Komodo MCP Docker Image / build (push) Successful in 14s
feat: add /health endpoint and switch to Streamable HTTP transport
- Switch from legacy SSE transport (sse_app) to Streamable HTTP (http_app)
  - Fixes 405 Method Not Allowed for MCP clients like Gemini CLI
  - MCP endpoint now at /mcp (POST) instead of /sse (GET)

- Add /health endpoint that bypasses MCP_ALLOWED_HOSTS validation
  - Returns {"status": "ok"} (200) or {"status": "degraded"} (503)
  - Enables Docker health checks without exposing to external hosts

- 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
2025-12-20 22:30:56 +00:00

87 lines
1.9 KiB
Markdown

# Komodo MCP Server
A Model Context Protocol (MCP) server for [Komodo](https://komo.do/) Docker management.
## Features
- **Curated Tools**: High-level tools for common operations
- **Raw API Access**: Pass-through tool for 100% API coverage
- **API Docs Resource**: Built-in reference for AI agents
## Tools
| Tool | Description |
|------|-------------|
| `list_servers` | Lists all periphery servers |
| `list_deployments` | Lists deployments (containers) |
| `list_stacks` | Lists stacks (docker-compose) |
| `get_container_status` | Gets container details |
| `komodo_api_call` | Raw API pass-through |
## Resources
| Resource | Description |
|----------|-------------|
| `komodo://api-reference` | API documentation |
## Configuration
### Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| `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
```yaml
services:
komodo-mcp:
image: gitea.ext.ben.io/b3nw/komodo-mcp:latest
environment:
- KOMODO_URL=https://komodo.example.com
- KOMODO_API_KEY=your-key
- KOMODO_API_SECRET=your-secret
- MCP_ALLOWED_HOSTS=komodo-mcp.example.io
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
```
### Endpoints
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/mcp` | POST | MCP protocol endpoint |
| `/health` | GET | Health check (bypasses `MCP_ALLOWED_HOSTS`) |
## Local Development
```bash
# Setup
cp .env.example .env
# Edit .env with your credentials
# Build and run
make build
make dev
# Test
make logs
make test-mcp
make stop
```
## Tech Stack
- Python 3.11+ / FastMCP / httpx
- Streamable HTTP transport / uvicorn
- Docker with multi-stage build