Komodo MCP 服务器
概览
一台为Komodo DevOps平台打造的Python MCP(模型上下文协议)服务器。直接通过像Claude这样的AI助手管理你的服务器、容器、堆栈、构建等等。 服务器在 / 处暴露一个可流式 HTTP 端点。 服务器支持 OAuth 2.1,并支持基于浏览器的登录页面。启用 OAuth 后,MCP 客户端在收到访问令牌前会被重定向到登录表单。 当OAuth处于激活状态时,服务器会暴露标准OAuth 2.1端点: : MCP 客户端 → /授权 → 浏览器打开 /login→用户输入密码→客户端接收 JWT 访问令牌(1小时)+ 刷新令牌(30天)。 没有配置OAuth,服务器会接受所有无需认证的连接。 服务器不保留会话状态,因此——不需要卷: - 访问和刷新令牌是自包含的JWT,通过自身签名声明进行验证。- 注册客户端的元数据存储在其client_id中,而本身也是一个签名的JWT。
概述(AI 翻译)
一台为Komodo DevOps平台打造的Python MCP(模型上下文协议)服务器。直接通过像Claude这样的AI助手管理你的服务器、容器、堆栈、构建等等。
使用FastMCP、uvicorn和httpx构建。
快速入门(Docker Compose)
连接到MCP客户端
服务器在 / 处暴露一个可流式 HTTP 端点。
Claude 代码(CLI):
Claude Desktop (claude_desktop_config.json):
认证
服务器支持 OAuth 2.1,并支持基于浏览器的登录页面。启用 OAuth 后,MCP 客户端在收到访问令牌前会被重定向到登录表单。
启用OAuth
设置三个变量:
当OAuth处于激活状态时,服务器会暴露标准OAuth 2.1端点:
| 终点 | 描述 |
|---|---|
/.well-known/oauth-authorization-server |
OAuth 元数据发现 |
/register |
动态客户端注册(RFC 7591) |
/authorize |
授权端点 — 重定向至 /login |
/login |
密码登录页面(浏览器) |
/token |
令牌端点 |
/revoke |
令牌撤销 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Komodo MCP Server
A Python MCP (Model Context Protocol) server for the Komodo DevOps platform. Manage your servers, containers, stacks, builds, and more — directly from AI assistants like Claude.
Built with FastMCP, uvicorn, and httpx.
Quick Start (Docker Compose)
services:
komodo-mcp:
image: ghcr.io/myrikld/komodo-mcp:latest
ports:
- "8000:8000"
environment:
- KOMODO_MCP_KOMODO_URL=https://your-komodo-instance.example.com
- KOMODO_MCP_KOMODO_API_KEY=your_api_key
- KOMODO_MCP_KOMODO_API_SECRET=your_api_secret
restart: unless-stopped
docker compose up -d
Connect to MCP Client
The server exposes a Streamable HTTP endpoint at /.
Claude Code (CLI):
claude mcp add -s user --transport http komodo http://localhost:8000/
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"komodo": {
"type": "http",
"url": "http://localhost:8000/"
}
}
}
Authentication
The server supports OAuth 2.1 with a browser-based login page. When OAuth is enabled, MCP clients are redirected to a login form before receiving an access token.
Enabling OAuth
Set all three variables:
KOMODO_MCP_OAUTH_JWT_SECRET=
KOMODO_MCP_OAUTH_PASSWORD=
KOMODO_MCP_BASE_URL=https://mcp.example.com # public URL of this server
When OAuth is active, the server exposes standard OAuth 2.1 endpoints:
| Endpoint | Description |
|---|---|
/.well-known/oauth-authorization-server |
OAuth metadata discovery |
/register |
Dynamic Client Registration (RFC 7591) |
/authorize |
Authorization endpoint — redirects to /login |
/login |
Password login page (browser) |
/token |
Token endpoint |
/revoke |
Token revocation |
Flow: MCP client → /authorize → browser opens /login → user enters password → client receives JWT access token (1h) + refresh token (30d).
Without OAuth configured, the server accepts all connections without authentication.
Restarts
The server keeps no session state, so restarting it does not log clients out — no volume required:
- Access and refresh tokens are self-contained JWTs, validated from their own signed claims.
- A registered client’s metadata is carried inside its
client_id, which is itself a signed JWT. - Everything is signed with a key derived from
KOMODO_MCP_OAUTH_JWT_SECRET. Keep that secret stable: changing it invalidates all tokens and client registrations, forcing every client to authorize again.
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"komodo": {
"type": "http",
"url": "http://localhost:8000/"
}
}
}