1- # docker-mcp MCP server
1+ # 🐳 docker-mcp
22
3- Docker MCP server
4- Supports instantiating containers, and docker compose operations
3+ [ ![ Python 3.12] ( https://img.shields.io/badge/python-3.12-blue.svg )] ( https://www.python.org/downloads/release/python-3120/ )
4+ [ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( https://opensource.org/licenses/MIT )
5+ [ ![ Code style: black] ( https://img.shields.io/badge/code%20style-black-000000.svg )] ( https://github.com/psf/black )
56
6- ## Quickstart
7+ A powerful Model Context Protocol (MCP) server for Docker operations, enabling seamless container and compose stack management through Claude AI.
78
8- ### Install
9+ ## ✨ Features
910
10- #### Claude Desktop
11+ - 🚀 Container creation and instantiation
12+ - 📦 Docker Compose stack deployment
13+ - 🔍 Container logs retrieval
14+ - 📊 Container listing and status monitoring
15+ - 🧹 Automatic cleanup of temporary files
16+ - ♻️ Automatic image pulling
1117
12- On MacOS: ` ~/Library/Application\ Support/Claude/claude_desktop_config.json `
13- On Windows: ` %APPDATA%/Claude/claude_desktop_config.json `
18+ ### 🎬 Demos
19+ #### Deploying a Docker Compose Stack
20+
21+ <a href =" https://streamable.com/0fz6kn " target =" _blank " >
22+ <img src="https://cdn-cf-east.streamable.com/image/0fz6kn.jpg?Expires=1733623440&Signature=PIYLK6wY6HM~9kPqmmpabnjHoObDdz9MgjE4-TVD74BN~bXTZFkHKo3B9ufF8HoVqD7lA79gpngGAJ0pJTi62UgirktBx-eG2vxXEj6IbWrTkQJnmePAV6vM8Nu5j1~v6eKiS~a8bUiYnEioyFtufxSbfgTTV3sIYzXe6blabMGf-KSHg9yoAa6CwnfDRusfrUNsJxs2uNxAfhBe8~0KC0OcPujwnPZarJmYsz7CuTgsPb3TbnREdLGb2tNxNAjMFzRxjQvkSXGbxbfytsqMGhqSDqSSuFBRcOgraZoAsJmyWt1fb2VSKaD0I6Zxzzyssr7hJ82JHMVyJZAMgT1tlQ__&Key-Pair-Id=APKAIEYUVEN4EVB2OKEQ" alt="Docker Compose Demo" width="600px"/>
23+ </a >
24+
25+ #### Analyzing Container Logs
26+
27+ <a href =" https://streamable.com/3fjqi3 " target =" _blank " >
28+ <img src="https://cdn-cf-east.streamable.com/image/3fjqi3.jpg?Expires=1733623500&Signature=XaG9q65aFAl8fmk1kvf9TsJj2RB8u035RDpWTLJ7eWzqClmVOPuYEklw4dox3JBQcrcHmg4SJFcyTvhwmyQLc19UKli9yEkO4AqwSlE9SEqrBrOBvCsWoDUa8CBuTU~-9R~sJd8fLVeQNQhvTnTyVFF9z0zkJ3XzDBWcXDMleXL4IbKiD5Z0IcYTsRTJCGD91qtjdO4dDqaaj5fpWNGQixa7ffgvSu5QZJHaLrcnspum7lKKI58eJQlS7T9WqZUXSW2c5vK-EMLrTmV~AXOfZHig-d6XqdBbz0Bg1gLBCdyWsY6PkMhUaR9MIVDVzPwQonVDy5fEDNsnS18zN~1Cfw__&Key-Pair-Id=APKAIEYUVEN4EVB2OKEQ" alt="Container Logs Demo" width="600px"/>
29+ </a >
30+
31+ 📝 Click on the images above to watch the demos
32+
33+ ## 🚀 Quickstart
34+
35+ ### Prerequisites
36+
37+ - Python 3.12+
38+ - Docker Desktop or Docker Engine
39+ - Claude Desktop
40+
41+ ### Installation
42+
43+ #### Claude Desktop Configuration
44+
45+ Add the server configuration to your Claude Desktop config file:
46+
47+ ** MacOS** : ` ~/Library/Application\ Support/Claude/claude_desktop_config.json `
48+ ** Windows** : ` %APPDATA%/Claude/claude_desktop_config.json `
1449
1550<details >
16- <summary >Development/Unpublished Servers Configuration</summary >
17- ```
51+ <summary >💻 Development Configuration</summary >
52+
53+ ``` json
54+ {
1855 "mcpServers" : {
1956 "docker-mcp" : {
2057 "command" : " uv" ,
@@ -26,12 +63,15 @@ On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
2663 ]
2764 }
2865 }
29- ```
66+ }
67+ ```
3068</details >
3169
3270<details >
33- <summary >Published Servers Configuration</summary >
34- ```
71+ <summary >🚀 Production Configuration</summary >
72+
73+ ``` json
74+ {
3575 "mcpServers" : {
3676 "docker-mcp" : {
3777 "command" : " uvx" ,
@@ -40,14 +80,32 @@ On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
4080 ]
4181 }
4282 }
43- ```
83+ }
84+ ```
4485</details >
4586
46- ## Development
87+ ## 🛠️ Development
4788
48- ### Building and Publishing
89+ ### Local Setup
90+
91+ 1 . Clone the repository:
92+ ``` bash
93+ git clone https://github.com/QuantGeekDev/docker-mcp.git
94+ cd docker-mcp
95+ ```
4996
50- To prepare the package for distribution:
97+ 2 . Create and activate a virtual environment:
98+ ``` bash
99+ python -m venv venv
100+ source venv/bin/activate # On Windows: venv\Scripts\activate
101+ ```
102+
103+ 3 . Install dependencies:
104+ ``` bash
105+ uv sync
106+ ```
107+
108+ ### Building and Publishing
51109
521101 . Sync dependencies and update lockfile:
53111``` bash
@@ -58,25 +116,94 @@ uv sync
58116``` bash
59117uv build
60118```
61-
62- This will create source and wheel distributions in the ` dist/ ` directory.
119+ This creates source and wheel distributions in the ` dist/ ` directory.
63120
641213 . Publish to PyPI:
65122``` bash
66123uv publish
67124```
68125
69- Note: You'll need to set PyPI credentials via environment variables or command flags:
126+ #### PyPI Credentials
127+
128+ Set your credentials via:
70129- Token: ` --token ` or ` UV_PUBLISH_TOKEN `
71- - Or username/password: ` --username ` /` UV_PUBLISH_USERNAME ` and ` --password ` /` UV_PUBLISH_PASSWORD `
130+ - Username/Password:
131+ - ` --username ` /` UV_PUBLISH_USERNAME `
132+ - ` --password ` /` UV_PUBLISH_PASSWORD `
72133
73- ### Inspector
134+ ### 🔍 Debugging
74135
75- You can launch the MCP Inspector with this command :
136+ Launch the MCP Inspector for debugging :
76137
77138``` bash
78139npx @modelcontextprotocol/inspector uv --directory < path-to-docker-mcp> run docker-mcp
79140```
80141
142+ The Inspector will provide a URL to access the debugging interface.
143+
144+ ## 📝 Available Tools
145+
146+ The server provides the following tools:
147+
148+ ### create-container
149+ Creates a standalone Docker container
150+ ``` json
151+ {
152+ "image" : " image-name" ,
153+ "name" : " container-name" ,
154+ "ports" : {"80" : " 80" },
155+ "environment" : {"ENV_VAR" : " value" }
156+ }
157+ ```
158+
159+ ### deploy-compose
160+ Deploys a Docker Compose stack
161+ ``` json
162+ {
163+ "project_name" : " example-stack" ,
164+ "compose_yaml" : " version: '3.8'\n services:\n service1:\n image: image1:latest\n ports:\n - '8080:80'"
165+ }
166+ ```
167+
168+ ### get-logs
169+ Retrieves logs from a specific container
170+ ``` json
171+ {
172+ "container_name" : " my-container"
173+ }
174+ ```
175+
176+ ### list-containers
177+ Lists all Docker containers
178+ ``` json
179+ {}
180+ ```
181+
182+ ## 🚧 Current Limitations
183+
184+ - No built-in environment variable support for containers
185+ - No volume management
186+ - No network management
187+ - No container health checks
188+ - No container restart policies
189+ - No container resource limits
190+
191+ ## 🤝 Contributing
192+
193+ 1 . Fork the repository from [ docker-mcp] ( https://github.com/QuantGeekDev/docker-mcp )
194+ 2 . Create your feature branch
195+ 3 . Commit your changes
196+ 4 . Push to the branch
197+ 5 . Open a Pull Request
198+
199+ ## 📜 License
200+
201+ This project is licensed under the MIT License - see the [ LICENSE] ( LICENSE ) file for details.
202+
203+ ## ✨ Authors
204+
205+ - ** Alex Andru** - * Initial work | Core contributor* - [ @QuantGeekDev ] ( https://github.com/QuantGeekDev )
206+ - ** Ali Sadykov** - * Initial work | Core contributor* - [ @md-archive ] ( https://github.com/md-archive )
81207
82- Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
208+ ---
209+ Made with ❤️ for the Claude community
0 commit comments