🐳 Docker Mcp
概要
Docker MCPとは?
Docker MCP(Model Context Protocol)は、コンテナ化されたアプリケーションの管理とオーケストレーションを促進するために設計されたサーバーです。モデルコンテキストを扱うための標準化された方法を提供し、開発者がDockerコンテナを使用してアプリケーションを効率的に展開、管理、スケールできるようにします。Docker MCPは、開発プロセスを合理化し、異なる環境間でのコラボレーションを改善したいチームに特に役立ちます。
Docker MCPの特徴
- コンテナ管理:Docker MCPはコンテナの管理を簡素化し、ユーザーがアプリケーションを簡単に展開、更新、スケールできるようにします。
- 標準化されたプロトコル:モデルコンテキストのための標準化されたプロトコルを利用し、さまざまなツールやサービスとの互換性と統合の容易さを確保します。
- スケーラビリティ:Docker MCPのアーキテクチャは、アプリケーションのシームレスなスケーリングを可能にし、パフォーマンスを損なうことなく負荷の増加に対応します。
- ユーザーフレンドリーなインターフェース:Docker MCPは直感的なインターフェースを提供し、開発者がコンテナ化されたアプリケーションと簡単に対話できるようにします。
- オープンソース:オープンソースプロジェクトであるDocker MCPは、コミュニティの貢献とコラボレーションを奨励し、革新と継続的な改善を促進します。
Docker MCPの使い方
- インストール:まず、マシンにDockerをインストールします。公式のDockerドキュメントに従ってインストール手順を確認してください。
- リポジトリのクローン:Gitを使用して、GitHubからDocker MCPリポジトリをクローンします:
git clone https://github.com/QuantGeekDev/docker-mcp.git
- 設定:クローンしたディレクトリに移動し、プロジェクトの要件に応じて設定ファイルの必要な設定を行います。
- サーバーの起動:Dockerコマンドを使用してDocker MCPサーバーを起動します。すべての依存関係が満たされ、環境が適切に設定されていることを確認してください。
- アプリケーションの展開:Docker MCPインターフェースを使用してアプリケーションを展開し、コンテナを管理し、パフォーマンスを監視します。
- スケーリング:アプリケーションが成長するにつれて、Docker MCPのスケーリング機能を利用して、増加するトラフィックやリソースの要求に対応します。
よくある質問
Q1: Docker MCPのシステム要件は何ですか?
A1: Docker MCPは、Dockerがインストールされたマシンを必要とします。最適なパフォーマンスのために、少なくとも4GBのRAMとマルチコアプロセッサを持つことを推奨します。
Q2: Docker MCPは本番環境に適していますか?
A2: はい、Docker MCPは堅牢でスケーラブルに設計されており、本番環境に適しています。ただし、展開前に十分なテストを行うことをお勧めします。
Q3: Docker MCPに貢献できますか?
A3: もちろんです!Docker MCPはオープンソースプロジェクトであり、貢献を歓迎します。GitHubリポジトリで問題の報告、機能リクエスト、またはプルリクエストを提出できます。
Q4: Docker MCPは他のコンテナオーケストレーションツールと比較してどうですか?
A4: Docker MCPはモデルコンテキスト管理に焦点を当てており、ユーザーフレンドリーなインターフェースを提供しているため、より複雑なオーケストレーションツールと比較して開発者がアプリケーションを管理しやすくなっています。
Q5: Docker MCPのドキュメントはどこにありますか?
A5: Docker MCPのドキュメントは、リポジトリのREADMEファイルとリポジトリ内のリンクされた追加リソースにあります。
詳細
🐳 docker-mcp
A powerful Model Context Protocol (MCP) server for Docker operations, enabling seamless container and compose stack management through Claude AI.
✨ Features
- 🚀 Container creation and instantiation
- 📦 Docker Compose stack deployment
- 🔍 Container logs retrieval
- 📊 Container listing and status monitoring
🎬 Demos
Deploying a Docker Compose Stack
https://github.com/user-attachments/assets/b5f6e40a-542b-4a39-ba12-7fdf803ee278
Analyzing Container Logs
https://github.com/user-attachments/assets/da386eea-2fab-4835-82ae-896de955d934
🚀 Quickstart
To try this in Claude Desktop app, add this to your claude config files:
{
"mcpServers": {
"docker-mcp": {
"command": "uvx",
"args": [
"docker-mcp"
]
}
}
}
Installing via Smithery
To install Docker MCP for Claude Desktop automatically via Smithery:
npx @smithery/cli install docker-mcp --client claude
Prerequisites
- UV (package manager)
- Python 3.12+
- Docker Desktop or Docker Engine
- Claude Desktop
Installation
Claude Desktop Configuration
Add the server configuration to your Claude Desktop config file:
MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"docker-mcp": {
"command": "uv",
"args": [
"--directory",
"<path-to-docker-mcp>",
"run",
"docker-mcp"
]
}
}
}
</details>
<details>
<summary>🚀 Production Configuration</summary>
{
"mcpServers": {
"docker-mcp": {
"command": "uvx",
"args": [
"docker-mcp"
]
}
}
}
</details>
🛠️ Development
Local Setup
- Clone the repository:
git clone https://github.com/QuantGeekDev/docker-mcp.git
cd docker-mcp
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
uv sync
🔍 Debugging
Launch the MCP Inspector for debugging:
npx @modelcontextprotocol/inspector uv --directory <path-to-docker-mcp> run docker-mcp
The Inspector will provide a URL to access the debugging interface.
📝 Available Tools
The server provides the following tools:
create-container
Creates a standalone Docker container
{
"image": "image-name",
"name": "container-name",
"ports": {"80": "80"},
"environment": {"ENV_VAR": "value"}
}
deploy-compose
Deploys a Docker Compose stack
{
"project_name": "example-stack",
"compose_yaml": "version: '3.8'\nservices:\n service1:\n image: image1:latest\n ports:\n - '8080:80'"
}
get-logs
Retrieves logs from a specific container
{
"container_name": "my-container"
}
list-containers
Lists all Docker containers
{}
🚧 Current Limitations
- No built-in environment variable support for containers
- No volume management
- No network management
- No container health checks
- No container restart policies
- No container resource limits
🤝 Contributing
- Fork the repository from docker-mcp
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
✨ Authors
- Alex Andru - Initial work | Core contributor - @QuantGeekDev
- Ali Sadykov - Initial work | Core contributor - @md-archive
Made with ❤️
サーバー設定
{
"mcpServers": {
"docker-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--quantgeekdev--docker-mcp--docker-mcp",
"docker-mcp"
],
"env": {}
}
}
}