docker-mcp
Docker MCP Server(docker-mcp)
Model Context Protocol(MCP)サーバーです。Docker Engine および Docker Compose 環境を調査、オーケストレーション、トラブルシューティングするための高効率なツールを提供します。
@thargy/mcp-server-core を基盤として、John Ousterhout の Deep Module 哲学(A Philosophy of Software Design)に従っています。
1. アーキテクチャのビジョン:Deep Module 対ツールの肥大化
従来の MCP サーバーは Docker CLI のコマンドと 1:1 で対応しており、25+ もの浅いツールを生成していました。そのため LLM のコンテキストウィンドウが肥大化し(1ターンあたり 4,000 以上のプロンプトトークンを消費)、ハルシネーションも増加します。
docker-mcp は、ポリモーフィックな型付きアクション判別子を持つ統合された 6 つの高効率ツールのみを公開し、消費トークンは1,000 未満です。
graph LR
subgraph Clients ["MCP Clients"]
Claude["Claude Desktop (Stdio)"]
Agent["Antigravity / Coding Agents"]
Gateway["mcp-gateway (SSE / Streamable HTTP)"]
end
subgraph DeepModule ["docker-mcp (Deep Module)"]
T1["docker_containers"]
T2["docker_compose"]
T3["docker_images"]
T4["docker_volumes"]
T5["docker_networks"]
T6["docker_system"]
Seam["IDockerClient Seam"]
Engine["DockerodeClient / InMemoryDockerClient"]
end
subgraph Host ["Docker Infrastructure"]
Socket["/var/run/docker.sock"]
RemoteTCP["tcp://remote-host:2376"]
RemoteSSH["ssh://user@remote-host"]
end
Clients --> DeepModule
DeepModule --> Seam
Seam --> Engine
Engine --> Host2. 統合されたMCPツールカタログ
Tool | Actions | Capabilities & Highlights |
|
| 名前・ステータスの正規表現フィルタリング、リアルタイムの CPU/RAM 計算、多重化された stdout/stderr ログ抽出、コマンド実行、安全なタイムアウト。 |
|
| ラベル・ディレクトリによるマルチコンテナスタックの検出、ライフサイクルオーケストレーション、ヘルスチェックによる準備完了確認。 |
|
| イメージ一覧、仮想サイズのフォーマット、タグ解決、d指しオヤイメージのクリーンアップ。 |
|
| 永続ボリュームのカタログ、ドライバーの検査、孤児ボリュームの prune。 |
|
| bridge・overlay・macvlan ネットワークのトポロジー検査とサブネット解決。 |
|
| デーモンのヘルスチェック、エンジンバージョン、ディスク使用量の内訳、システム全体の領域回収。 |
3. クイックスタートと設定
環境変数
変数 | デフォルト | 説明 |
|
| HTTP / SSE のリッスンポート |
|
| バインドアドレス |
| 任意 | HTTP / SSE での Bearer 認証用シークレットトークン |
|
| ローカル Unix Docker ソケットへのパス |
| 任意 | リモート Docker TCP URL(例: |
| 任意 | TLS 証明書の検証を有効化( |
| 任意 | クライアント TLS 証明書へのパス( |
Stdio での実行(Claude Desktop / ローカル CLI)
{
"mcpServers": {
"docker": {
"command": "node",
"args": ["/Users/craigdean/Repos/docker-mcp/dist/src/index.js"],
"env": {
"DOCKER_SOCKET": "/var/run/docker.sock"
}
}
}
}Docker Compose と mcp-gateway での実行
docker compose up -d --buildHTTP SSE には http://localhost:3008/docker/mcp または http://www.localhost:3008/docker/sse でアクセスできます。
4.テストとコومド品質
ユニットテストの 100% が InMemoryDockerClient に対して実行されるため、実際のDocker ソケットは必要ありません。
# Run unit tests
npm test
# Run test coverage (>85% required)
npm run test:coverage
# TypeScript compile check
npm run types:checkライセンス
MIT © 2026 Craig Dean
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Free MCP tools: the only MCP linter, health checks, cost estimation, and trust evaluation.
Official Sevalla MCP — full PaaS API access through just 2 tools.
34 production API tools over one hosted MCP endpoint.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/thargy/docker-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server