Docker MCP server
✓ VerifiedLets an AI assistant manage Docker containers, images, volumes, and services by interacting with your local Docker socket.
Also known as ofershap/mcp-server-docker, mcp-server-docker, mcp-docker-server
- Stars
- 4
- Tools
- 10
- Downloads, 30 days
- —
- Latest version
- 1.0.1
- Last commit
- Aug 10, 2026
- License
- MIT
What is Docker MCP?
Docker lets an AI assistant manage Docker containers, images, volumes, and services by interacting with your local Docker socket. It exposes 10 tools, such as list_containers, container_logs, start_container.
Summary generated from the project's README
About Docker MCP server
Managing Docker containers, images, and services directly from an AI coding assistant is what this server enables. Developers can use it to bypass the terminal for routine tasks like checking running containers, reading logs, or restarting services. It works by connecting to your local Docker socket, meaning it requires no API keys or external credentials to function.
This tool is compatible with clients like Claude Desktop, Cursor, and VS Code Copilot. It provides specific tools to interact with your environment, such as list_containers for viewing status and ports, container_logs for troubleshooting, and container_stats to monitor live CPU or memory usage. You can also manage your local storage by using list_images and remove_image to clean up your host.
Beyond simple monitoring, the server allows for active management through commands like start_container, stop_container, and exec_command to run processes inside a running container. It is designed for local development workflows where the Docker daemon is already running on your machine.
What you can do with it
- 1Troubleshoot failing servicesAsk your assistant to retrieve the most recent logs from a specific container to identify errors.
- 2Monitor system resourcesRequest real-time statistics regarding the CPU and memory consumption of a specific container.
- 3Execute internal container commandsHave the AI run a shell command inside a running container to inspect the file system.
- 4Clean up local imagesUse the assistant to find and delete Docker images stored on your host machine.
Written from the project's README. Every use case is checked against a quote from it.
How to install Docker MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Docker MCP in Claude Code
$ claude mcp add mcp-server-docker -- npx -y mcp-docker-serverInstall Docker MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"mcp-server-docker": {
"command": "npx",
"args": [
"-y",
"mcp-docker-server"
]
}
}
}Install Docker MCP in VS Code
.vscode/mcp.json
{
"servers": {
"mcp-server-docker": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-docker-server"
]
}
}
}Install Docker MCP in VS Code CLI
$ code --add-mcp '{"name":"mcp-server-docker","type":"stdio","command":"npx","args":["-y","mcp-docker-server"]}'Install Docker MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"mcp-server-docker": {
"command": "npx",
"args": [
"-y",
"mcp-docker-server"
]
}
}
}Install Docker MCP in Codex
$ codex mcp add mcp-server-docker -- npx -y mcp-docker-serverInstall Docker MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.mcp-server-docker] command = "npx" args = ["-y", "mcp-docker-server"]
Install Docker MCP in Gemini CLI
$ gemini mcp add -s user mcp-server-docker npx -- -y mcp-docker-serverInstall Docker MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"mcp-server-docker": {
"command": "npx",
"args": [
"-y",
"mcp-docker-server"
]
}
}
}Docker MCP tools 10
Detected from the READMElist_containerscontainer_logsstart_containerstop_containerrestart_containerremove_containerexec_commandcontainer_statslist_imagesremove_image
| list_containers | — | |
| container_logs | — | |
| start_container | — | |
| stop_container | — | |
| restart_container | — | |
| remove_container | — | |
| exec_command | — | |
| container_stats | — | |
| list_images | — | |
| remove_image | — |
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachableofershap/mcp-server-docker is public and reachablegithub.com/ofershap/mcp-server-docker ↗Pass
- Package names this repository as its sourcemcp-docker-server names ofershap/mcp-server-docker as sourcenpmjs.com/package/mcp-docker-server ↗Pass
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-08-10github.com/ofershap/mcp-server-docker ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from mcp-docker-serverPass
- No critical advisory in the package or its dependencies160 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model10 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubmcp-server-docker
Control Docker containers, images, and services from your AI coding assistant. List, start, stop, read logs, run commands inside containers, and check resource usage.
npx mcp-docker-server
Compatible with Claude Desktop, Cursor, VS Code Copilot, and any MCP-compatible client. No API keys needed. Connects to your local Docker socket automatically.

Demo built with remotion-readme-kit
Why
If you work with Docker daily, you know the routine: switch to a terminal, type docker ps, scroll through logs, copy container IDs, restart services. It adds up. This MCP server lets your AI assistant handle those tasks for you while you stay focused on code. Ask it to check which containers are running, pull up logs from a failing service, or restart something that got stuck. It talks to Docker's API through the local socket, so there's nothing to configure and no credentials to manage.
Tools
| Tool | What it does |
|---|---|
list_containers |
List running (or all) containers with status, ports, and image info |
container_logs |
Get recent logs from a container |
start_container |
Start a stopped container |
stop_container |
Stop a running container |
restart_container |
Restart a container |
remove_container |
Remove a container (with optional force) |
exec_command |
Execute a command inside a running container |
container_stats |
Get live CPU, memory, and network stats |
list_images |
List all Docker images on the host |
remove_image |
Remove a Docker image |
Quick Start
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"docker": {
"command": "npx",
"args": ["-y", "mcp-docker-server"]
}
}
}
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"docker": {
"command": "npx",
"args": ["-y", "mcp-docker-server"]
}
}
}
VS Code
Add to user settings or .vscode/mcp.json:
{
"mcp": {
"servers": {
"docker": {
"command": "npx",
"args": ["-y", "mcp-docker-server"]
}
}
}
}
Examples
- "List all running Docker containers"
- "Show me the logs from the nginx container"
- "Restart the api-server container"
- "What's the CPU and memory usage of my postgres container?"
- "Execute
ls -la /appinside the web container" - "List all Docker images and their sizes"
- "Stop all containers that are using the old image"
Prerequisites
- Docker must be running on your machine
- The server connects to the Docker socket at
/var/run/docker.sock(Linux/macOS) or the named pipe on Windows - No API keys or tokens required
Agent Plugins
This repo is an Agent Plugins 1.0.0 package: plugin.json, portable mcp.json, and skills/ ship together with the MCP server.
For Cursor, clone the repo and copy or symlink it to ~/.cursor/plugins/local/mcp-server-docker, then reload the window. Skills and MCP show up under Customize > Plugins.
The Cursor and VS Code install buttons above still work: they add the same npx -y mcp-docker-server stdio server as manual JSON.
FAQ
What is mcp-docker-server?
The npm package for this MCP server (repo name mcp-server-docker). It talks to your local Docker socket to list containers, tail logs, exec commands, and manage images.
Do I need Docker Desktop running?
Yes. The daemon must be up and the MCP process must reach docker.sock (or the Windows named pipe).
Is this safe for production containers?
Treat stop/remove/restart as destructive. Confirm with the user before changing production workloads.
Can I install it as an Agent Plugin in Cursor?
Yes. Use ~/.cursor/plugins/local/mcp-server-docker so the bundled docker-management skill loads with the MCP config.
Do I need API keys?
No. Only local Docker access.
Development
git clone https://github.com/ofershap/mcp-server-docker.git
cd mcp-server-docker
npm install
npm test
npm run build
See also
More MCP servers and developer tools on my portfolio.
Author
README built with README Builder
License
MIT © 2026 Ofer Shapira
Docker MCP questions
How do I add Docker MCP to Claude Code?
Run claude mcp add mcp-server-docker -- npx -y mcp-docker-server in your terminal. Add --scope user to make it available in every project.
How do I add Docker MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does Docker MCP provide?
It exposes 10 tools, including list_containers, container_logs, start_container, stop_container, restart_container.
Do I need API keys?
No, the server only requires local Docker access through your local socket.
Do I need Docker Desktop running?
Yes, the Docker daemon must be running and the MCP process must be able to reach the Docker socket or Windows named pipe.
Is this safe for production containers?
You should treat stop, remove, and restart actions as destructive and confirm with the user before modifying production workloads.
Can I install it as an Agent Plugin in Cursor?
Yes, you can install it in the local plugins directory so the bundled docker-management skill loads with the configuration.