# docker/hub-mcp [Verified] [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/docker/hub-mcp  
**GitHub Stars:** 170  
**Views:** 54  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/docker-hub-mcp

## Description
Official MCP server to interact with Docker Hub, providing access to repositories, hub search and Docker Hardened Images

## Tools
Capabilities this server exposes over MCP:

- **search** — Search repositories and content using Search V4 API
- **query** — Search query parameter (string, required)
- **architectures** — Filter on architectures (string, optional)
- **badges** — Filter by image content type badges (string, optional)
- **categories** — Filter on categories (string, optional)
- **extension_reviewed** — Filter on reviewed extensions (boolean, optional)
- **from** — Number of documents to skip for pagination (number, optional)
- **images** — Filter on image names (string, optional)
- **operating_systems** — Filter on operating systems (string, optional)
- **order** — Change the ordering of results (string, optional)
- **size** — Maximum number of results to return (number, optional)
- **sort** — Sort results by search field (string, optional)
- **type** — Filter on repository content type (string, optional)
- **get_namespaces** — Get list of namespaces the user is a member of
- **page** — Page number for pagination (string, optional)
- **page_size** — Number of items per page (string, optional)
- **list_repositories_by_namespace** — List all repositories under the provided namespace
- **namespace** — Repository namespace (string, required)
- **content_types** — Comma-delimited list of content types (string, optional)
- **media_types** — Comma-delimited list of media types (string, optional)
- **name** — Search by repository name (string, optional)
- **ordering** — Sort order (string, optional)
- **get_repository_info** — Get information about a repository
- **repository** — Repository name (string, required)
- **check_repository** — Check if a repository exists
- **check_repository_tag** — Check if a specific tag exists in a repository
- **tag** — Tag name (string, required)
- **create_repository** — Create a new repository in the provided namespace
- **body** — Request body data (object, optional)
- **update_repository_info** — Update repository information
- **list_repository_tags** — List all tags for a repository
- **architecture** — Filter by architecture (string, optional)
- **os** — Filter by operating system (string, optional)
- **read_repository_tag** — Get details of a specific repository tag
- **docker_hardened_images** — Query for mirrored Docker Hardened Images (DHI) in the namespace

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "hub-mcp": {
    "url": "https://docs.docker.com/ai/gordon/mcp/yaml/"
  }
}
```

## Documentation

## What docker/hub-mcp does

The docker/hub-mcp MCP server connects MCP clients to Docker Hub APIs. It supports repository and content discovery through the Search V4 API, including filters for architectures, operating systems, image names, categories, badges, content types, reviewed extensions, ordering, sorting, and pagination.

It also exposes repository-management operations. Agents can list namespaces associated with the authenticated user, enumerate repositories in a namespace, retrieve repository details, check whether repositories or tags exist, create repositories, and update repository information.

## How it works

The application is a Node.js project that must be built before it is started. MCP clients can communicate with it through stdio, which is the default transport, or through an HTTP endpoint. Stdio is local to the process that launches the server. HTTP listens on loopback by default and accepts configuration for the port, host, allowed host values, and allowed browser origins.

Without credentials, the docker/hub-mcp MCP server can query public Docker Hub content. Repository operations require a Docker Hub Personal Access Token supplied through `HUB_PAT_TOKEN`; the corresponding Docker Hub username is passed as a startup option. HTTP mode has a separate protection mechanism: `MCP_AUTH_TOKEN` can require a bearer token on each MCP request. The server also validates host and browser-origin values in HTTP mode.

## Setup and configuration

Install Docker and Node.js 22 or newer. From a checkout of the project, install dependencies and build the application:

```bash
npm install
npm run build
```

Start the compiled server with:

```bash
npm start -- --transport=stdio
```

For HTTP transport, use options such as `--transport=http`, `--port=3000`, and `--host=127.0.0.1`. When exposing HTTP beyond loopback, configure `MCP_AUTH_TOKEN` and the relevant `--allowed-hosts` or `--allowed-origins` values. The `--allow-unauthenticated` option disables HTTP authentication and should only be used on an isolated, trusted network.

Claude Desktop can launch the built `dist/index.js` file with Node and `--transport=stdio`. Authenticated configurations add `HUB_PAT_TOKEN` and a `--username` argument. Docker Ask Gordon can also be configured as an MCP client using a Docker build and a `gordon-mcp.yml` service definition.

## Tools and capabilities

The docker/hub-mcp MCP server provides tools for:

- Searching Docker Hub content with query, filter, sort, and pagination parameters.
- Listing user namespaces and repositories within a namespace.
- Reading repository metadata and checking repository or tag existence.
- Creating repositories with optional request-body data.
- Updating repository information.

Search supports filters including architecture, operating system, image name, category, badge, repository type, media type, and content type.

## Limitations and notes

Public queries do not require a PAT, but repository management does. HTTP mode dispatches calls using the server operator’s Docker Hub identity, so exposing the endpoint without authentication can allow reachable clients to perform that identity’s permitted actions, including repository changes.

_Full upstream README: https://allmcps.com/mcp/docker-hub-mcp/readme_

