Docker Hub MCP Server
Docker's official MCP server for Docker Hub, letting an agent search images, inspect tags and manage your own repositories in natural language, with built-in support for Docker Hardened Images.
Overview
Docker Hub MCP Server gives an agent real, current data about images on Docker Hub instead of relying on a model's memory of which base image tags exist or which one is smaller. It also handles authenticated repository management for your own namespace.
How it works
- Without authentication, it can search Docker Hub content (official images, tags, architectures, operating systems) and check whether a specific repository or tag exists.
- With a Docker Hub Personal Access Token, it adds repository management: creating and updating repositories, pushing images, and listing tags for repos you own.
- It has a dedicated tool for Docker Hardened Images (DHI), so an agent can find a hardened, minimal-footprint alternative to a base image and help rewrite a Dockerfile to use it.
- It integrates directly with Ask Gordon, the AI assistant built into Docker Desktop and the Docker CLI, in addition to working as a standalone MCP server for Claude Desktop or VS Code.
- The HTTP transport binds to loopback and requires a bearer token by default; exposing it more broadly (for example inside a container) needs an explicit host and an allow-list of origins, since anyone who can reach an unauthenticated endpoint could act as your Docker Hub account.
Examples
"Search for a production-ready Postgres image and tell me if there's a
Docker Hardened Images version I could use instead."
Installation
You need Node.js 18+ and Git. A Docker Hub Personal Access Token is only needed if you want repository management, not for search-only use.
- Clone and build the server:
git clone https://github.com/docker/hub-mcp.git cd hub-mcp npm install && npm run build - Start it:
This runs in stdio mode by default; addnpm start--transport=httpto run it as a local HTTP server instead. - Add the server to your MCP client's config, pointing at the stdio process or the local HTTP URL.
- Optional: set a Docker Hub Personal Access Token as an environment variable to enable repository management tools.
- Restart your client and confirm the Docker Hub tools appear.
Related assets
Awesome MCP Servers
The largest community catalog of MCP servers: thousands of entries across dozens of categories (databases, browser automation, cloud, communication and more), tagged by language and scope.
Context7
Pulls updated, version-specific documentation and code examples straight from the source into your prompt, so agents stop citing outdated APIs or hallucinating ones that don't exist.
Playwright MCP
Microsoft's official MCP server for browser automation, driving Playwright through structured accessibility snapshots instead of screenshots, so any MCP client can browse, click and fill forms without a vision model.