Docker MCP Server
Provides tools for managing Docker containers and volumes locally via an API, including listing, inspecting, starting, stopping, restarting, removing containers, executing commands inside containers, and removing volumes.
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 MCP Serverlist all running containers"
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 Server
Este projeto oferece um Minimal Control Plane (MCP) para gerenciar contêineres e volumes Docker localmente com Dockerode, sem chamar shell.
Pré‑requisitos
Node.js ≥ 18
npmouyarnDocker rodando localmente (socket padrão ou
DOCKER_HOSTconfigurado)
Related MCP server: Docker MCP Server
Instalação
git clone <repo>
cd docker-mcp-server
npm installComo usar
# Desenvolvimento (auto‑reload)
npm run dev
# Produção:
npm run build
npm startO servidor escuta na porta 3000 (ou a porta que você definir via PORT).
API
Método | Endpoint | Descrição |
GET |
| Lista contêineres ( |
GET |
| Inspeção |
GET |
| Logs ( |
POST |
| Inicia |
POST |
| Para |
POST |
| Reinicia |
GET |
| Estatísticas snapshot |
POST |
| Execute comando ( |
DELETE |
| Remove contêiner (force) |
DELETE |
| Remove volume |
Estrutura
src/
├─ index.ts
├─ server.ts
├─ routes/docker.routes.ts
├─ controllers/docker.controller.ts
├─ services/docker.service.ts
├─ dto/docker.dto.ts
└─ utils/errorHandler.tsContribuição
Sinta‑se à vontade para abrir issues/pulls. Mantenha a mesma estrutura de validação + controller + service.
Licença
MIT
Uso na pratica
Para usar o MCP foi iniciado a aplicação, e dado o contexto no claude code com um prompt simples:
Você tem acesso a uma API local para gerenciamento de Docker em:
http://127.0.0.1:3000/api
Use essa API sempre que eu pedir algo relacionado a containers ou volumes Docker.
Não assuma o estado dos containers sem consultar a API.
Endpoints disponíveis:
- `GET /containers?all=true` → lista todos os containers
- `GET /containers?status=running` → lista apenas os containers em execução
- `GET /containers/:id` → inspeciona um container
- `GET /containers/:id/logs?tail=100` → mostra logs
- `POST /containers/:id/start` → inicia um container
- `POST /containers/:id/stop` → para um container
- `POST /containers/:id/restart` → reinicia um container
- `GET /containers/:id/stats` → mostra estatísticas
- `POST /containers/:id/exec` → executa comando no container
- `DELETE /containers/:id` → remove um container
- `DELETE /volumes/:name` → remove um volume
Regras:
- Sempre use a API antes de responder sobre Docker.
- Para ações destrutivas como `stop`, `restart`, `remove` e `DELETE`, confirme comigo antes de executar.
- Se eu pedir um resumo dos containers, liste usando a API.
- Se eu pedir logs, use o endpoint de logs.
- Se eu pedir execução de comando, use o endpoint `exec`.
- Se a API estiver fora do ar, informe isso claramente.
Exemplos de uso:
- listar containers: `curl 'http://127.0.0.1:3000/api/containers?all=true'`
- listar running: `curl 'http://127.0.0.1:3000/api/containers?status=running'`
- inspecionar: `curl 'http://127.0.0.1:3000/api/containers/zabbix-server'`
- logs: `curl 'http://127.0.0.1:3000/api/containers/zabbix-server/logs?tail=100'`
- restart: `curl -X POST 'http://127.0.0.1:3000/api/containers/zabbix-server/restart'`
- exec: `curl -X POST 'http://127.0.0.1:3000/api/containers/zabbix-server/exec' -H 'Content-Type: application/json' -d
'{"cmd":["ls","/"]}'`
- remove volume: `curl -X DELETE 'http://127.0.0.1:3000/api/volumes/meu-volume'`This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/santanaraelnew/mcp-docker'
If you have feedback or need assistance with the MCP directory API, please join our Discord server