Initial commit: Komodo MCP server

- KomodoClient for Komodo Core API
- MCP tools: list_servers, list_deployments, list_stacks, get_container_status
- Raw API pass-through: komodo_api_call
- API documentation resource: komodo://api-reference
- Docker multi-stage build with uv
This commit is contained in:
Ben
2025-12-20 20:40:49 +00:00
commit 72a53a64ed
10 changed files with 535 additions and 0 deletions

78
README.md Normal file
View File

@@ -0,0 +1,78 @@
# 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,localhost:*
ports:
- "8000:8000"
```
### Connect MCP Client
SSE endpoint: `https://your-host/sse`
## 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-sse
make stop
```
## Tech Stack
- Python 3.11+ / FastMCP / httpx
- SSE transport / uvicorn
- Docker with multi-stage build