
MCP server for Docker Swarm orchestration using FastAPI and Docker SDK
概览
Finally, a production-ready MCP that gives you full Docker Swarm control without drowning your AI in tool descriptions. After searching the MCP ecosystem, I found: - ❌ Regular Docker MCPs with limited functionality (containers only, localhost only) - ❌ Portainer MCP that only works with CE (not BE/EE) - ❌ No proper Swarm support anywhere - ❌ All existing servers dump 20+ tools into your agents context window This server fills that gap with: - ✅ - Services, stacks, configs, secrets - ✅ - Only shows tools you need (2-6 instead of 23) - ✅ - Bearer tokens, TLS, remote Docker support, Tailscale Integration (coming soon) - ✅ - Just the tools you need, when you need them, filtered by the task at hand. Note on secrets and client config: - Do not commit secrets. Use environment variables (e.g., MCP_ACCESS_TOKEN), Docker secrets, or a secret manager. - The .kilocode/ directory is gitignored. If you need a local MCP client config, copy mcp.client.json.
README
以下为原文 README 节选,完整内容请查看原文。
🐳 Docker Swarm MCP Server
The missing MCP server for Docker Swarm. Finally, a production-ready MCP that gives you full Docker Swarm control without drowning your AI in tool descriptions.
🎯 Why This Exists
The Gap: After searching the MCP ecosystem, I found:
- ❌ Regular Docker MCPs with limited functionality (containers only, localhost only)
- ❌ Portainer MCP that only works with CE (not BE/EE)
- ❌ No proper Swarm support anywhere
- ❌ All existing servers dump 20+ tools into your agents context window
The Solution: This server fills that gap with:
- ✅ Full Docker Swarm support - Services, stacks, configs, secrets
- ✅ Smart context preservation - Only shows tools you need (2-6 instead of 23)
- ✅ Production security - Bearer tokens, TLS, remote Docker support, Tailscale Integration (coming soon)
- ✅ No bloat - Just the tools you need, when you need them, filtered by the task at hand.
Note on secrets and client config:
- Do not commit secrets. Use environment variables (e.g., MCP_ACCESS_TOKEN), Docker secrets, or a secret manager.
- The .kilocode/ directory is gitignored. If you need a local MCP client config, copy mcp.client.json.example to your local tooling and set Authorization to use a runtime value like
Bearer ${MCP_ACCESS_TOKEN}.
🚀 Quick Start (2 Minutes)
1️⃣ Deploy to Your Swarm
# Save this as docker-swarm-mcp.yml (or use one of the examples below)
# Deploy to your swarm
docker stack deploy -c docker-swarm-mcp.yml mcp-server
# Verify it's running
docker service logs mcp-server_docker-mcp
version: '3.8'
services:
docker-mcp:
image: ghcr.io/khaentertainment/docker-swarm-mcp:latest
environment:
- MCP_ACCESS_TOKEN_FILE=/run/secrets/mcp_token
- LOG_LEVEL=INFO
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"docker-swarm-mcp": {
"transport": {
"type": "http",
"url": "http://localhost:8000/mcp/",
"headers": {
"Authorization": "Bearer <YOUR_SECURE_TOKEN_HERE>"
}
}
}
}
}