Docker Hub MCP Server
Official Docker MCP server: image search, tags, repositories and Docker Hardened Images on Docker Hub
Install
git clone https://github.com/docker/hub-mcp.git
cd hub-mcp
npm install
npm run buildBuild before adding it to a client.
This is third-party code. Review the repository files before installing.
What it does
The server connects the agent to the Docker Hub API. The agent searches images with architecture, OS and category filters, reads tags and checks whether a version exists. With a personal access token it can create repositories, update their info and list namespaces. A separate tool lists Docker Hardened Images mirrored in a namespace.
Who it is for. For developers and DevOps engineers who pick base images and maintain Docker Hub repositories.
Good fit when
- You need a small or official base image
- You need to check whether a tag exists for an architecture
- You want to review your own Docker Hub repositories
Not a fit when
- Your images live in a private registry, not Docker Hub
- You need to manage local containers rather than the registry
Example request
Find a minimal Node.js image and check whether it has an arm64 tagLimitations
No npm package: you clone and build the repository, Node.js 22+ is required. Without a token only public content is available. In http mode the server refuses to start without MCP_AUTH_TOKEN, since any network client would otherwise act as you. Docker Hub access from Russia is unreliable, so it may not work without a VPN.
How to disable. Remove the docker-hub block from the MCP config, restart the client and revoke the token in Docker Hub settings if needed.
MCP
- Transport
- stdio, http
- Authentication
- API key
| Environment variables | |
|---|---|
| HUB_PAT_TOKEN secret | Docker Hub personal access token for your own repositories |
| MCP_AUTH_TOKEN secret | Bearer token for incoming requests, required in http mode |
Security check
- With a token it can create and modify repositories
- Calls the Docker Hub API over the network
README in short
The README covers building from source, running over stdio or http and hardening http mode: loopback binding, a required bearer token and host allow-lists. It gives configs for Claude Desktop, VS Code and Ask Gordon, sample tasks and the full tool list. Apache 2.0 licensed.
FAQ
Do I need a token?
Not for searching public images. For your own repositories set a Docker Hub personal access token in HUB_PAT_TOKEN.
Does it work with Ask Gordon?
Yes, the README includes a gordon-mcp.yml example for the Docker Desktop assistant.
Related
An MCP server built into the Netdata agent: metrics, logs, alerts and live process, service and container data for an AI assistant
GitHub's official MCP server: code, issues, pull requests, Actions and security alerts straight from the agent
AWS's official MCP server suite: docs, IaC, containers, serverless, databases, cost and monitoring
A GitHub Action that runs Claude Code in pull requests and issues: answers mentions, reviews and makes changes