Server data from the Official MCP Registry
MCP server for managing Docker containers, images, networks, volumes, and registries
MCP server for managing Docker containers, images, networks, volumes, and registries
Valid MCP server (1 strong, 1 medium validity signals). 8 known CVEs in dependencies (0 critical, 5 high severity) Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (6/6 approved).
5 files analyzed · 9 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Unverified package source
We couldn't verify that the installable package matches the reviewed source code. Proceed with caution.
Add this to your MCP configuration file:
{
"mcpServers": {
"mcp-server": {
"args": [
"-y",
"@alisaitteke/docker-mcp"
],
"command": "npx"
}
}
}From the project's GitHub README.
Powerful Docker management for AI assistants
A comprehensive Model Context Protocol (MCP) server that empowers AI assistants like Cursor, Claude Desktop, and other MCP-compatible clients to seamlessly manage Docker containers, images, networks, volumes, and registries through natural language interactions.
npx, no installation needednpx @alisaitteke/docker-mcp
npm install -g @alisaitteke/docker-mcp
Or install locally in your project:
npm install @alisaitteke/docker-mcp
.cursor/mcp.json or similar):{
"mcpServers": {
"docker": {
"command": "npx",
"args": ["@alisaitteke/docker-mcp"]
}
}
}
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"docker": {
"command": "npx",
"args": ["@alisaitteke/docker-mcp"]
}
}
}
git clone <repository-url>
cd docker-mcp
npm install
npm run build
# Build first
npm run build
# Run the server
npm start
npm run dev
This uses tsx to run TypeScript directly without building.
# Build first
npm run build
# Run directly with node
node dist/index.js
# Build first
npm run build
# Make sure the binary is executable
chmod +x bin/docker-mcp-server.js
# Run the binary
./bin/docker-mcp-server.js
src/npm run build
npm start
# or
npm run dev
npm run typecheck
npm run lint
Docker connection issues:
docker psls -la /var/run/docker.sockDOCKER_HOST, DOCKER_CERT_PATH, etc./var/run/docker.sock doesn't exist, try ~/.docker/run/docker.sock (Docker Desktop 4.0+)Build errors:
rm -rf node_modules && npm installnpm installRuntime errors:
docker versionls -la dist/The server automatically detects the operating system and uses the appropriate Docker socket path:
/var/run/docker.sock (Unix socket)/var/run/docker.sock or ~/.docker/run/docker.sock (Docker Desktop 4.0+)//./pipe/docker_engine (Named pipe)Environment variables (highest priority):
DOCKER_HOST - Docker daemon host (e.g., tcp://localhost:2376, npipe:////./pipe/docker_engine)DOCKER_PORT - Docker daemon portDOCKER_PROTOCOL - Protocol (http or https)DOCKER_SOCKET_PATH - Path to Docker socket (overrides platform default)DOCKER_CERT_PATH - Path to Docker certificates directoryDOCKER_TLS_VERIFY - Enable TLS verification (1 or 0)Platform-specific defaults (automatic detection):
/var/run/docker.sock/var/run/docker.sock (or ~/.docker/run/docker.sock if available)//./pipe/docker_engineOn Windows, Docker Desktop uses named pipes. The server automatically detects Windows and uses the correct path. You can also explicitly set:
# Using environment variable
set DOCKER_SOCKET_PATH=//./pipe/docker_engine
# Or using DOCKER_HOST
set DOCKER_HOST=npipe:////./pipe/docker_engine
To connect to a remote Docker host:
# Linux/macOS
export DOCKER_HOST=tcp://192.168.1.100:2376
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=/path/to/certs
# Windows
set DOCKER_HOST=tcp://192.168.1.100:2376
set DOCKER_TLS_VERIFY=1
set DOCKER_CERT_PATH=C:\path\to\certs
docker_list_containers - List all containersdocker_create_container - Create a new containerdocker_start_container - Start a containerdocker_stop_container - Stop a containerdocker_restart_container - Restart a containerdocker_kill_container - Kill a containerdocker_remove_container - Remove a containerdocker_inspect_container - Get container detailsdocker_container_logs - Get container logsdocker_container_stats - Get container statisticsdocker_pause_container - Pause a containerdocker_unpause_container - Unpause a containerdocker_list_images - List all imagesdocker_pull_image - Pull an image from registrydocker_push_image - Push an image to registrydocker_tag_image - Tag an imagedocker_remove_image - Remove an imagedocker_inspect_image - Get image detailsdocker_image_history - Get image historydocker_list_networks - List all networksdocker_create_network - Create a networkdocker_remove_network - Remove a networkdocker_inspect_network - Get network detailsdocker_connect_container - Connect container to networkdocker_disconnect_container - Disconnect container from networkdocker_list_volumes - List all volumesdocker_create_volume - Create a volumedocker_remove_volume - Remove a volumedocker_inspect_volume - Get volume detailsdocker_system_info - Get Docker system informationdocker_version - Get Docker versiondocker_prune_system - Prune all unused resourcesdocker_prune_images - Prune unused imagesdocker_prune_containers - Prune stopped containersdocker_prune_volumes - Prune unused volumesdocker_prune_networks - Prune unused networksdocker_exec - Execute a command in a containerdocker_inspect_exec - Get exec instance detailsdocker_compose_up - Start Docker Compose servicesdocker_compose_down - Stop and remove Docker Compose servicesdocker_compose_ps - List Docker Compose servicesdocker_compose_logs - View output from Docker Compose servicesdocker_compose_config - Parse and validate docker-compose.yml filedocker_compose_build - Build Docker Compose servicesdocker_compose_restart - Restart Docker Compose servicesdocker_compose_stop - Stop Docker Compose servicesdocker_compose_start - Start Docker Compose servicesdockerhub_search - Search Docker Hubdockerhub_get_tags - Get repository tags from Docker Hubdockerhub_authenticate - Authenticate with Docker Hubdockerhub_pull - Pull from Docker Hubdockerhub_push - Push to Docker Hubghcr_authenticate - Authenticate with GitHub Container Registryghcr_pull - Pull from GHCRghcr_push - Push to GHCR{
"name": "docker_list_containers",
"arguments": {
"all": false
}
}
{
"name": "docker_create_container",
"arguments": {
"image": "nginx:latest",
"name": "my-nginx",
"ports": {"80/tcp": {}}
}
}
Then start it:
{
"name": "docker_start_container",
"arguments": {
"id": "my-nginx"
}
}
{
"name": "docker_pull_image",
"arguments": {
"name": "ubuntu:20.04"
}
}
{
"name": "dockerhub_search",
"arguments": {
"query": "node",
"limit": 10
}
}
{
"name": "docker_exec",
"arguments": {
"containerId": "my-container",
"cmd": ["ls", "-la"],
"tty": false
}
}
{
"name": "docker_compose_up",
"arguments": {
"projectDir": "/path/to/compose/project",
"detach": true,
"build": true
}
}
{
"name": "docker_compose_logs",
"arguments": {
"projectDir": "/path/to/compose/project",
"follow": false,
"tail": 100
}
}
All destructive operations (remove, kill, prune) support two confirmation methods:
Step 1: Preview (without confirm)
{
"name": "docker_remove_volume",
"arguments": {
"name": "my-volume"
}
}
This returns volume details and a warning message.
Step 2: Confirm (with confirm=true)
{
"name": "docker_remove_volume",
"arguments": {
"name": "my-volume",
"confirm": true
}
}
This actually removes the volume.
If your MCP client (Cursor, Claude Desktop) supports Elicitation API, you can use interactive confirmation:
{
"name": "docker_remove_volume",
"arguments": {
"name": "my-volume",
"useElicitation": true
}
}
This will show an interactive confirmation dialog in the client (if supported). The client will display a form asking for confirmation, and the operation proceeds only if the user accepts.
Note: Elicitation API support depends on the MCP client. If the client doesn't support it, the server automatically falls back to the confirm parameter method.
Operations requiring confirmation:
docker_remove_volume - Remove volumesdocker_remove_container - Remove containersdocker_kill_container - Kill containersdocker_remove_image - Remove imagesdocker_remove_network - Remove networksdocker_prune_system - Prune all unused resourcesdocker_prune_images - Prune unused imagesdocker_prune_containers - Prune stopped containersdocker_prune_volumes - Prune unused volumesdocker_prune_networks - Prune unused networksnpm run build
./test-server.sh
Or test manually:
# The server will exit with error if Docker is not accessible
node dist/index.js
If Docker is running, you should see:
Docker MCP Server running on stdio
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | node dist/index.js | jq
Note: The server communicates via stdio, so it will wait for JSON-RPC requests. Press Ctrl+C to exit.
npm run build
npm start
In another terminal, test with curl (if using HTTP transport) or use an MCP client
Verify Docker operations work:
docker_list_containers tooldocker_system_info toolFor full integration testing, you'll need an MCP client. The server communicates via stdio (standard input/output), so it's designed to work with MCP-compatible clients like:
Enable verbose logging by checking stderr output. The server writes errors and status messages to stderr:
# Run and capture stderr
node dist/index.js 2> debug.log
/var/run/docker.sock//./pipe/docker_engine# Clone and setup
git clone <repository-url>
cd docker-mcp
npm install
# Build
npm run build
# Test
./test-server.sh
# Run
npm start
# or for development
npm run dev
MIT
If you're developing locally and want to test with Cursor:
npm run build
.cursor/mcp.json or similar):{
"mcpServers": {
"docker": {
"command": "node",
"args": ["/absolute/path/to/docker-mcp/dist/index.js"]
}
}
}
Or if using the binary:
{
"mcpServers": {
"docker": {
"command": "/absolute/path/to/docker-mcp/bin/docker-mcp-server.js"
}
}
}
If you're developing locally and want to test with Claude Desktop:
npm run build
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"docker": {
"command": "node",
"args": ["/absolute/path/to/docker-mcp/dist/index.js"]
}
}
}
You can test the server using MCP Inspector or any MCP client:
# Build first
npm run build
# The server communicates via stdio, so you can pipe commands to it
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | node dist/index.js
Contributions are welcome! Please feel free to submit a Pull Request.
Be the first to review this server!
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
by Microsoft · Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
by mcp-marketplace · Developer Tools
Scaffold, build, and publish TypeScript MCP servers to npm — conversationally
by mcp-marketplace · Finance
Free stock data and market news for any MCP-compatible AI assistant.
by Taylorwilsdon · Productivity
Control Gmail, Calendar, Docs, Sheets, Drive, and more from your AI