mcp-server-docker
mcp-server-docker
Steuere Docker-Container, Images und Dienste direkt über deinen KI-Codierungsassistenten. Liste Container auf, starte und stoppe sie, lies Logs, führe Befehle in Containern aus und prüfe die Ressourcennutzung.
npx mcp-docker-serverKompatibel mit Claude Desktop, Cursor, VS Code Copilot und jedem MCP-kompatiblen Client. Keine API-Schlüssel erforderlich. Verbindet sich automatisch mit deinem lokalen Docker-Socket.

Demo erstellt mit remotion-readme-kit
Warum
Wenn du täglich mit Docker arbeitest, kennst du das Prozedere: wechsle zum Terminal, tippe docker ps, scrolle durch Logs, kopiere Container-IDs, starte Dienste neu. Das summiert sich. Dieser MCP-Server ermöglicht es deinem KI-Assistenten, diese Aufgaben für dich zu übernehmen, während du dich auf den Code konzentrierst. Bitte ihn zu prüfen, welche Container laufen, Logs eines fehlerhaften Dienstes abzurufen oder etwas neu zu starten, das hängengeblieben ist. Er kommuniziert über den lokalen Socket mit der Docker-API, also gibt es nichts zu konfigurieren und keine Anmeldedaten zu verwalten.
Related MCP server: Docker Manager MCP
Tools
Tool | Was es tut |
| Laufende (oder alle) Container mit Status, Ports und Image-Informationen auflisten |
| Neueste Logs von einem Container abrufen |
| Einen gestoppten Container starten |
| Einen laufenden Container stoppen |
| Einen Container neu starten |
| Einen Container entfernen (optional erzwungen) |
| Einen Befehl in einem laufenden Container ausführen |
| Live-CPU-, Speicher- und Netzwerkstatistiken abrufen |
| Alle Docker-Images auf dem Host auflisten |
| Ein Docker-Image entfernen |
Schnellstart
Cursor
Füge Folgendes zu .cursor/mcp.json hinzu:
{
"mcpServers": {
"docker": {
"command": "npx",
"args": ["-y", "mcp-docker-server"]
}
}
}Claude Desktop
Füge Folgendes zu claude_desktop_config.json hinzu:
{
"mcpServers": {
"docker": {
"command": "npx",
"args": ["-y", "mcp-docker-server"]
}
}
}VS Code
Füge Folgendes zu den Benutzereinstellungen oder zu .vscode/mcp.json hinzu:
{
"mcp": {
"servers": {
"docker": {
"command": "npx",
"args": ["-y", "mcp-docker-server"]
}
}
}
}Beispiele
"Alle laufenden Docker-Container auflisten"
"Zeig mir die Logs des nginx-Containers"
"Starte den api-server-Container neu"
"Wie hoch ist die CPU- und Speichernutzung meines postgres-Containers?"
"Führe
ls -la /appim web-Container aus""Alle Docker-Images und ihre Größen auflisten"
"Stoppe alle Container, die das alte Image verwenden"
Voraussetzungen
Docker muss auf deinem Rechner laufen
Der Server verbindet sich mit dem Docker-Socket unter
/var/run/docker.sock(Linux/macOS) oder der Named Pipe unter WindowsEs sind keine API-Schlüssel oder Tokens erforderlich
Agent Plugins
Dieses Repository ist ein Agent Plugins 1.0.0-Paket: plugin.json, portables mcp.json und skills/ werden zusammen mit dem MCP-Server ausgeliefert.
Für Cursor klone das Repository und kopiere oder verlinke es nach ~/.cursor/plugins/local/mcp-server-docker, und lade dann das Fenster neu. Skills und MCP erscheinen unter Customize > Plugins.
Die Cursor- und VS-Code-Installationsschaltflächen oben funktionieren weiterhin: Sie fügen denselben npx -y mcp-docker-server-stdio-Server hinzu wie das manuelle JSON.
FAQ
Was ist mcp-docker-server?
Das npm-Paket für diesen MCP-Server (Repository-Name mcp-server-docker). Es kommuniziert mit deinem lokalen Docker-Socket, um Container aufzulisten, Logs zu verfolgen, Befehle auszuführen und Images zu verwalten.
Muss Docker Desktop laufen?
Ja. Der Daemon muss aktiv sein und der MCP-Prozess muss docker.sock (oder die Named Pipe unter Windows) erreichen.
Ist das sicher für Produktionscontainer?
Behandle Stopp/Entfernen/Neustart als destruktiv. Hol dir die Bestätigung des Benutzers ein, bevor du Produktions-Workloads änderst.
Kann ich es als Agent Plugin in Cursor installieren?
Ja. Verwende ~/.cursor/plugins/local/mcp-server-docker, damit der gebündelte docker-management-Skill mit der MCP-Konfiguration geladen wird.
Benötige ich API-Schlüssel?
Nein. Nur lokaler Docker-Zugriff.
Entwicklung
git clone https://github.com/ofershap/mcp-server-docker.git
cd mcp-server-docker
npm install
npm test
npm run buildSiehe auch
Weitere MCP-Server und Entwicklerwerkzeuge findest du in meinem Portfolio.
Autor
README erstellt mit README Builder
Lizenz
MIT © 2026 Ofer Shapira
Available Tools
10 toolscontainer_logsC
Get logs from a Docker container.
Inputs: id (required), tail.
container_statsA
Get CPU, memory, and network stats for a running Docker container.
Inputs: id (required).
exec_commandC
Execute a command inside a running Docker container.
Inputs: id (required), command (required).
list_containersB
List Docker containers. Set all=true to include stopped containers.
Inputs: all.
list_imagesB
List Docker images on the host.
Inputs: no named parameters.
remove_containerA
Remove a Docker container. Use force=true to remove running containers.
Inputs: id (required), force.
remove_imageB
Remove a Docker image. Use force=true to force removal.
Inputs: id (required), force.
restart_containerC
Restart a Docker container.
Inputs: id (required).
start_containerA
Start a stopped Docker container.
Inputs: id (required).
stop_containerC
Stop a running Docker container.
Inputs: id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool has a clearly distinct purpose targeting specific Docker operations: logs, stats, exec, listing containers/images, removal, restart, start, and stop. There is no overlap or ambiguity between tools, as each handles a unique action on a well-defined resource.
All tool names follow a consistent verb_noun pattern with snake_case (e.g., list_containers, remove_image, start_container). The naming is predictable and uniform across all tools, making them easily readable and systematic.
With 10 tools, the server is well-scoped for Docker management, covering essential operations like lifecycle control (start, stop, restart), inspection (logs, stats, list), and cleanup (remove). Each tool earns its place without redundancy or bloat.
The toolset provides strong coverage for core Docker workflows, including CRUD-like operations for containers and images. A minor gap exists in creating or building images (e.g., build_image or pull_image), but agents can still perform most common tasks effectively with the available tools.
Maintenance
Related MCP Connectors
Manage your own cloud with AI: deploy apps, push and ship custom Docker images, manage resources via your AI agent.
Inspect and control your Northflank projects, services, jobs, and builds from your AI assistant.
Read-only Linux server and Docker monitoring for AI assistants: CPU, memory, disk, network.
Create, run and manage Homemade dev VMs and projects from your AI agent.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables natural language interaction with Docker commands and operations. Supports container management, image operations, system information, and Docker Compose through conversational requests.141MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Docker containers, deploy stacks, and monitor services across multiple Docker hosts from one centralized location. Supports container lifecycle management, Docker Compose operations, and infrastructure orchestration through natural language commands.6MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Docker containers, images, networks, volumes, and Compose services through the Model Context Protocol. It supports system operations, command execution within containers, and integration with Docker Hub and GitHub Container Registry.94 npm2MIT
- AlicenseCqualityDmaintenanceEnables AI assistants to manage Docker containers, images, networks, volumes, and Docker Compose services through the Model Context Protocol.27MIT