docker-mcp
The docker-mcp server enables Docker container and Compose stack management through Claude AI with these capabilities:
🚀 Create new standalone Docker containers with specified images, names, ports, and environment variables
📦 Deploy Docker Compose stacks by providing compose YAML and project name
🔍 Retrieve logs from specific Docker containers
📊 List all Docker containers to monitor their status
Enables container and Docker Compose stack management, including creation of standalone containers, deployment of compose stacks, retrieval of container logs, and listing of container status and information.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@docker-mcpdeploy a PostgreSQL database with Docker Compose"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🐳 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
Related MCP server: MCP Development Server
🚀 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 claudePrerequisites
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"
]
}
}
}{
"mcpServers": {
"docker-mcp": {
"command": "uvx",
"args": [
"docker-mcp"
]
}
}
}🛠️ Development
Local Setup
Clone the repository:
git clone https://github.com/QuantGeekDev/docker-mcp.git
cd docker-mcpCreate and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activateInstall dependencies:
uv sync🔍 Debugging
Launch the MCP Inspector for debugging:
npx @modelcontextprotocol/inspector uv --directory <path-to-docker-mcp> run docker-mcpThe 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 ❤️
Available Tools
4 toolscreate-containerC
Create a new standalone Docker container
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | ||
| name | No | ||
| ports | No | ||
| environment | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Create' implying a mutation operation but doesn't cover permissions, side effects, error handling, or response format. For a tool that likely requires Docker daemon access and creates persistent resources, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a basic tool definition and front-loaded with the core action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (4 parameters with nested objects, no annotations, no output schema), the description is incomplete. It doesn't address parameter meanings, behavioral traits, or output expectations, leaving the agent with insufficient context to use the tool effectively beyond the basic purpose.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate but adds no parameter information. It doesn't explain what 'image', 'name', 'ports', or 'environment' mean in the Docker context, their formats, or examples. With 4 parameters and nested objects, this leaves critical usage details undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Create') and resource ('new standalone Docker container'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'deploy-compose' which might also create containers, missing the 'standalone' distinction that could be more explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'deploy-compose' for multi-container setups or 'list-containers' for viewing existing ones. The description lacks context about prerequisites or typical scenarios for standalone container creation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
deploy-composeC
Deploy a Docker Compose stack
| Name | Required | Description | Default |
|---|---|---|---|
| compose_yaml | Yes | ||
| project_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states 'Deploy' implies a write/mutation operation, but doesn't disclose critical traits like whether it's idempotent, requires specific permissions, destroys existing resources, handles errors, or has rate limits. The description adds no context beyond the basic action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with a single, front-loaded sentence that directly states the tool's purpose. There is zero wasted text, and it efficiently communicates the core function without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of deployment operations (mutating system state), no annotations, no output schema, and 0% schema coverage for 2 parameters, the description is incomplete. It lacks essential details like what 'deploy' entails behaviorally, parameter meanings, expected outcomes, or error handling, leaving significant gaps for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate but provides no parameter information. It doesn't explain what 'compose_yaml' should contain (e.g., YAML string format), what 'project_name' is used for (e.g., naming containers/networks), or any constraints (e.g., length, characters). With 2 undocumented parameters, this is inadequate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Deploy') and resource ('a Docker Compose stack'), making the purpose immediately understandable. It distinguishes from siblings like 'create-container' (single container vs. stack) and 'get-logs'/'list-containers' (read operations vs. deployment). However, it doesn't specify what 'deploy' entails (e.g., creating containers, networks, volumes) beyond the high-level concept.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., Docker Compose installed), when to choose this over 'create-container' for single-container deployments, or any constraints (e.g., environment compatibility). Usage is implied from the name but not explicitly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get-logsC
Retrieve the latest logs for a specified Docker container
| Name | Required | Description | Default |
|---|---|---|---|
| container_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden but only states the action without behavioral details. It doesn't disclose what 'latest logs' means (e.g., time range, log count, format), whether it's read-only or has side effects, or any constraints like rate limits or authentication needs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with no wasted words, front-loading the core action and resource. It's appropriately sized for a simple tool with one parameter.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, no output schema, and low schema coverage, the description is incomplete. It lacks details on return values (e.g., log format, structure), error handling, and behavioral context needed for a logging tool in a Docker environment with siblings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description adds meaning by specifying that 'container_name' is for a Docker container. However, it doesn't clarify parameter details like format, examples, or how it relates to other tools (e.g., if it must match names from 'list-containers'), leaving gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'retrieve' and resource 'latest logs for a specified Docker container', making the purpose evident. It distinguishes from siblings like 'list-containers' by focusing on logs rather than container metadata, though it doesn't explicitly contrast with them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., container must be running), exclusions, or comparisons with sibling tools like 'list-containers' for container discovery.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list-containersB
List all Docker containers
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('List all') but lacks details on permissions, rate limits, output format, or any constraints (e.g., whether it includes stopped containers). This is a significant gap for a tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with no wasted words. It is front-loaded and directly states the tool's purpose, making it highly concise and well-structured for quick understanding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is incomplete. It fails to provide necessary behavioral context (e.g., what 'all' entails, response format) or usage guidelines, making it inadequate for a tool that might have hidden complexities despite having no parameters.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, but this is acceptable given the schema's completeness, aligning with the baseline of 4 for zero parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'List all Docker containers' clearly states the verb ('List') and resource ('Docker containers'), making the purpose immediately understandable. However, it doesn't differentiate from potential sibling tools like 'get-logs' which might also list containers but with logs, so it misses full sibling distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'create-container' or 'deploy-compose'. There is no mention of context, prerequisites, or exclusions, leaving the agent to infer usage based on tool names alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v1.0.0- Added
create-container - Added
deploy-compose - Added
get-logs - Added
list-containers
TDQS
Each tool has a clearly distinct purpose with no overlap: create-container for creating containers, deploy-compose for deploying stacks, get-logs for retrieving logs, and list-containers for listing containers. The descriptions make it easy to tell them apart.
All tool names follow a consistent verb_noun pattern (e.g., create-container, deploy-compose, get-logs, list-containers). There are no deviations in naming style or conventions.
With 4 tools, the count is reasonable for a Docker MCP server, covering key operations like creating, listing, and managing containers and stacks. It's slightly lean but well-scoped for basic Docker management tasks.
The toolset covers core operations (create, list, logs, deploy) but has notable gaps, such as missing update, delete, or stop/start container tools, which could limit agent workflows for full container lifecycle management.
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
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Related MCP Servers
- FlicenseAqualityFmaintenanceA Model Context Protocol server that enables Docker container management through natural language interactions using a custom GPT interface.715-
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables Claude to manage software development projects with complete context awareness and code execution through Docker environments.244-
- AlicenseAqualityFmaintenanceAllows Claude and other AI assistants to interact with Docker through the MCP protocol, enabling container and image management including listing, running, stopping, and pulling Docker resources.61864MIT
- FlicenseNot gradedqualityDmaintenanceA TypeScript server that fully implements the Model Context Protocol (MCP) standard, providing API access to Docker CLI operations like build, run, stop, and image management through compatible AI clients.-
Appeared in Searches
- Managing Docker Containers and Applications
- Information about Docker software and containerization
- A server for managing Minecraft Fabric modpacks using Claude
- A server that can run Docker Compose commands to manage containers
- How to retrieve information about a device using Microsoft Defender, Intune, and Jamf
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/QuantGeekDev/docker-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server