Λογότυπο MCP Dockhand

MCP Dockhand

Κοινότητα
strausmann

MCP Server for Dockhand Docker Management - exposes 130+ API endpoints as MCP tools

Εκδότηςstrausmann
Αποθετήριοmcp-dockhand
ΓλώσσαTypeScript
Forks
6
Αστέρια
64
Διαθέσιμα εργαλεία
0
Τύπος μεταφοράςstdio, streamable-http
Κατηγορίες
Άδεια χρήσηςMIT
Σύνδεσμοι
  • Συνδέστε εργαλεία σε ροές εργασίας AI

    Το MCP Dockhand παρέχει δυνατότητες MCP που μπορούν να χρησιμοποιηθούν από συμβατές εφαρμογές-πελάτες AI και πράκτορες AI.

  • 0 διαθέσιμα εργαλεία

    Περιηγηθείτε παρακάτω στις ενέργειες που μπορούν να κληθούν, μαζί με τα ονόματα και τις περιγραφές τους, όταν παρέχονται από τον διακομιστή.

  • Ρυθμίσεις έτοιμες για αντιγραφή

    Χρησιμοποιήστε τα αποσπάσματα εγκατάστασης για να ρυθμίσετε αυτόν τον διακομιστή στην εφαρμογή-πελάτη MCP που προτιμάτε.

  • Δείκτες ενδιαφέροντος για τον ανοιχτό κώδικα

    64 αστέρια και 6 διακλαδώσεις στο συνδεδεμένο αποθετήριο.

MCP Dockhand

CI License: MIT Docker

An MCP (Model Context Protocol) server that exposes the Dockhand API as MCP tools. Manage your entire Docker infrastructure through AI assistants.

API coverage: 88.7% of in-scope Dockhand endpoints (282/318) have an MCP tool — see docs/coverage.md for the full, auto-updated breakdown by area.

Dockhand is a Docker management server that connects to multiple Docker hosts via Hawser agents. This MCP server provides full programmatic access to all Dockhand features.

Features

  • 280+ MCP Tools covering the Dockhand API — see docs/coverage.md for exact, auto-updated coverage
  • Streamable HTTP Transport (MCP Spec 2025-03-26) for Docker container hosting
  • Session-based Auth with auto-relogin on 401
  • SSE Support for deploy operations (start, stop, down, restart)
  • Environment Filter enforced on all container/stack/image/network/volume endpoints
  • Docker Ready with multi-stage build, non-root user, and health checks

Quick Start

Docker (recommended)

bash
docker run -d \
  --name mcp-dockhand \
  -p 8080:8080 \
  -e DOCKHAND_URL=https://your-dockhand-server.com \
  -e DOCKHAND_USERNAME=your-username \
  -e DOCKHAND_PASSWORD=your-password \
  ghcr.io/strausmann/mcp-dockhand:latest

Optionally, replace the DOCKHAND_USERNAME/DOCKHAND_PASSWORD pair with -e DOCKHAND_API_TOKEN=dh_your-api-token to authenticate with a personal API token instead — see Authentication.

Docker Compose

yaml
services:
  mcp-dockhand:
    image: ghcr.io/strausmann/mcp-dockhand:latest
    container_name: mcp-dockhand
    restart: unless-stopped
    ports:
      - "8080:8080"
    environment:
      - DOCKHAND_URL=https://your-dockhand-server.com
      - DOCKHAND_USERNAME=your-username
      - DOCKHAND_PASSWORD=your-password
      # Optional: use a personal API token instead of the pair above.
      #- DOCKHAND_API_TOKEN=dh_your-api-token

From Source

bash
git clone https://github.com/strausmann/mcp-dockhand.git
cd mcp-dockhand
npm install
npm run build
DOCKHAND_URL=https://your-server.com DOCKHAND_USERNAME=admin DOCKHAND_PASSWORD=secret npm start

(Or, in place of the credential pair, DOCKHAND_API_TOKEN=dh_your-api-token — see Authentication.)

Configuration

VariableRequiredDefaultDescription
DOCKHAND_URLYes-Dockhand server URL
DOCKHAND_USERNAMEYes, unless DOCKHAND_API_TOKEN is set-Dockhand username
DOCKHAND_PASSWORDYes, unless DOCKHAND_API_TOKEN is set-Dockhand password
DOCKHAND_API_TOKENNo-Optional alternative to the username/password pair: a personal API token (dh_…) sent as Authorization: Bearer. When set, DOCKHAND_USERNAME/DOCKHAND_PASSWORD are not required.
MCP_PORTNo8080Port for the MCP server
MCP_SESSION_TTL_SECONDSNo1800Inactivity timeout before a retained MCP session is expired
MCP_SESSION_CLEANUP_INTERVAL_SECONDSNo300Interval for removing expired sessions (clamped to the session TTL)
MCP_MAX_SESSIONSNo0Maximum retained sessions; 0 keeps the existing unlimited behavior
MCP_MAX_REQUEST_BODY_BYTESNo104857600 (100 MB)Maximum /mcp JSON request-body size in bytes. Ceiling ~512 MiB (Node's max string length — express.json must materialize the whole body as one string, so a larger body would fail regardless). Raise it when load_image needs a larger docker save tar — the base64 MCP payload is ~33% larger than the raw tar. A malformed, non-positive, or too-large value is ignored/capped with a startup warning. Passed through in docker-compose.yml, so setting it in .env reaches the container
MCP_HOSTNo0.0.0.0Listen address. Kept as the wildcard address by default so the published Docker port (-p 8080:8080 / docker-compose.yml) keeps working; see Securing the transport for the recommended way to protect the endpoint instead of binding loopback-only
MCP_ALLOWED_HOSTSNo(unset — Host check disabled)Comma-separated Host header allowlist for /mcp (DNS-rebinding protection). Opt-in: unset means no Host check at all (pre-existing behavior, so existing deployments aren't broken by an update). Recommended once you set it up — see Securing the transport
MCP_ALLOWED_ORIGINSNo(unset — Origin check disabled)Comma-separated Origin header allowlist for /mcp. Opt-in, same as above. Only enforced when a caller actually sends an Origin header at all (non-browser MCP clients typically don't)
MCP_AUTH_TOKENNo(unset — endpoint unauthenticated)Shared secret required as Authorization: Bearer <token> on every /mcp request. Opt-in; recommended once the endpoint is reachable beyond your own loopback — see Securing the transport
LOG_LEVELNoinfoerror, warn, info or debug. debug adds one line per Dockhand request (method, endpoint template, status, duration). For requests through the client the duration spans the full response body and a bytes body-size field is added; the login and self-check probes (which bootstrap the client and so can't route through it) log time-to-headers without a bytes field. Never a path segment or a parameter value. An unrecognised value warns and falls back to info.
TRUSTED_PROXIESNo(empty)Comma-separated addresses or CIDRs allowed to set X-Forwarded-For / X-Real-IP, e.g. 10.0.0.0/8, 100.64.0.0/10. Empty means the headers are ignored and the peer address is used.

Securing the transport

/mcp binds 0.0.0.0:8080 by default (see MCP_HOST above), and out of the box — with none of MCP_ALLOWED_HOSTS, MCP_ALLOWED_ORIGINS, or MCP_AUTH_TOKEN set — it accepts any request with no Host/Origin check and no authentication. This is the same behavior mcp-dockhand has always had, kept as the default deliberately: enabling a check by default would reject requests from any client that doesn't reach the server as localhost/127.0.0.1 (a LAN IP, a reverse proxy, a Docker network alias), breaking existing deployments on a routine update.

You should turn this on once /mcp is reachable beyond your own machine's loopback interface — the server holds one Dockhand admin credential and every tool call acts with that identity, so anyone who can open an MCP session controls Docker (container exec, host bind-mounts via create_container, file read/write, stored git credentials). With no protection configured, the server logs a [security] WARNING at startup as a reminder. Three independent, all-opt-in layers are available:

  1. Host allowlist (MCP_ALLOWED_HOSTS). Once set to a non-empty value, every request to /mcp — POST, GET, and DELETE — is rejected with 403 unless its Host header matches the allowlist. This is the primary defense against DNS-rebinding: a malicious web page cannot make the operator's browser reach the server under a Host value the allowlist accepts. Set it to however your client actually reaches the server — localhost:8080/127.0.0.1:8080 for the documented local setup, or, if you connect directly by address rather than through localhost (including the mcp-proxy remote-server setup below), the exact host:port your client sends, e.g. 100.100.50.40:8222. Get this wrong and every request is rejected with 403 Invalid Host header — check the message, it echoes the Host value it saw.
  2. Origin allowlist (MCP_ALLOWED_ORIGINS). Once set, any request that does send an Origin header not in the list is rejected with 403. A missing Origin header always passes (the SDK's own MCP client and most non-browser tooling never send one), so this is only useful if a browser-based client talks to /mcp directly; the Host allowlist above is what actually stops DNS-rebinding.
  3. Bearer token (MCP_AUTH_TOKEN). Once set, every /mcp request must carry Authorization: Bearer <token> or is rejected with 401; the comparison is constant-time. Recommended alongside the Host allowlist for any deployment reachable from more than the operator's own machine.
bash
# .env — recommended configuration once /mcp is reachable beyond loopback
MCP_ALLOWED_HOSTS=dock-mcp.internal.example.com
# or, connecting directly by address instead of a hostname:
#MCP_ALLOWED_HOSTS=100.100.50.40:8222
MCP_AUTH_TOKEN=<a long random secret, e.g. `openssl rand -hex 32`>

Securing the server with CrowdSec

The server writes an nginx-format access line to stdout for every request, including the ones it rejects, while the structured application log goes to stderr. CrowdSec parses the access lines with its stock collections — no custom parser required.

Add an acquisition file on the host running your CrowdSec agent:

yaml
source: docker
container_name:
  - mcp-dockhand
labels:
  type: docker
  program: nginx-mcp

Both labels are required, and neither fails loudly if you forget it. type: docker enables crowdsecurity/docker-logs, which unwraps Docker's JSON envelope. program: nginx-mcp enables crowdsecurity/nginx-logs, which matches on program starting with nginx — the -mcp suffix keeps this source distinguishable from your other nginx sources. With one label missing the chain simply produces nothing, and nothing reports it.

Once wired up, the stock scenarios apply:

ScenarioWhat it means here
LePresidente/http-generic-401-bfRepeated 401 on /mcp — someone is guessing MCP_AUTH_TOKEN
crowdsecurity/http-dos-swithcing-uaRequest floods with rotating user agents

A 403 is worth watching too: it means a request failed the MCP_ALLOWED_HOSTS or MCP_ALLOWED_ORIGINS check, which is what a DNS-rebinding attempt looks like from here.

The stock 401 scenario only counts POST. Its filter is evt.Parsed.verb == 'POST' — one literal, not a list. This server serves POST, GET and DELETE on /mcp, and the bearer check runs ahead of all three, so a wrong token on GET /mcp or DELETE /mcp returns 401 exactly like POST does — and LePresidente/http-generic-401-bf never counts those. Someone guessing MCP_AUTH_TOKEN over GET /mcp is invisible to it.

This is a property of the upstream scenario, shared with every nginx deployment that uses it — not something this server's log format can fix. To close it, add a local scenario that drops the verb filter, or matches the three methods this server answers on. Until then, treat the row above as "repeated 401 on POST /mcp".

Set TRUSTED_PROXIES before you enable this. Behind a reverse proxy every request arrives from the proxy's address. Without TRUSTED_PROXIES that address is what gets logged — so the first ban CrowdSec issues takes out the proxy, and with it every user behind it. Set it to the address or subnet your proxy talks from.

The setting is equally deliberate in the other direction: the forwarding headers are only honoured from a peer on that list. Trusting them unconditionally would let any direct caller name an arbitrary third party and have them banned.

One expected side effect: the structured JSON lines share the container's log stream and carry the same program label, so they fail the nginx pattern and count as unparsed in cscli metrics. That is noise, not a fault — no alert, no decision.

MCP Client Configuration

Claude Desktop / Claude Code

Add to your MCP settings:

json
{
  "mcpServers": {
    "dockhand": {
      "url": "http://localhost:8080/mcp"
    }
  }
}

If the server enforces a bearer token (MCP_AUTH_TOKEN set — see Securing the transport), the client must send it as an Authorization header, or every request is rejected with 401. In Claude Code's .mcp.json, add a headers block — reference an environment variable so the token never lives in the (often version-controlled) config file:

json
{
  "mcpServers": {
    "dockhand": {
      "type": "http",
      "url": "http://your-server:8080/mcp",
      "headers": { "Authorization": "Bearer ${DOCKHAND_MCP_TOKEN}" }
    }
  }
}

Send the token only over an encrypted transport. A bearer over plain http:// on a shared network can be sniffed — terminate TLS at a reverse proxy, or reach the server over a WireGuard/Tailscale/VPN link (the app-layer HTTP is then encrypted by the tunnel).

Export DOCKHAND_MCP_TOKEN in the environment Claude Code is launched from (e.g. from a gitignored .env you source before starting). The Host/host:port you connect to must also be in the server's MCP_ALLOWED_HOSTS if that allowlist is set. For Claude Desktop (native config has no headers field), pass the token through the mcp-proxy workaround below — mcp-proxy forwards an Authorization header via its own environment/args.

Claude Desktop with a remote server (mcp-proxy)

Claude Desktop can fail to connect to a remote mcp-dockhand server (not localhost) using the native "url" config above, even though the endpoint itself is reachable. The symptom is a generic "not a valid MCP server" error in Claude Desktop, while a plain browser/curl request to the same URL correctly returns {"error":"Invalid or missing session ID"}. This is a known limitation of Claude Desktop with remote Streamable HTTP servers, not a mcp-dockhand bug.

Workaround: wrap the connection with mcp-proxy, which translates Streamable HTTP to stdio — a transport Claude Desktop handles reliably:

json
{
  "mcpServers": {
    "dockhand": {
      "command": "/path/to/mcp-proxy",
      "args": ["--transport", "streamablehttp", "http://your-server:8080/mcp"]
    }
  }
}

All tools load and work correctly through the proxy. Thanks to @deadrubberboy for reporting this and sharing the workaround (#90).

Tool Reference

Containers (27 tools)

ToolDescription
list_containersList all containers in an environment
get_containerGet container details
inspect_containerDocker inspect (full details)
get_container_logsGet container logs
get_container_statsGet resource usage stats
get_container_topGet running processes
start_containerStart a container
stop_containerStop a container
restart_containerRestart a container
pause_containerPause a container
unpause_containerUnpause a container
rename_containerRename a container
update_containerUpdate container settings
create_containerCreate a new container
get_container_shellsList available shells
exec_containerCreate a terminal exec session (execId + WS connectionInfo); does NOT run a one-shot command or return output — no such endpoint exists in the Dockhand API
list_container_filesBrowse files inside container
get_container_file_contentRead file from container
create_container_fileCreate an empty file or directory in container (no content — use write_container_file_content for that)
delete_container_fileDelete file in container
rename_container_fileRename file in container
chmod_container_fileChange file permissions
check_container_updatesCheck for image updates
get_pending_updatesGet pending updates
batch_update_containersBatch update containers
execute_batchRun a bulk lifecycle operation (start/stop/restart/remove/etc.) across containers, images, volumes, networks, or stacks
get_container_sizesGet container disk sizes
get_containers_statsGet aggregated stats

Stacks (21 tools)

ToolDescription
list_stacksList all stacks
get_stackGet stack details
create_stackCreate and optionally deploy a stack
start_stackStart a stack (compose up)
stop_stackStop a stack (compose stop)
restart_stackRestart a stack
down_stackTake down a stack (compose down)
delete_stackDelete a stack
get_stack_composeRead compose file
update_stack_composeUpdate compose file
get_stack_envRead environment variables
update_stack_envUpdate environment variables (merge by default — safe for partial updates; use mode="replace" to overwrite all)
get_stack_env_rawRead raw .env file
validate_stack_envValidate env variables
scan_stacksScan filesystem for stacks
adopt_stackAdopt an untracked stack
relocate_stackMove stack to new path
get_stack_sourcesGet stack sources
get_stack_base_pathGet base path
get_stack_path_hintsGet path suggestions
validate_stack_pathValidate a stack path

Images (9 tools)

ToolDescription
list_imagesList all images
get_imageGet image details
get_image_historyGet image layer history
tag_imageTag an image
remove_imageRemove an image
pull_imagePull an image
push_imagePush an image
scan_imageVulnerability scan (Trivy/Grype)
export_imageExport image as tarball

Environments (18 tools)

ToolDescription
list_environmentsList all environments
get_environmentGet environment details
create_environmentCreate an environment
update_environmentUpdate an environment
delete_environmentDelete an environment
test_environmentTest connection
test_environment_connectionTest without saving
detect_docker_socketAuto-detect socket
get_environment_timezoneGet timezone
set_environment_timezoneSet timezone
get_environment_update_checkGet update-check settings
set_environment_update_checkSet update-check settings
get_environment_image_pruneGet image prune settings
set_environment_image_pruneSet image prune settings
list_environment_notificationsList notifications
create_environment_notificationCreate notification
get_environment_notificationGet notification
delete_environment_notificationDelete notification

Networks (7 tools)

ToolDescription
list_networksList all networks
get_networkGet network details
inspect_networkInspect network
create_networkCreate a network
remove_networkRemove a network
connect_container_to_networkConnect container
disconnect_container_from_networkDisconnect container

Volumes (9 tools)

ToolDescription
list_volumesList all volumes
get_volumeGet volume details
inspect_volumeInspect volume
browse_volumeBrowse files in volume
get_volume_file_contentRead file from volume
release_volume_browseRelease browse session
clone_volumeClone a volume
export_volumeExport volume
remove_volumeRemove volume (destructive)

Git Stacks (15 tools)

ToolDescription
list_git_stacksList Git-based stacks
get_git_stackGet Git stack details
deploy_git_stackDeploy a Git stack (SSE)
sync_git_stackSync with remote repo
test_git_stackTest Git connection
get_git_stack_env_filesGet env files
trigger_git_webhookTrigger webhook
get_git_webhookGet webhook details
list_git_credentialsList Git credentials
create_git_credentialCreate Git credential
get_git_credentialGet credential details
update_git_credentialUpdate credential
delete_git_credentialDelete credential
list_git_repositoriesList Git repositories
create_git_repositoryCreate repository config

Dashboard & Activity (8 tools)

ToolDescription
get_dashboard_statsGet dashboard statistics
get_dashboard_preferencesGet display preferences
set_dashboard_preferencesSet display preferences
get_activity_feedGet activity feed
get_container_activityContainer activity
get_activity_eventsActivity events
get_activity_statsActivity statistics
get_merged_logsMerged logs from containers

Auth & Hawser (12 tools)

ToolDescription
get_auth_sessionCheck session status
get_auth_providersList auth providers
get_auth_settingsGet auth settings
create_oidc_providerCreate OIDC provider
get_oidc_providerGet OIDC provider
test_oidc_providerTest OIDC provider
create_ldap_providerCreate LDAP provider
get_ldap_providerGet LDAP provider
test_ldap_providerTest LDAP provider
list_hawser_tokensList Hawser tokens
create_hawser_tokenCreate Hawser token
revoke_hawser_tokenRevoke Hawser token

Audit (4 tools)

ToolDescription
get_audit_logGet audit log
get_audit_eventsGet audit event types
get_audit_usersAudit data by user
export_audit_logExport audit log

Notifications (8 tools)

ToolDescription
list_notificationsList notifications
create_notificationCreate notification
get_notificationGet notification
update_notificationUpdate notification
delete_notificationDelete notification
test_notificationTest notification
test_notification_configTest without saving
trigger_test_notificationTrigger a real test event for a given event type + payload

Registries (10 tools)

ToolDescription
list_registriesList registries
create_registryAdd registry
get_registryGet registry details
update_registryUpdate registry
delete_registryDelete registry
set_default_registrySet as default
search_registrySearch registry
get_registry_catalogGet catalog
get_registry_imageGet image from registry
get_registry_tagsGet image tags

System & Settings (19 tools)

ToolDescription
health_checkServer health
health_check_databaseDatabase health
get_host_infoHost information
get_system_infoSystem information
get_system_diskDisk usage
list_system_filesList system files
get_system_file_contentRead system file
get_changelogChangelog
get_dependenciesDependencies
get_general_settingsGeneral settings
update_general_settingsUpdate settings
get_theme_settingsTheme settings
update_theme_settingsUpdate theme
get_scanner_settingsScanner settings
update_scanner_settingsUpdate scanner
get_licenseLicense info
activate_licenseActivate license by name and key
get_prometheus_metricsPrometheus metrics
prune_allPrune all resources

Users, Roles & Preferences (20 tools)

ToolDescription
list_usersList users
create_userCreate user
get_userGet user details
update_userUpdate user
delete_userDelete user
get_user_mfa_statusMFA status
enable_user_mfaEnable MFA
disable_user_mfaDisable MFA
get_user_rolesGet user roles
add_user_roleAssign one role to a user (no bulk-replace)
remove_user_roleUnassign one role from a user
list_rolesList roles
create_roleCreate role with name + permissions object
get_roleGet role
update_roleUpdate role
delete_roleDelete role
get_profileGet own profile
update_profileUpdate own profile
get_favoritesGet favorites
set_favoritesSet favorites
list_config_setsList config sets

Schedules (9 tools)

ToolDescription
list_schedulesList schedules
get_schedule_settingsGet settings
update_schedule_settingsUpdate settings
get_schedule_executionsExecution history
get_schedule_executionExecution details
get_scheduleGet schedule
run_schedule_nowRun immediately
toggle_scheduleEnable/disable
toggle_system_scheduleToggle system schedule

Auto-Update (3 tools)

ToolDescription
get_auto_update_settingsGet all auto-update settings
get_container_auto_updateGet container auto-update
set_container_auto_updateSet auto-update policy

Self-help / meta tools (6 tools)

Diagnostics for this MCP server itself, distinct from the Dockhand API tools above — useful for a client or operator asking "is this server healthy and correctly configured?" rather than "is Dockhand healthy?". None of these six take any input arguments, and none of them wrap a single Dockhand endpoint the way the tables above do (get_tool_manifest and get_runtime_stats call no Dockhand endpoint at all) — see src/tools/meta.ts.

ToolDescription
get_server_infoThis server's own version, git SHA, build date, uptime, MCP protocol version, and the Dockhand URL/server version it's connected to
check_for_updateCompares this server's running version against the latest GitHub release (TTL-cached)
get_tool_manifestLists every registered tool with its Dockhand {method, path}, plus the pinned Dockhand OpenAPI commit/version this server's tools were generated against
self_checkEnd-to-end diagnostic: Dockhand reachability, credential validity, and a live, per-environment reachability check (POST /api/environments/{id}/test, run in parallel with a 5s per-environment timeout) plus Hawser-agent-connected status, in one call
validate_configChecks that DOCKHAND_URL and a complete credential set are present — DOCKHAND_API_TOKEN, or DOCKHAND_USERNAME + DOCKHAND_PASSWORD — and that they authenticate successfully
get_runtime_statsIn-process counters for this server: total/per-tool call and error counts, uptime, and the last error's tool/message/timestamp

Notes:

  • check_for_update needs outbound network access to api.github.com (GitHub's releases API) — it will degrade to updateAvailable: null rather than fail if that's unreachable.
  • No meta tool exposes any secret value. validate_config reports only whether the required env vars are present (booleans) and whether they authenticate (a boolean + the raw HTTP status code, e.g. 200/401) — never the credential values themselves. self_check reports auth validity the same way. get_runtime_stats' lastError carries only a tool name, an error message, and a timestamp — never call arguments or response payloads. That error message is not fully opaque, though: for a failed Dockhand API call it can embed a slice of the upstream HTTP status and response body (via DockhandClient's own Dockhand API error: ... returned <status>: <body> message), and it is echoed to whichever MCP client next calls get_runtime_stats — not necessarily the one that hit the original error. It never includes request bodies or credential values, and it is truncated to 500 characters (with an ellipsis marker) before being stored, so an oversized upstream response is never echoed wholesale.

Important Notes

update_stack_env — Merge vs Replace Semantics

The Dockhand REST endpoint PUT /api/stacks/{name}/env has replace-semantics: submitting a partial list of variables silently deletes all other variables from the stack. A single-variable update would wipe everything else.

To prevent accidental data loss, this MCP tool defaults to merge mode:

  1. It fetches the current variable list via GET /api/stacks/{name}/env.
  2. It merges the incoming variables by key (new values overwrite existing ones on key collision).
  3. It writes the full combined list back via PUT.
# Safe partial update — only MY_VAR changes, all others preserved
update_stack_env(environmentId=1, name="my-stack", variables=[{key: "MY_VAR", value: "new"}])

# Explicit full replacement — all other variables are deleted
update_stack_env(environmentId=1, name="my-stack", variables=[...], mode="replace")

Use mode="replace" only when you intentionally want to replace the entire variable set.

Environment ID is Required

Most Docker resource endpoints (containers, stacks, images, networks, volumes) require an environmentId parameter. This maps to the ?env=<id> query parameter in the Dockhand API. Without it, endpoints return empty arrays.

SSE Responses

Deploy operations (start, stop, down, restart, compose update with restart) return Server-Sent Events. The MCP server automatically parses these and returns the final result.

Authentication

The server normally authenticates with DOCKHAND_USERNAME + DOCKHAND_PASSWORD and a session cookie. It automatically:

  • Logs in on first request
  • Stores the session cookie in memory
  • Re-authenticates on 401 responses
  • Handles session timeout (24h)

Optionally, set DOCKHAND_API_TOKEN to a personal API token instead — create one on your Dockhand profile page, under API tokens (Dockhand v1.0.26+; bearer auth did not work with an enterprise license in v1.0.25). The token acts as the user who created it, with that user's roles. Every request then carries Authorization: Bearer <token>: no login round-trip, no session cookie to expire, and no re-login on 401. The token also works against an account with MFA enabled, where the session login above cannot complete a TOTP challenge non-interactively.

When DOCKHAND_API_TOKEN is set it is used and the username/password pair is ignored (a warning is logged when both are set), so the pair is not required alongside it. With neither the token nor a complete credential pair, the server exits at startup rather than failing every tool call later. The same happens for a token that is not dh_… base64url text (for example one with a line break from copy/paste); the error names the variable, never its value.

A rejected token is not retried: Dockhand puts an IP into a 5-minute cooldown (HTTP 429) after 15 failed bearer attempts per minute, which would hit every client behind the same address. A revoked or expired token therefore fails fast with an error that names DOCKHAND_API_TOKEN.

Limitations in token mode. Some Dockhand endpoints read only the session cookie (validateSession) or refuse bearer auth on purpose, so these tools do not work with DOCKHAND_API_TOKEN (their descriptions say so too):

Tool(s)Behaviour with a token
get_auth_sessionReports authenticated: false (HTTP 200)
get_profile, update_profile, get_profile_preferences, update_profile_preferences401
add_user_role, remove_user_role, clear_user_roles403
enable_user_mfa, disable_user_mfa403
test_oidc_provider403
create_auth_token, revoke_auth_token403 by design: a leaked token cannot mint or revoke tokens
get_navigation_settings / update_navigation_settingsGlobal scope (the default) works; per-user values are missing (user: null) and scope=user fails with 401

Use the username/password pair for these, or the Dockhand UI.

Troubleshooting

Start with LOG_LEVEL=debug. Every Dockhand request then appears with its endpoint, status code and duration, and every line of a single call shares one call identifier — grep for it to get the whole sequence. The req identifier ties those lines back to the access line that started them, and sid covers everything one client did across its whole session. For requests through the client, ms is the full request duration — it spans the response body being read, not just the time until the response headers arrived, so it reflects what a slow or stalled streamed response (e.g. a deploy's SSE output) actually cost — and bytes is the size of the body that was actually read. (The login and self-check probes bootstrap the client and can't route through it, so their lines log time-to-headers without a bytes field.) A failed Dockhand request additionally logs a warn line carrying errType — the exception name (e.g. TimeoutError, TypeError), a bounded vocabulary rather than free text — so you can filter failures by error type. That warn line fires both when the request itself failed before any response arrived, and when a response body's read failed partway through (e.g. an SSE stream hitting its timeout mid-stream) — either way ms reflects how long it took to fail.

Development

bash
# Install dependencies
npm install

# Type check
npm run typecheck

# Build
npm run build

# Run in development mode
DOCKHAND_URL=https://your-server.com \
DOCKHAND_USERNAME=admin \
DOCKHAND_PASSWORD=secret \
npm run dev

Dockhand API spec

MCP tool routes, query parameters, and request-body contracts are all derived from a single pinned source, docs/dockhand-openapi.json — fetched from a fixed upstream Finsys/dockhand commit by scripts/fetch-openapi.mjs (the pin is mirrored in src/openapi/pinned.ts and kept in sync with SOURCE_COMMIT in that script).

  • npm run api:validate is a hard, PR-blocking CI gate: it fails the build on route/query mismatches and on a tool missing a required body field (BODY_PARAM_MISSING_REQUIRED); other body-contract findings (unknown body fields, untyped passthrough, unresolved contracts, missing tools) stay advisory-only — see docs/body-contract-report.md.
  • npm run api:coverage-doc and npm run api:tool-endpoint-map regenerate the derived docs (docs/coverage.md, src/openapi/tool-endpoint-map.ts, docs/body-contract-report.md); CI checks they're in sync with the code on every PR.
  • A weekly workflow (.github/workflows/drift-bump.yml) bumps the pinned commit toward upstream main and opens a PR — no auto-merge, so any body-contract drift from a new Dockhand release is caught by the hard gate above before it ships.
  • Version-gating (comparing the live Dockhand server's version against the pinned spec) is a separate, not-yet-implemented follow-up.

Linting

npm run lint lints src/ and tests/ with two rules: no-unused-vars and no-explicit-any. Because typescript-eslint does not support the pinned typescript@^7.0.2 compiler — it hard-throws on TS 7.0, not just a peer warning: see typescript-eslint#10940 — the lint runs inside a throwaway node:22 container with pinned TypeScript 5 (the language is identical across TS 5/6/7; only the compiler differs). It mounts src/, tests/ and eslint.config.js read-only, so Docker is required to run it. The same script runs as a hard gate in CI. Unused imports/locals are additionally caught natively on TS 7 by tsc (noUnusedLocals/noUnusedParameters in tsconfig.tests.json, via npm run typecheck:tests).

Testing conventions

These grew out of the test-hardening review of PRs #210–#215 (Issue #224) — several tests there passed while proving nothing. Two mechanical rules and one habit came out of it, and are enforced or expected repo-wide:

noUnusedLocals / noUnusedParameters stay on for tests. They are set in tsconfig.tests.json and checked by npm run typecheck:tests (part of CI). The reason to keep them, spelled out: a value parsed from output into a local that is then never asserted on is a dead assertion — a test that looks like it checks something but doesn't. With these flags on, that is a compile error instead of a silently green test. Do not relax them for test files, and do not add a per-file tsconfig under tests/ to opt a file back out.

A negative assertion must name the field it denies. expect(raw).not.toContain('42') over a whole serialized blob is a coincidence waiting to happen — it can also match a timestamp, an id, or an unrelated field, so it can fail for the wrong reason (or, for a keyword sweep, fail because an unrelated legitimate field's name happens to contain the word). Real case in #215: not.toContain('42') collided with a timestamp. Parse the output and assert on the specific field (obj.route, obj.err.type) instead of the raw string. When the whole point of the check is "no unexpected field anywhere in the tree carries this", walk the object (see walkEntries() in tests/tools/meta.self-check.test.ts, or quotedFields() / statusBytesSegment() in tests/access-log.test.ts) and name the offending path in the assertion message — do not fall back to JSON.stringify(value) plus a blind regex.

Counter-check every new regression test against the un-fixed code, once. If a test stays green against the version of the code it exists to catch, it proves nothing — a fallback path, a duplicate-key dedupe, or an env-driven later failure can all keep a test green for the wrong reason (all three happened across #214/#215). Before considering a new regression test done: revert the fix (or otherwise reintroduce the bug) locally, run the test, confirm it fails for the reason the test claims to check, then restore the fix.

License

MIT

Εγκατάσταση

TypingMind
{
  "mcpServers": {
    "mcp-dockhand": {
      "command": "npm",
      "args": [
        "start"
      ],
      "env": {
        "DOCKHAND_URL": "<DOCKHAND_URL>",
        "DOCKHAND_USERNAME": "<DOCKHAND_USERNAME>",
        "DOCKHAND_PASSWORD": "<DOCKHAND_PASSWORD>"
      }
    }
  }
}

Χρησιμοποιήστε το MCP MCP Dockhand με πολλά μοντέλα AI

Το TypingMind συνδέει τα εργαλεία MCP σε επίπεδο χώρου εργασίας. Έτσι, μόλις συνδεθεί το MCP Dockhand, μπορείτε να το χρησιμοποιείτε με διαφορετικά μοντέλα AI στο TypingMind, αντί να το ρυθμίζετε ξεχωριστά για κάθε μοντέλο. Μπορείτε να εκτελέσετε το MCP τοπικά στη συσκευή σας ή να συνδεθείτε στο URL ενός απομακρυσμένου διακομιστή MCP.

Επιλογή 1: Χρησιμοποιήστε τον τοπικό σύνδεσμο

Επιλέξτε αυτή τη μέθοδο όταν ο διακομιστής MCP χρειάζεται πρόσβαση σε τοπικά αρχεία, εφαρμογές ή ιδιωτικούς πόρους στον υπολογιστή σας.

1

Ανοίξτε τις ρυθμίσεις MCP

Στο TypingMind, μεταβείτε στις «Ρυθμίσεις», έπειτα στις «Σύνθετες ρυθμίσεις» και στο «Model Context Protocol» και επιλέξτε «Ρύθμιση συνδέσμου».

  1. Ανοίξτε το TypingMind στο πρόγραμμα περιήγησής σας.
  2. Κάντε κλικ στο εικονίδιο «Ρυθμίσεις».
  3. Μεταβείτε στις «Σύνθετες ρυθμίσεις».
  4. Ανοίξτε την ενότητα Model Context Protocol.
  5. Κάντε κλικ στην επιλογή «Ρύθμιση συνδέσμου» και επιλέξτε «Αυτή η συσκευή».
Οθόνη ρύθμισης συνδέσμου MCP του TypingMind με επιλεγμένη την επιλογή «Αυτή η συσκευή»
2

Εκτελέστε την εντολή του συνδέσμου

Επιλέξτε «Αυτή η συσκευή», αντιγράψτε την εντολή από το TypingMind και εκτελέστε την στο Τερματικό. Διατηρήστε τη διεργασία σε λειτουργία όσο χρησιμοποιείτε το MCP.

  1. Αντιγράψτε την εντολή ρύθμισης που εμφανίζεται στο TypingMind.
  2. Ανοίξτε το Τερματικό στο macOS ή το Windows Terminal στα Windows.
  3. Επικολλήστε και εκτελέστε την εντολή.
  4. Εγκρίνετε την εγκατάσταση του πακέτου, αν το Τερματικό σάς ζητήσει επιβεβαίωση για να συνεχίσει.
  5. Διατηρήστε ανοιχτό το παράθυρο του Τερματικού και τη διεργασία σε λειτουργία όσο χρησιμοποιείτε εργαλεία MCP.
3

Προσθέστε το MCP Dockhand ως διακομιστή

Όταν η κατάσταση του συνδέσμου είναι «Έτοιμος», κάντε κλικ στο «Αλλαγή servers» και επικολλήστε τις ρυθμίσεις του διακομιστή MCP.

  1. Περιμένετε μέχρι η κατάσταση του συνδέσμου να εμφανιστεί ως «Έτοιμος».
  2. Κάντε κλικ στο «Αλλαγή servers».
  3. Επικολλήστε τις ρυθμίσεις του διακομιστή MCP MCP Dockhand.
  4. Αποθηκεύστε τη λίστα διακομιστών.
  5. Κάντε ανανέωση αν θέλετε να επιβεβαιώσετε ότι ο σύνδεσμος παραμένει έτοιμος για χρήση.
Ρυθμίσεις MCP του TypingMind με ενεργό διακομιστή και το κουμπί «Αλλαγή servers»
{
  "mcpServers": {
    "mcp-dockhand": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-dockhand"
      ]
    }
  }
}
4

Χρησιμοποιήστε τη σύνδεση με διαφορετικά μοντέλα

Αποθηκεύστε τη λίστα διακομιστών, ανοίξτε τα «Πρόσθετα», ενεργοποιήστε τα εργαλεία MCP του MCP Dockhand και έπειτα επιλέξτε οποιοδήποτε υποστηριζόμενο μοντέλο AI στο TypingMind. Χρησιμοποιήστε τα εργαλεία στη συνομιλία ή αναθέστε τα σε έναν πράκτορα AI.

  1. Ανοίξτε τη σελίδα «Πρόσθετα» στο TypingMind.
  2. Ενεργοποιήστε τα εργαλεία MCP του MCP Dockhand.
  3. Ξεκινήστε μια συνομιλία και επιλέξτε το μοντέλο AI που θέλετε να χρησιμοποιήσετε.
  4. Χρησιμοποιήστε τα εργαλεία MCP στη συνομιλία ή αντιστοιχίστε τα σε έναν πράκτορα AI.
  5. Μεταβείτε σε άλλο μοντέλο AI όποτε χρειάζεται, χωρίς να συνδέσετε ξανά το MCP.
Συνομιλία στο TypingMind με ενεργοποιημένα εργαλεία MCP και επιλεγμένο μοντέλο AI
Θα με βοηθήσετε σε αυτό μέσω MCP Dockhand;
MCP Dockhand
Βεβαίως. Το διάβασα.
Δείτε τι βρήκα μέσω του MCP Dockhand.

Επιλογή 2: Προσθέστε URL διακομιστή MCP

Επιλέξτε αυτή τη μέθοδο όταν το MCP Dockhand φιλοξενείται ήδη απομακρυσμένα ή η ομάδα σας θέλει έναν κοινόχρηστο σύνδεσμο στον οποίο μπορούν να έχουν πρόσβαση πολλοί χρήστες.

1

Ανοίξτε τους συνδέσμους MCP

Στο TypingMind, μεταβείτε στα «Πρόσθετα», ανοίξτε τους «Συνδέσμους MCP» και επιλέξτε «Προσθήκη URL».

  1. Ανοίξτε το TypingMind στο πρόγραμμα περιήγησής σας.
  2. Μεταβείτε στα «Πρόσθετα».
  3. Ανοίξτε τους συνδέσμους MCP.
  4. Κάντε κλικ στην επιλογή «Προσθήκη URL».
Φόρμα προσθήκης URL προσαρμοσμένου διακομιστή MCP στο TypingMind
2

Επικολλήστε το URL του διακομιστή

Εισαγάγετε το το URL διακομιστή MCP από τον πάροχο στο πεδίο «URL διακομιστή». Προσθέστε όνομα σύνδεσης, περιγραφή, εικόνα, προσαρμοσμένες κεφαλίδες HTTP ή ρυθμίσεις πελάτη OAuth, εφόσον απαιτούνται από τον διακομιστή.

  1. Επικολλήστε το το URL διακομιστή MCP από τον πάροχο στο πεδίο «URL διακομιστή».
  2. Εισαγάγετε ένα όνομα σύνδεσης για το MCP Dockhand.
  3. Προσθέστε περιγραφή και εικόνα για να αναγνωρίζετε ευκολότερα τη σύνδεση.
  4. Προσθέστε προσαρμοσμένες κεφαλίδες HTTP ή στοιχεία πελάτη OAuth, αν ο διακομιστής απαιτεί έλεγχο ταυτότητας.
3

Δημιουργήστε τη σύνδεση

Κάντε κλικ στην επιλογή «Δημιουργία σύνδεσης», επιστρέψτε στη λίστα προσθέτων και επιβεβαιώστε ότι η νέα σύνδεση MCP είναι ενεργή.

  1. Κάντε κλικ στην επιλογή «Δημιουργία σύνδεσης».
  2. Επιστρέψτε στη λίστα συνδέσμων MCP.
  3. Επιβεβαιώστε ότι η σύνδεση MCP Dockhand εμφανίζεται ως ενεργή.
  4. Ανανεώστε τη λίστα προσθέτων αν η σύνδεση δεν εμφανιστεί αμέσως.
4

Αλλάξτε μοντέλα χωρίς επανασύνδεση

Ξεκινήστε μια συνομιλία με το μοντέλο που προτιμάτε, ενεργοποιήστε τα εργαλεία του MCP Dockhand από τα «Πρόσθετα» και μεταβείτε σε άλλο μοντέλο όποτε χρειάζεται. Η σύνδεση MCP παραμένει διαθέσιμη στον χώρο εργασίας του TypingMind.

  1. Ξεκινήστε μια νέα συνομιλία στο TypingMind.
  2. Επιλέξτε το μοντέλο AI που θέλετε να χρησιμοποιήσετε.
  3. Ενεργοποιήστε τα εργαλεία του MCP Dockhand από τα «Πρόσθετα».
  4. Ζητήστε από το μοντέλο να χρησιμοποιήσει το εργαλείο όταν χρειάζεται.
  5. Μεταβείτε σε άλλο μοντέλο AI και χρησιμοποιήστε ξανά την ίδια σύνδεση MCP.
Συνομιλία στο TypingMind με ενεργοποιημένα εργαλεία MCP και επιλεγμένο μοντέλο AI
Θα με βοηθήσετε σε αυτό μέσω MCP Dockhand;
MCP Dockhand
Βεβαίως. Το διάβασα.
Δείτε τι βρήκα μέσω του MCP Dockhand.

Συχνές ερωτήσεις

Σε τι χρησιμεύει ο διακομιστής MCP MCP Dockhand;

Το MCP Dockhand είναι ένας διακομιστής MCP που επιτρέπει σε συμβατές εφαρμογές AI να συνδέονται με εξωτερικά εργαλεία και πληροφορίες πλαισίου. Στο TypingMind, μπορείτε να προσθέσετε αυτόν τον διακομιστή MCP μία φορά και να κάνετε τα εργαλεία του διαθέσιμα στον χώρο εργασίας AI σας.

Μπορώ να χρησιμοποιήσω το MCP Dockhand MCP με πολλά μοντέλα AI στο TypingMind;

Ναι. Το TypingMind συνδέει τα εργαλεία MCP σε επίπεδο χώρου εργασίας, ώστε να μπορείτε να χρησιμοποιείτε το MCP Dockhand με διαφορετικά μοντέλα AI, όπως τα Claude, ChatGPT, Gemini ή άλλα μοντέλα που έχετε ρυθμίσει στο TypingMind, χωρίς να ρυθμίζετε τον διακομιστή MCP ξεχωριστά για κάθε μοντέλο.

Γιατί να χρησιμοποιήσετε τον σύνδεσμο MCP MCP Dockhand με το TypingMind;

Το TypingMind είναι ένα από τα καλύτερα περιβάλλοντα συνομιλίας με μεγάλα γλωσσικά μοντέλα, καθώς συγκεντρώνει πολλά μοντέλα AI, προτροπές, πρόσθετα, πράκτορες AI, κλειδιά API και εργαλεία MCP σε έναν χώρο εργασίας. Συνδέοντας το MCP Dockhand, μπορείτε να χρησιμοποιείτε τα εργαλεία MCP του με τα μοντέλα που προτιμάτε, διατηρώντας οργανωμένη τη ροή εργασίας των συνομιλιών σας στο TypingMind.

Πώς συνδέω το MCP Dockhand MCP στο TypingMind;

Μπορείτε να συνδέσετε το MCP Dockhand στο TypingMind με τον τοπικό σύνδεσμο MCP ή προσθέτοντας το URL ενός απομακρυσμένου διακομιστή MCP. Χρησιμοποιήστε τον τοπικό σύνδεσμο όταν ο διακομιστής χρειάζεται πρόσβαση σε αρχεία, εφαρμογές ή ιδιωτικούς πόρους στη συσκευή σας και ένα URL διακομιστή όταν ο διακομιστής MCP φιλοξενείται απομακρυσμένα.

Ποια εργαλεία παρέχει το MCP Dockhand MCP στο TypingMind;

Το MCP Dockhand διαθέτει δυνατότητες MCP που μπορείτε να ενεργοποιήσετε από τη σελίδα Πρόσθετα του TypingMind και να χρησιμοποιήσετε σε συνομιλίες ή να αναθέσετε σε πράκτορες AI.

Χρειάζεται να κοινοποιήσω τα κλειδιά API μου στο TypingMind για να χρησιμοποιήσω το MCP Dockhand MCP;

Όχι. Το TypingMind δίνει προτεραιότητα στην τοπική λειτουργία και σας επιτρέπει να διατηρείτε τον έλεγχο των παρόχων μοντέλων, των κλειδιών API, των προτροπών και των ρυθμίσεων MCP σας. Αν το MCP Dockhand απαιτεί έλεγχο ταυτότητας, προσθέστε τις απαιτούμενες κεφαλίδες, τις ρυθμίσεις OAuth ή τις τοπικές ρυθμίσεις για τον συγκεκριμένο διακομιστή MCP κατά τη δημιουργία της σύνδεσης.

Σχετικοί διακομιστές MCP

Προβολή όλων

Στήστε δικό σας χώρο εργασίας AI τώρα

Εγγραφείτε στο ενημερωτικό μας δελτίο για να ενημερώνεστε για νέες λειτουργίες και μελλοντικές κληρώσεις δώρων 👇