MCP Directory

How to add Docker Hub MCP Server to Cursor

Official Docker Hub MCP server for searching images, reading metadata and managing repositories. Paste the config into ~/.cursor/mcp.json and restart Cursor.

Last updated June 15, 2026 · 250 · stdio · apikey · official

Cursor config for Docker Hub MCP Server

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>
{
  "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>"
      }
    }
  }
}

Setup steps

  1. 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the Docker Hub MCP Server config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of Docker Hub MCP Server's tools to confirm it's connected.

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)

What Docker Hub MCP Server can do in Cursor

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.

Security

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 + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Docker Hub MCP Server config there under the "mcpServers" key and restart the client.

Is Docker Hub MCP Server safe to use with Cursor?

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.

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.

View repo Full Docker Hub MCP Server page