Deployment¶
Deployment Options¶
dockerhub-api supports local stdio, a loopback-only development listener, a
least-privilege stdio container, and a remote authenticated HTTPS boundary.
Provider endpoint, credential, selector, identity, and trust material are supplied
at runtime through AgentConfig; none is stored in this repository.
Installed stdio process¶
{
"mcpServers": {
"dockerhub": {
"command": "dockerhub-mcp",
"args": [],
"env": {"MCP_TOOL_MODE": "intent"}
}
}
}
Loopback development listener¶
Do not expose this listener beyond loopback. Network deployments require direct TLS
or an explicitly trusted TLS-terminating ingress, configured authentication, exact
MCP_ALLOWED_HOSTS, and an exact trusted-proxy CIDR policy.
Least-privilege local container¶
docker run -i --rm \
--read-only \
--cap-drop=ALL \
--security-opt=no-new-privileges \
--pids-limit=256 \
--tmpfs /tmp:rw,noexec,nosuid,nodev,size=64m \
-e TRANSPORT=stdio \
registry.example.invalid/dockerhub-api@sha256:<digest> dockerhub-mcp
The operator projects the selected AgentConfig profile into the process at runtime; the image remains immutable and contains no environment connection profile.
Remote authenticated HTTPS endpoint¶
Store the real remote URL, outbound identity reference, and TLS-profile reference in
AgentConfig, not in MCP client JSON or documentation.
MCP server (standalone)¶
pip install "dockerhub-api[mcp]"
export DOCKERHUB_USERNAME=youruser
export DOCKERHUB_TOKEN=dckr_pat_xxx
dockerhub-mcp --transport streamable-http --host 0.0.0.0 --port 8000
Transports: stdio (default), streamable-http, sse.
Docker Compose — MCP only¶
Docker Compose — MCP + A2A agent¶
This starts:
dockerhub-api-mcpon port 8000 (streamable-http,/healthendpoint)dockerhub-api-agenton port 9018 (A2A + AG-UI web interface), pointed at the MCP service viaMCP_URL
MCP client registration¶
Register the server in any MCP-capable client using the template in
mcp_config.json:
{
"mcpServers": {
"dockerhub-api": {
"command": "uv",
"args": ["run", "dockerhub-mcp"],
"env": {
"DOCKERHUB_USERNAME": "youruser",
"DOCKERHUB_TOKEN": "dckr_pat_xxx",
"DOCKERHUB_ALLOW_DESTRUCTIVE": "False"
}
}
}
}
Security posture¶
- Leave
DOCKERHUB_ALLOW_DESTRUCTIVE=Falsein shared deployments; enable it only for operator sessions that genuinely need deletes or org-settings writes. - Prefer organization access tokens scoped with
TYPE_REPOpath globs over account-wide PATs for CI/CD. - Eunomia policies and OTEL/Langfuse tracing are available through the
agent-utilities server bootstrap (see
.env.example).
Debug image¶
docker/debug.Dockerfile builds the package from the working tree with dev
tooling (uv, ripgrep, starship) for interactive debugging: