dockhand-mcp
Click on "Deploy 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., "@dockhand-mcpList all containers in the production environment."
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.
dockhand-mcp
MCP (Model Context Protocol) sidecar server for Dockhand (GitHub). Exposes Dockhand's container, image, volume, network, and stack management as MCP tools over Streamable HTTP, so MCP clients (Claude Desktop, Claude Code, etc.) can manage Docker resources through Dockhand.
This is a standalone service — it does not modify Dockhand itself, and calls Dockhand's existing REST API using a Dockhand API token.
Configuration
Var | Required | Description |
| yes | Base URL of the Dockhand instance, e.g. |
| one of these two | Dockhand API token (create one in Dockhand under Profile → API tokens) |
| one of these two | Path to a file/Docker secret containing the token |
| yes | Shared secret required by MCP clients calling this sidecar |
| no | Comma-separated list of exact hostnames to allow via DNS-rebinding host-header validation. Unset by default — no host filtering is applied, and MCP_AUTH_TOKEN remains the primary access-control gate. |
| no (default | Set |
| no (default | Set |
| no (default | Set |
| no (default | Set |
| no (default | Set |
| no (default | Set |
| no (default | Set |
| no (default | Set |
| no (default | Port the MCP endpoint listens on |
Related MCP server: rarcane
Running
docker build -t dockhand-mcp .
docker run -p 8787:8787 \
-e DOCKHAND_URL=http://dockhand:3000 \
-e DOCKHAND_API_TOKEN=dh_... \
-e MCP_AUTH_TOKEN=... \
dockhand-mcpSee docker-compose.example.yaml for running alongside Dockhand itself.
On startup, the sidecar checks connectivity to DOCKHAND_URL by calling GET /api/environments and logs the result, along with the minimum supported Dockhand version. A failed check is logged as an error but does not prevent the server from starting — Dockhand may simply not be ready yet — so tool calls will fail individually with clear errors until Dockhand is reachable. Dockhand does not expose its own app version through a REST endpoint, so the minimum-version notice is informational rather than actively enforced.
MCP endpoint
POST /mcp — Streamable HTTP MCP endpoint. Requires Authorization: Bearer <MCP_AUTH_TOKEN>.
GET /health — unauthenticated liveness check.
Client configuration
Example .mcp.json for Claude Code (or ~/.claude.json for a user-scoped config), pointing at a deployed sidecar:
{
"mcpServers": {
"dockhand-mcp": {
"type": "http",
"url": "https://dockhand-mcp.example.com/mcp",
"headers": {
"Authorization": "Bearer ${MCP_AUTH_TOKEN}"
}
}
}
}Equivalent CLI command:
claude mcp add dockhand-mcp --transport http https://dockhand-mcp.example.com/mcp --header "Authorization: Bearer ${MCP_AUTH_TOKEN}"${MCP_AUTH_TOKEN} expands from the environment Claude Code runs in — set it to the same value configured on the sidecar, rather than hardcoding the token in the config file.
Tools
Every tool except list_environments, list_users, get_user, list_roles, list_registries, and list_schedules requires an environmentId (or an id scoped to a specific stored resource) — call list_environments first to discover valid environment IDs.
Mutating tools are also disabled whenever DOCKHAND_MCP_READONLY=true, regardless of the domain toggle below.
Core (always registered — no toggle required)
Tool | Type | Description |
| Read-only | List all Dockhand environments (Docker hosts). Call this first to discover valid |
| Read-only | List containers in a Dockhand environment. |
| Read-only | Get full inspect details for a single container. |
| Read-only | Get recent logs for a container. |
| Read-only | List images in a Dockhand environment. |
| Read-only | List volumes in a Dockhand environment. |
| Read-only | List networks in a Dockhand environment. |
| Read-only | List Compose stacks in a Dockhand environment. |
| Read-only | Get all environment variables for a stack (merged view of the |
| Read-only | Get the raw |
| Read-only | Get a one-shot CPU, memory, network and block-IO stats snapshot for a container. |
| Read-only | List the processes running inside a container. |
| Read-only | List containers that have a newer image available, from the last update check. |
| Mutating | Check all containers in an environment for newer images. Returns a jobId — poll with |
| Read-only | Check the status of an update check started by |
| Mutating | Cancel a running update check. |
| Mutating | Recreate a container with a newer image, preserving its configuration. Blocks until done. |
| Mutating | Recreate several containers with their latest images. Blocks until done. |
| Mutating | Start a stopped container. |
| Mutating | Stop a running container. |
| Mutating | Restart a container. |
| Mutating | Pause all processes in a running container. |
| Mutating | Resume all processes in a paused container. |
| Mutating | Rename a container (also updates its auto-update schedule). |
| Mutating | Remove (delete) a container. |
| Mutating | Pull an image from a registry. Returns immediately with a jobId — poll with |
| Read-only | Check the status of an image pull started by |
| Mutating | Cancel a running image pull started by |
| Mutating | Remove (delete) an image. |
| Mutating | Remove (delete) a volume. |
| Mutating | Deploy (up) a Compose stack. Returns immediately with a jobId — poll with |
| Read-only | Check the status of a stack deploy started by |
| Mutating | Cancel a running stack deploy started by |
| Mutating | Take a Compose stack down ( |
| Read-only | Check the status of a stack down started by |
| Mutating | Cancel a running stack down started by |
| Mutating | Start a stopped Compose stack. Returns immediately with a jobId — poll with |
| Mutating | Stop a Compose stack ( |
| Mutating | Restart a Compose stack, optionally with |
| Read-only | Check the status of a stack start, stop or restart. |
| Mutating | Cancel a running stack start, stop or restart. |
| Mutating | Save secret environment variables for a stack. Pass value |
| Mutating | Overwrite the raw |
Extended (each domain off by default — set its toggle to true to enable)
Domain | Toggle | Status | Tool | Type | Description |
Backups |
| disabled by default |
| Read-only | List configured backups (stack or volume backup jobs) in Dockhand. |
Backups |
| disabled by default |
| Read-only | List backup snapshots, optionally scoped to a single backup config. |
Backups |
| disabled by default |
| Mutating | Manually trigger a backup config to run now. Returns immediately with a jobId — poll with |
Backups |
| disabled by default |
| Read-only | Check the status of a backup run started by |
Backups |
| disabled by default |
| Mutating | Cancel a running backup started by |
Users/Roles |
| disabled by default |
| Read-only | List all Dockhand users. |
Users/Roles |
| disabled by default |
| Read-only | Get details for a single Dockhand user. |
Users/Roles |
| disabled by default |
| Read-only | List all Dockhand roles. Requires an Enterprise license (returns an error on free-tier instances with auth enabled). |
Registries |
| disabled by default |
| Read-only | List configured container registries in Dockhand. Credentials are never included — only a |
Vulnerabilities |
| disabled by default |
| Read-only | List aggregated vulnerability findings for an environment, with optional filtering and pagination. |
Vulnerabilities |
| disabled by default |
| Mutating | Scan every image in an environment for vulnerabilities. Returns immediately with a jobId — poll with |
Vulnerabilities |
| disabled by default |
| Read-only | Check the status of a vulnerability scan started by |
Vulnerabilities |
| disabled by default |
| Mutating | Cancel a running vulnerability scan started by |
Git deploy |
| disabled by default |
| Read-only | List git-backed Compose stacks in Dockhand. |
Git deploy |
| disabled by default |
| Mutating | Pull the latest commit for a git-backed stack from its remote, without redeploying. |
Git deploy |
| disabled by default |
| Mutating | Sync and redeploy a git-backed stack. Returns immediately with a jobId — poll with |
Git deploy |
| disabled by default |
| Read-only | Check the status of a git stack deploy started by |
Git deploy |
| disabled by default |
| Mutating | Cancel a running git stack deploy started by |
Schedules |
| disabled by default |
| Read-only | List all active Dockhand schedules (container auto-updates, git stack syncs, backups, and system jobs). Execution |
Schedules |
| disabled by default |
| Mutating | Manually trigger a schedule to run now. |
Schedules |
| disabled by default |
| Mutating | Enable or disable a schedule. Flips its current enabled state — check the returned |
Container exec |
| disabled by default |
| Mutating | Run a short, non-interactive command in a running container and return stdout, stderr and exit code. Never registered when |
To enable a domain, set its toggle to true in the sidecar's environment (see Configuration), e.g.:
docker run -p 8787:8787 \
-e DOCKHAND_URL=http://dockhand:3000 \
-e DOCKHAND_API_TOKEN=dh_... \
-e MCP_AUTH_TOKEN=... \
-e DOCKHAND_MCP_ENABLE_BACKUPS=true \
-e DOCKHAND_MCP_ENABLE_GIT=true \
dockhand-mcpThe extended domains intentionally wrap only a minimal slice of Dockhand's REST surface for each area (no user/role/registry/git-credential CRUD) — full CRUD for these domains is out of scope, consistent with the project's minimal, LLM-friendly tool surface.
Not yet implemented
The tools above cover a deliberately minimal slice of Dockhand's REST API (checked against the Dockhand v1.0.51 OpenAPI spec, static/openapi.json in Finsys/dockhand). These are the known gaps, roughly in priority order. They are candidates, not commitments.
Stacks
Deploy history (
GET /stacks/{name}/deploys,/{runId},/{runId}/log) — useful for debugging failed deploysRead and write the compose file (
/stacks/{name}/compose), validate a stackCreate, delete and adopt stacks; stack tags
Containers
Create a container,
update-runtime, release notes for an update (/version-notes)Clear pending-update records, streaming batch update (
batch-update-stream)Auto-update settings per container (
/auto-update/{containerName})File browser, compose view, live log and stats streams
Pruning and system
Prune images, containers, networks, volumes, or all (
/prune/*) — destructive, would need its own toggleSystem info and disk usage (
/system,/system/disk), per-environment disk warnings
Images, volumes, networks, registries
Images: history, tag, push, load/export, scan a single image
Volumes: create, clone, browse, export
Networks: create, remove, connect, disconnect
Registries: search, tags, catalog, create/update/delete
Backups
Restore and restore preview, destinations (list, test, verify), snapshot browse/diff/delete, config create/update/delete
Git
Create/update/delete git stacks, repositories, credentials (would need secret redaction), env files, webhooks
Vulnerabilities
Counts and export (
/vulnerabilities/count,/export)
Other
Environment management (create, update, test, delete), templates, schedule execution history and settings,
/batchUser and role create/update/delete, MFA
Known caveats
MIN_DOCKHAND_VERSION(1.0.41) has not been re-verified against the newest tools —restart_stackwithmode=orderedneeds Dockhand 1.0.46 or later. Dockhand does not expose its version over the API, so this is not enforced at runtime.exec_containeris bounded to about 30s on remote (Hawser/TCP) environments and takes an argv array, not a shell string.There is no automated check that tool paths still exist in Dockhand's OpenAPI spec; a spec-drift test would catch renamed or removed endpoints.
Development
npm install
npm run dev # watch mode
npm test # run tests
npm run build # compile to dist/This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server exposing SMI Aware tools, resources, and skills over Streamable HTTP.
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
MCP server for Superserve sandboxes: create, exec, and manage Firecracker microVMs
Streamable HTTP MCP server exposing planner flows, tasks, and squads.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA standalone MCP server that exposes Rancher-side tools, forwards Authorization headers or uses configured credentials, and supports HTTP and stdio transports.MIT
- AlicenseNot gradedqualityAmaintenanceMCP server for managing Docker containers, images, networks, volumes, and Compose projects via Arcane, exposing a single 'arcane' tool for read/write operations over stdio or HTTP.3AGPL 3.0
- FlicenseAqualityBmaintenanceRead-only MCP adapter for the Dockhand REST API, enabling secure querying of container environments, networks, stacks, and runtime status via STDIO or authenticated HTTP.81-
- AlicenseNot gradedqualityBmaintenanceMCP server exposing the Dockhand API as MCP tools. Enables AI assistants to manage Docker infrastructure including containers, stacks, images, networks, and volumes across multiple hosts.MIT