Docker Hub

Docker Hub

Docker Hub official MCP server.

10K+

4

13 Tools

Signed
Built by Docker
Requires Secrets
Add to Docker Desktop

Version 4.43 or later needs to be installed to add the server automatically

About

Docker Hub MCP Server

Docker Hub official MCP server.

What is an MCP Server?

Characteristics

AttributeDetails
Docker Imagemcp/dockerhub
Authordocker
Repositoryhttps://github.com/docker/hub-mcp
Dockerfilehttps://github.com/docker/hub-mcp/blob/main/Dockerfile
Docker Image built byDocker Inc.
Docker Scout Health ScoreDocker Scout Health Score
Verify SignatureCOSIGN_REPOSITORY=mcp/signatures cosign verify mcp/dockerhub --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub
LicenceApache License 2.0

Available Tools (13)

Tools provided by this ServerShort Description
checkRepositoryCheck Repository Exists
checkRepositoryTagCheck Repository Tag
createRepositoryCreate Repository in namespace
dockerHardenedImagesList available Docker Hardened Images
getPersonalNamespaceGet Personal Namespace
getRepositoryInfoGet Repository Info
getRepositoryTagGet Repository Tag
listAllNamespacesMemberOfList All Namespaces user is a member of
listNamespacesList Namespaces
listRepositoriesByNamespaceList Repositories by Namespace
listRepositoryTagsList Repository Tags
searchSearch Repositories
updateRepositoryInfoGet Repository Info

Tools Details

Tool: checkRepository

Check if a repository exists in the given namespace.

ParametersTypeDescription
namespacestring
repositorystring

Tool: checkRepositoryTag

Check if a tag exists in a repository

ParametersTypeDescription
namespacestring
repositorystring
tagstring

Tool: createRepository

Create a new repository in the given namespace. You MUST ask the user for the repository name and if the repository has to be public or private. Can optionally pass a description. IMPORTANT: Before calling this tool, you must ensure you have:

  • The repository name (name). Parameters|Type|Description -|-|- namespace|string|The namespace of the repository. Required. description|stringoptional|The description of the repository full_description|stringoptional|A detailed description of the repository is_private|booleanoptional|Whether the repository is private name|stringoptional|The name of the repository (required). Must contain a combination of alphanumeric characters and may contain the special characters ., _, or -. Letters must be lowercase. registry|stringoptional|The registry to create the repository in

Tool: dockerHardenedImages

This API is used to list Docker Hardened Images (DHIs) available in the user organisations. The tool takes the organisation name as input and returns the list of DHI images available in the organisation. It depends on the "listNamespaces" tool to be called first to get the list of organisations the user has access to.

ParametersTypeDescription
organisationstringThe organisation for which the DHIs are listed for. If user does not explicitly ask for a specific organisation, the "listNamespaces" tool should be called first to get the list of organisations the user has access to.

Tool: getPersonalNamespace

Get the personal namespace name

Tool: getRepositoryInfo

Get the details of a repository in the given namespace.

ParametersTypeDescription
namespacestringThe namespace of the repository (required). If not provided the library namespace will be used for official images.
repositorystringThe repository name (required)

Tool: getRepositoryTag

Get the details of a tag in a repository. It can be use to show the latest tag details for example.

ParametersTypeDescription
namespacestring
repositorystring
tagstring

Tool: listAllNamespacesMemberOf

List all namespaces the user is a member of

Tool: listNamespaces

List paginated namespaces

ParametersTypeDescription
pagenumberoptionalThe page number to list repositories from
page_sizenumberoptionalThe page size to list repositories from

Tool: listRepositoriesByNamespace

List paginated repositories by namespace

ParametersTypeDescription
namespacestringThe namespace to list repositories from
content_typesstringoptionalComma-delimited list of content types. Only repositories containing one or more artifacts with one of these content types will be returned. Default is empty to get all repositories.
media_typesstringoptionalComma-delimited list of media types. Only repositories containing one or more artifacts with one of these media types will be returned. Default is empty to get all repositories.
orderingstringoptionalThe ordering of the repositories. Use "-" to reverse the ordering. For example, "last_updated" will order the repositories by last updated in descending order while "-last_updated" will order the repositories by last updated in ascending order.
pagenumberoptionalThe page number to list repositories from
page_sizenumberoptionalThe page size to list repositories from

Tool: listRepositoryTags

List paginated tags by repository

ParametersTypeDescription
repositorystringThe repository to list tags from
architecturestringoptionalThe architecture to list tags from. If not provided, all architectures will be listed.
namespacestringoptionalThe namespace of the repository. If not provided the 'library' namespace will be used for official images.
osstringoptionalThe operating system to list tags from. If not provided, all operating systems will be listed.
pagenumberoptionalThe page number to list tags from
page_sizenumberoptionalThe page size to list tags from

Tool: search

Search for repositories in Docker Hub. It sorts results by best match if no sort criteria is provided. If user asks for secure, production-ready images the "dockerHardenedImages" tool should be called first to get the list of DHI images available in the user organisations (if any) and fallback to search tool if no DHI images are available or user is not authenticated.

ParametersTypeDescription
querystringThe query to search for
architecturesarrayoptionalThe architectures to filter search results
badgesarrayoptionalThe trusted content to search for
categoriesarrayoptionalThe categories names to filter search results
extension_reviewedbooleanoptionalWhether to filter search results to only include reviewed extensions
fromnumberoptionalThe number of repositories to skip
imagesarrayoptionalThe images to filter search results
operating_systemsarrayoptionalThe operating systems to filter search results
orderstringoptionalThe order to sort the search results by
sizenumberoptionalThe number of repositories to return
sortstringoptionalThe criteria to sort the search results by. If the sort field is not set, the best match is used by default. When search extensions, documents are sort alphabetically if none is provided. Do not use it unless user explicitly asks for it.
typestringoptionalThe type of the repository to search for

Tool: updateRepositoryInfo

Update the details of a repository in the given namespace. Description, overview and status are the only fields that can be updated. While description and overview changes are fine, a status change is a dangerous operation so the user must explicitly ask for it.

ParametersTypeDescription
namespacestringThe namespace of the repository (required)
repositorystringThe repository name (required)
descriptionstringoptionalThe description of the repository. If user asks for updating the description of the repository, this is the field that should be updated.
full_descriptionstringoptionalThe full description (overview)of the repository. If user asks for updating the full description or the overview of the repository, this is the field that should be updated.
statusstringoptionalThe status of the repository. If user asks for updating the status of the repository, this is the field that should be updated. This is a dangerous operation and should be done with caution so user must be prompted to confirm the operation. Valid status are active (1) and inactive (0). Normally do not update the status if it is not strictly required by the user. It is not possible to change an inactive repository to active if it has no images.

Use this MCP Server

{
  "mcpServers": {
    "dockerhub": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "HUB_PAT_TOKEN",
        "mcp/dockerhub",
        "--transport=stdio",
        "--username={{dockerhub.username}}"
      ],
      "env": {
        "HUB_PAT_TOKEN": "your_hub_pat_token"
      }
    }
  }
}

Why is it safer to run MCP Servers with Docker?

Manual installation

You can install the MCP server using:

Installation for

Related servers