Version 4.43 or later needs to be installed to add the server automatically
Use cases
About
Docker Hub official MCP server.
| Attribute | Details |
|---|---|
| Docker Image | mcp/dockerhub |
| Author | docker |
| Repository | https://github.com/docker/hub-mcp |
| Attribute | Details |
|---|---|
| Dockerfile | https://github.com/docker/hub-mcp/blob/2ff4b20e40bba93c8002ff8aa4fb10f66c95943a/Dockerfile |
| Docker Image built by | Docker Inc. |
| Docker Scout Health Score | |
| Verify Signature | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/dockerhub --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub |
| Licence | Apache License 2.0 |
| Tools provided by this Server | Short Description |
|---|---|
checkRepository | Check Repository Exists |
checkRepositoryTag | Check Repository Tag |
createRepository | Create Repository in namespace |
dockerHardenedImages | List available Docker Hardened Images |
getPersonalNamespace | Get Personal Namespace |
getRepositoryInfo | Get Repository Info |
getRepositoryTag | Get Repository Tag |
listAllNamespacesMemberOf | List All Namespaces user is a member of |
listNamespaces | List Namespaces |
listRepositoriesByNamespace | List Repositories by Namespace |
listRepositoryTags | List Repository Tags |
search | Search Repositories |
updateRepositoryInfo | Get Repository Info |
checkRepositoryCheck if a repository exists in the given namespace.
| Parameters | Type | Description |
|---|---|---|
namespace | string | |
repository | string |
checkRepositoryTagCheck if a tag exists in a repository
| Parameters | Type | Description |
|---|---|---|
namespace | string | |
repository | string | |
tag | string |
createRepositoryCreate 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 |
dockerHardenedImagesThis 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.
| Parameters | Type | Description |
|---|---|---|
organisation | string | The 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. |
getPersonalNamespaceGet the personal namespace name
getRepositoryInfoGet the details of a repository in the given namespace.
| Parameters | Type | Description |
|---|---|---|
namespace | string | The namespace of the repository (required). If not provided the library namespace will be used for official images. |
repository | string | The repository name (required) |
getRepositoryTagGet the details of a tag in a repository. It can be use to show the latest tag details for example.
| Parameters | Type | Description |
|---|---|---|
namespace | string | |
repository | string | |
tag | string |
listAllNamespacesMemberOfList all namespaces the user is a member of
listNamespacesList paginated namespaces
| Parameters | Type | Description |
|---|---|---|
page | numberoptional | The page number to list repositories from |
page_size | numberoptional | The page size to list repositories from |
listRepositoriesByNamespaceList paginated repositories by namespace
| Parameters | Type | Description |
|---|---|---|
namespace | string | The namespace to list repositories from |
content_types | stringoptional | Comma-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_types | stringoptional | Comma-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. |
ordering | stringoptional | The 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. |
page | numberoptional | The page number to list repositories from |
page_size | numberoptional | The page size to list repositories from |
listRepositoryTagsList paginated tags by repository
| Parameters | Type | Description |
|---|---|---|
repository | string | The repository to list tags from |
architecture | stringoptional | The architecture to list tags from. If not provided, all architectures will be listed. |
namespace | stringoptional | The namespace of the repository. If not provided the 'library' namespace will be used for official images. |
os | stringoptional | The operating system to list tags from. If not provided, all operating systems will be listed. |
page | numberoptional | The page number to list tags from |
page_size | numberoptional | The page size to list tags from |
searchSearch 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.
| Parameters | Type | Description |
|---|---|---|
query | string | The query to search for |
architectures | arrayoptional | The architectures to filter search results |
badges | arrayoptional | The trusted content to search for |
categories | arrayoptional | The categories names to filter search results |
extension_reviewed | booleanoptional | Whether to filter search results to only include reviewed extensions |
from | numberoptional | The number of repositories to skip |
images | arrayoptional | The images to filter search results |
operating_systems | arrayoptional | The operating systems to filter search results |
order | stringoptional | The order to sort the search results by |
size | numberoptional | The number of repositories to return |
sort | stringoptional | The 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. |
type | stringoptional | The type of the repository to search for |
updateRepositoryInfoUpdate 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.
| Parameters | Type | Description |
|---|---|---|
namespace | string | The namespace of the repository (required) |
repository | string | The repository name (required) |
description | stringoptional | The description of the repository. If user asks for updating the description of the repository, this is the field that should be updated. |
full_description | stringoptional | The 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. |
status | stringoptional | The 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. |
{
"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"
}
}
}
}
Manual installation
You can install the MCP server using:
Installation for