Skip to content

dockerhub-api

Docker Hub API + MCP Server + A2A Agent for the agent-utilities ecosystem — a typed, action-routed connector for the official Docker Hub API v2 (https://hub.docker.com).

Official documentation

This site is the canonical reference for dockerhub-api, maintained alongside every release.

PyPI MCP Server License GitHub

Overview

dockerhub-api wraps the Docker Hub REST surface with typed, deterministic MCP tools and an optional Pydantic-AI agent server. It provides:

  • Api — a Python client (dockerhub_api.api_client.Api) composed from per-domain mixins covering repositories and tags, immutable tags, personal and organization access tokens, organization members/settings/invites, teams, audit logs, and SCIM 2.0 provisioning.
  • Action-routed MCP tools — seven consolidated, togglable tool modules (hub_auth, hub_repos, hub_org, hub_teams, hub_audit, hub_scim, hub_admin) that minimize token overhead in LLM contexts.
  • An A2A agent server — a Pydantic-AI graph agent (console script dockerhub-agent) that calls the MCP tool surface and exposes an AG-UI web interface.

The connector remains inactive when credentials are absent: configure DOCKERHUB_USERNAME and DOCKERHUB_TOKEN (password, PAT dckr_pat_*, or org access token) to connect it to Docker Hub.

Explore the documentation

  • Installation — pip, source, extras, and the prebuilt Docker image.
  • Deployment — run the MCP and agent servers, Docker Compose.
  • Usage — the MCP tools, the Api client, and the CLI.
  • Backing Platform — Docker Hub accounts, tokens, and org governance.
  • Overview — the action-routed tool surface and architecture.
  • Concepts — the CONCEPT:HUB-* registry.

Quick start

pip install "dockerhub-api[mcp]"
dockerhub-mcp                        # stdio MCP server (default transport)

Connect it to Docker Hub:

export DOCKERHUB_USERNAME=youruser
export DOCKERHUB_TOKEN=dckr_pat_xxx
dockerhub-mcp --transport streamable-http --host 0.0.0.0 --port 8000

See Installation and Deployment for the full walkthrough.