MCP Directory

Docker Hub MCP Server

Official

Official Docker Hub MCP server for searching images, reading metadata and managing repositories.

Verified
stdio (local)
API key
TypeScript

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
git clone https://github.com/docker/hub-mcp && cd hub-mcp && npm install && npm run build && node dist/index.js --transport=stdio --username=<your-hub-username>

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "docker-hub-mcp-server": {
      "command": "node",
      "args": [
        "/absolute/path/to/hub-mcp/dist/index.js",
        "--transport=stdio",
        "--username=<your-docker-hub-username>"
      ],
      "env": {
        "HUB_PAT_TOKEN": "<your-docker-hub-pat>"
      }
    }
  }
}

Before you start

  • Node.js 22 or higher
  • Docker installed (for building/running the containerized server)
  • Optional but recommended: a Docker Hub Personal Access Token from your Docker Hub account settings, set via HUB_PAT_TOKEN (plus --username for your Hub username)
  • An MCP-compatible client (e.g. Claude Desktop, Cursor, VS Code)

About Docker Hub MCP Server

The Docker Hub MCP Server is Docker's official Model Context Protocol server for Docker Hub. It connects Docker Hub's APIs to an LLM so an assistant can discover images, read repository and tag metadata, and manage repositories conversationally.

Discovery tools (search, get_repository_info, list_repository_tags, read_repository_tag, check_repository, check_repository_tag) let you find the right image and inspect tags, digests, and details before pulling. Management tools (create_repository, update_repository_info, list_repositories_by_namespace, get_namespaces) let you organize and edit repositories you own. There is also docker_hardened_images for querying mirrored Docker Hardened Images.

It is a Node.js server that runs over stdio by default, with an optional HTTP transport (default port 3000). Read-only/public access works without credentials; authenticated access (private repos, repository management, higher rate limits) requires a Docker Hub Personal Access Token supplied via the HUB_PAT_TOKEN environment variable.

Tools & capabilities (11)

search

Search Docker Hub repositories and content.

get_repository_info

Fetch details about a specific repository.

check_repository

Verify whether a repository exists.

check_repository_tag

Confirm a specific tag is available on a repository.

list_repository_tags

List all tags for a repository.

read_repository_tag

Get metadata (digest, details) for a specific tag.

list_repositories_by_namespace

List repositories within a namespace/organization.

get_namespaces

Retrieve the namespaces the authenticated user belongs to.

create_repository

Create a new repository on Docker Hub.

update_repository_info

Update a repository's metadata/description.

docker_hardened_images

Query mirrored Docker Hardened Images (DHI).

When to use it

  • Use it when you want to find the right base image and compare its tags before pulling.
  • Use it when you need to inspect a tag's digest or metadata without leaving your assistant.
  • Use it when checking whether a repository or specific tag exists.
  • Use it when creating or editing repositories you own under your namespace or org.
  • Use it when auditing repositories across a namespace.
  • Use it when querying Docker Hardened Images for a more secure base image.

Quick setup

  1. 1Ensure Node.js 22+ and Docker are installed.
  2. 2Clone the repo and run npm install then npm run build.
  3. 3(Optional) Create a Docker Hub Personal Access Token for authenticated access.
  4. 4Start it with npm start -- --transport=stdio (or --transport=http --port=3000), passing HUB_PAT_TOKEN and --username for auth.
  5. 5Register the server in your MCP client config and restart the client.
  6. 6Verify by asking the assistant to search Docker Hub for an image.

Security notes

A Docker Hub PAT can push, pull and modify repositories in your namespace; scope it to read-only when you only need image discovery. Do not commit the token and rotate it if exposed.

Docker Hub MCP Server FAQ

Is authentication required?

No for public, read-only discovery. A Docker Hub Personal Access Token (HUB_PAT_TOKEN) is needed for private repos, repository management, and higher rate limits.

Where do I get the token?

Create a Personal Access Token in your Docker Hub account security settings, then set it as the HUB_PAT_TOKEN environment variable.

Is it published to npm?

It is distributed via the docker/hub-mcp GitHub repo; you clone it and run npm install / npm run build / npm start rather than installing a published npm package.

Which transports are supported?

stdio by default, and an HTTP transport via --transport=http with a configurable --port (default 3000).

What are docker_hardened_images?

It is a tool for querying mirrored Docker Hardened Images (DHI), Docker's security-hardened, minimal base images.

Alternatives to Docker Hub MCP Server

Microsoft's official browser-automation MCP using Playwright's accessibility tree (no vision model).

Featured
Verified
stdio (local)
No auth
TypeScript
12 tools
Updated 9 days agoRepo

Up-to-date, version-specific library documentation injected into your coding agent.

Verified
stdio (local)
API key
TypeScript
2 tools
Updated 13 days agoRepo

LSP-powered coding agent toolkit: semantic symbol search, references and structural edits.

Verified
stdio (local)
No auth
Python
11 tools
Updated 11 days agoRepo