🐳 Docker Mcp
Overview
What is Docker MCP?
Docker MCP (Model Context Protocol) is a server designed to facilitate the management and orchestration of containerized applications. It provides a standardized way to handle model contexts, allowing developers to deploy, manage, and scale their applications efficiently using Docker containers. Docker MCP is particularly useful for teams looking to streamline their development processes and improve collaboration across different environments.
Features of Docker MCP
- Container Management: Docker MCP simplifies the management of containers, enabling users to easily deploy, update, and scale applications.
- Standardized Protocol: It utilizes a standardized protocol for model contexts, ensuring compatibility and ease of integration with various tools and services.
- Scalability: The architecture of Docker MCP allows for seamless scaling of applications, accommodating increased loads without compromising performance.
- User-Friendly Interface: Docker MCP offers an intuitive interface that makes it easy for developers to interact with their containerized applications.
- Open Source: Being an open-source project, Docker MCP encourages community contributions and collaboration, fostering innovation and continuous improvement.
How to Use Docker MCP
- Installation: Begin by installing Docker on your machine. Follow the official Docker documentation for installation instructions.
- Clone the Repository: Use Git to clone the Docker MCP repository from GitHub:
git clone https://github.com/QuantGeekDev/docker-mcp.git
- Configuration: Navigate to the cloned directory and configure the necessary settings in the configuration files as per your project requirements.
- Run the Server: Start the Docker MCP server using Docker commands. Ensure that all dependencies are met and the environment is properly set up.
- Deploy Applications: Use the Docker MCP interface to deploy your applications, manage containers, and monitor performance.
- Scaling: As your application grows, utilize the scaling features of Docker MCP to handle increased traffic and resource demands.
Frequently Asked Questions
Q1: What are the system requirements for Docker MCP?
A1: Docker MCP requires a machine with Docker installed. It is recommended to have at least 4GB of RAM and a multi-core processor for optimal performance.
Q2: Is Docker MCP suitable for production environments?
A2: Yes, Docker MCP is designed to be robust and scalable, making it suitable for production environments. However, thorough testing is recommended before deployment.
Q3: Can I contribute to Docker MCP?
A3: Absolutely! Docker MCP is an open-source project, and contributions are welcome. You can submit issues, feature requests, or pull requests on the GitHub repository.
Q4: How does Docker MCP compare to other container orchestration tools?
A4: Docker MCP focuses on model context management and provides a user-friendly interface, making it easier for developers to manage their applications compared to some more complex orchestration tools.
Q5: Where can I find documentation for Docker MCP?
A5: Documentation for Docker MCP can be found in the repository's README file and additional resources linked within the repository.
Details
🐳 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 ❤️
Server Config
{
"mcpServers": {
"docker-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--quantgeekdev--docker-mcp--docker-mcp",
"docker-mcp"
],
"env": {}
}
}
}