Docker MCP
Docker MCP
SSH経由でのリモートDocker管理 — GitHub Copilotセッション用のローカルMCPサーバーとして公開されます。
サーバー側のコンポーネントは不要です。MCPはローカルで実行され、SSHでリモートホストに接続してDockerコマンドを実行します。
ツール
ツール | 説明 |
| コンテナの一覧表示 |
| ログの取得 (tail, since, grep) |
| コンテナ内でのコマンド実行 |
| 新しいコンテナの起動 |
| ライフサイクル制御 |
| コンテナの削除 |
| コンテナ/イメージの詳細情報 |
| リソース使用状況のスナップショット |
| コンテナ内のプロセス |
| イメージの一覧表示 |
| イメージ管理 |
| Compose操作 |
| ディスク使用量 |
| システム情報 |
| ネットワークとボリュームの一覧表示 |
Related MCP server: dokploy-logs
セットアップ
1. リポジトリのクローン
git clone git@github.com:Isak-Landin/mcp-docker-engine.git ~/mcp-docker-engine
cd ~/mcp-docker-engine任意のディレクトリにクローンできます。
~/mcp-docker-engineを好みのパスに置き換えてください。ステップ5でも同じパスを使用します。
2. 依存関係のインストール
sudo apt install python3.12-venv
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt3. SSHターゲットの設定
cp config.example.json config.json
# Edit config.json with your server detailsconfig.json のフィールド:
{
"host": "your-server.example.com",
"user": "ubuntu",
"key_path": "~/.ssh/id_rsa",
"port": 22
}実行時に設定パスを上書き:
DOCKER_MCP_CONFIG=/other/path/config.json .venv/bin/python3 server.py4. SSHアクセスの確認
ssh -i ~/.ssh/id_rsa ubuntu@your-server.example.com docker ps5. GitHub Copilotへの登録
クローンしたディレクトリの絶対パスを使用してください。~/mcp-docker-engine を使用した場合は、echo ~/mcp-docker-engine を実行してフルパスを取得し、以下に代入してください。
MCPサーバーの設定
GitHub Copilot CLI (~/.config/github-copilot/mcp.json) — 既存の mcpServers オブジェクトに追加するか、ファイルを作成してください:
"docker-mcp": {
"command": "/your/path/to/mcp-docker-engine/.venv/bin/python3",
"args": ["/your/path/to/mcp-docker-engine/server.py"]
}VS Code / Copilot in VS Code (.vscode/mcp.json またはユーザー設定) — 既存の servers オブジェクトに追加するか、ファイルを作成してください:
"docker-mcp": {
"type": "stdio",
"command": "/your/path/to/mcp-docker-engine/.venv/bin/python3",
"args": ["/your/path/to/mcp-docker-engine/server.py"]
}Copilotの指示
instructions.md には、全26ツールの使用例が含まれています。以下のいずれかが可能です:
既存のCopilot指示ファイル(例:
.github/copilot-instructions.mdやワークスペースの指示)に内容を追加するまだ指示ファイルがない場合は、そのまま使用する
注意事項
SSH接続には
StrictHostKeyChecking=accept-newを使用しています。既知のホストに対しては安全ですが、キーが変更された場合は警告が表示されます。docker_buildとdocker_pullは5〜10分のタイムアウトを使用します。必要に応じてserver.pyのtimeoutを調整してください。Composeツールの場合、
project_dirはdocker-compose.ymlを含むリモートパスです。docker_logsとdocker_execはstderrをstdoutにリダイレクトするため、出力は常にキャプチャされます。
This server cannot be deployed
Maintenance
Related MCP Connectors
Termalin's hosted MCP server. Claude, ChatGPT or any MCP client runs commands, moves files over SFTP, queries databases and reads server metrics and monitoring alerts on your servers, keylessly through Termalin Connectors: no SSH key is handed over and no inbound port is opened. Per-host command policy and an audit log. Needs a termal.in Pro or Team account (new accounts start with a 14-day Pro trial).
Manage CloudPepper servers, Odoo instances, backups, and deployments over MCP.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
1Secure tunneling, reverse proxy and remote access for local applications.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables secure Docker command execution from isolated environments like containers through MCP protocol. Provides tools for managing Docker containers, images, and Docker Compose services with security validation and async operation support.MIT
- -licenseNot gradedqualityNot gradedmaintenanceEnables reading Docker container logs and stats from remote servers via SSH, supporting container listing, log retrieval, stats, inspection, and Docker Compose logs.-
- FlicenseNot gradedqualityDmaintenanceManages Docker containers, images, and Compose stacks on a remote host over SSH, with file sync and deploy orchestration.-
- FlicenseNot gradedqualityFmaintenanceEnables Docker container management and test execution via MCP tools, supporting image building, container operations, and automated test runs.-