MCP server for Docker — manage containers, images, volumes, and compose services from your IDE
io.github.ofershap/docker — MCP Server for Docker
MCP server for Docker that manages containers, images, volumes, and compose services from within your IDE. Published as mcp-docker-server, it is implemented in TypeScript (strict), and distributed via npm. The repository is hosted on GitHub under ofershap, with CI tracked through a GitHub Actions workflow badge.
🛠️ Key Features
Docker-focused operations for containers
Image management
Volume management
Compose services support
🚀 Use Cases
Managing Docker resources directly while developing
Controlling containerized workflows and compose-based services from an IDE
⚡ Developer Benefits
Model Context Protocol (MCP) server for Docker integration
TypeScript (strict) implementation
Available on npm (mcp-docker-server)
⚠️ Limitations
Details beyond container/image/volume/compose management are not provided in the available excerpt.
Control Docker containers, images, and services from your AI coding assistant. List, start, stop, read logs, run commands inside containers, and check resource usage.
bash
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.
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
"What's the CPU and memory usage of my postgres container?"
"Execute ls -la /app inside 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
bash
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.