From b4f512dfc605c709462969aef0dc9f5be7b80d7f Mon Sep 17 00:00:00 2001 From: sheltongraves <148902861+sheltongraves@users.noreply.github.com> Date: Tue, 24 Jun 2025 21:48:17 -0400 Subject: [PATCH 1/6] Create hub-mcp Adding documentation for the Hub MCP server we will release on July 9th. --- .../ai/mcp-catalog-and-toolkit/hub-mcp | 145 ++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp diff --git a/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp b/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp new file mode 100644 index 00000000000..ca29f29dfc4 --- /dev/null +++ b/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp @@ -0,0 +1,145 @@ +--- +title: Hub MCP +description: Use the MCP Toolkit to set up MCP servers and MCP clients. +keywords: Docker Hub MCP Server, Hub MCP server, Hub MCP +--- + +The Docker Hub MCP Server is a Model Context Protocol (MCP) server that interfaces with Docker Hub APIs to make rich image metadata accessible to LLMs, enabling intelligent content discovery and repository management. Developers building with containers, especially in AI and LLM-powered workflows, often face inadequate context across the vast landscape of Docker Hub images. As a result, LLMs struggle to recommend the right images, and developers lose time manually searching instead of building. + +## Key features + +- Advanced LLM Context: Our MCP Server provides LLMs with detailed, structured context for Docker Hub images, enabling smarter, more relevant recommendations for developers, whether they're choosing a base image or automating CI/CD workflows. +- Natural Language Image Discovery: Developers can find the right container image using natural language, no need to remember tags or repository names. Just describe what you need, and Docker Hub will return images that match your intent. +- Simplified Repository Management: Hub MCP Server enables agents to manage repositories through natural language fetching image details, viewing stats, searching content, and performing key operations quickly and easily. + +## Install Docker Hub MCP server + +1. From the **MCP Toolkit** menu, select the **Catalog** tab and search for **Docker Hub** and select the plus icon to add the Docker Hub MCP server. +2. In the server's Configuration tab, insert your Docker Hub username and personal access token (PAT). +3. In the Clients tab in MCP Toolkit, ensure Gordon is connected. +4. From the **Ask Gordon** menu, you can now send requests related to your + Docker Hub account, in accordance to the tools provided by the Docker Hub MCP server. To test it, ask Gordon: + + ```text + What repositories are in my namespace? + ``` + +> [!TIP] +> By default, the Gordon [client](#install-an-mcp-client) is enabled, +> which means Gordon can automatically interact with your MCP servers. + +## Usage examples + +This section provides task-oriented examples for common operations with Docker Hub +tools. + + +### Finding images + +```console +# Search for official images +$ docker ai "Search for official nginx images on Docker Hub" + +# Search for lightweight images to reduce deployment size and improve performance +$ docker ai "Search for minimal Node.js images with small footprint" + +# Get the most recent tag of a base image +$ docker ai "Show me the latest tag details for go" + +# Find a production-ready database with enterprise features and reliability +$ docker ai "Search for production ready database images" + +# Compare Ubuntu versions to choose the right one for my project +$ docker ai "Help me find the right Ubuntu version for my project" +``` + + +### Repository Management + +```console +# Create a repository +$ docker ai "Create a repository in my namespace" + +# List all repositories in my namespace +$ docker ai "List all repositories in my namespace" + +# Find the largest repository in my namespace +$ docker ai "Which of my repositories takes up the most space?" + +# Find repositories that haven't been updated recently +$ docker ai "Which of my repositories haven't had any pushes in the last 60 days?" + +# Find which repositories are currently active and being used +$ docker ai "Show me my most recently updated repositories" + +# Get details about a repository +$ docker ai "Show me information about my '' repository" +``` + +### Pull/Push Images +```console +# Pull latest PostgreSQL version +$ docker ai "Pull the latest postgres image" + +# Push image to your Docker Hub repository +$ docker ai "Push my to my repository" +``` + +### Tag Management + +```console +# List all tags for a repository +$ $ docker ai "Show me all tags for my '' repository" + +# Find the most recently pushed tag +$ docker ai "What's the most recent tag pushed to my '' repository?" + +# List tags with architecture filtering +$ docker ai "List tags for in the '' repository that support amd64 architecture" + +# Get detailed information about a specific tag +$ docker ai "Show me details about the '' tag in the '' repository" + +# Check if a specific tag exists +$ docker ai "Check if version 'v1.2.0' exists for my 'my-web-app' repository" +``` + +### Docker Hardened Images + +```console +# List available hardened images +$ docker ai "What is the most secure image I can use to run a node.js application?" + +# Convert Dockerfile to use a hardened image +$ docker ai "Can you help me update my Dockerfile to use a docker hardened image instead of the current one" +``` +> [!NOTE] +> To access Docker Hardened Images, a subscription is required. If you're interested in using Docker Hardened Images, please visit: + [Docker Hardened Images](https://www.docker.com/products/hardened-images/) + + +## Reference + +This section provides a comprehensive listing of the tools you can find +in the Docker Hub MCP Server. + +### Docker Hub MCP Server tools + +Tools to interact with your Docker repositories and discover content on Docker Hub. + +| Name | Description | +|------|-------------| +| `check-repository` | Check repository | +| `check-repository-tag` | Check repository tag | +| `check-repository-tags` | Check repository tags | +| `create-repository` | Creates a new repository | +| `docker-hardened-images` | Lists available [Docker Hardened Images](https://www.docker.com/products/hardened-images/) in specified namespace | +| `get-namespaces` | Get organizations/namespaces for a user | +| `get-repository-dockerfile` | Gets dockerfile for repository | +| `get-repository-info` | Gets repository info | +| `list-repositories-by-namespace` | Lists repositories under namespace | +| `list-repository-tags` | List repository tags | +| `read-repository-tag` | Read repository tag | +| `search` | Search content on Docker Hub | +| `set-repository-dockerfile` | Sets Dockerfile for repository | +| `update-repository-info` | Updates repository info | From 2f4e855480d9cc3eec699ac4215c23c863ee6741 Mon Sep 17 00:00:00 2001 From: sheltongraves <148902861+sheltongraves@users.noreply.github.com> Date: Thu, 26 Jun 2025 09:54:38 -0400 Subject: [PATCH 2/6] Update content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp Co-authored-by: Arthur --- content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp | 1 + 1 file changed, 1 insertion(+) diff --git a/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp b/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp index ca29f29dfc4..82fe2a3e03d 100644 --- a/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp +++ b/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp @@ -77,6 +77,7 @@ $ docker ai "Show me information about my '' repository" ``` ### Pull/Push Images + ```console # Pull latest PostgreSQL version $ docker ai "Pull the latest postgres image" From dc132ae87bbd3ff7af131b73afdeb08986de2174 Mon Sep 17 00:00:00 2001 From: sheltongraves <148902861+sheltongraves@users.noreply.github.com> Date: Thu, 26 Jun 2025 09:54:45 -0400 Subject: [PATCH 3/6] Update content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp Co-authored-by: Arthur --- content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp b/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp index 82fe2a3e03d..f86b211a054 100644 --- a/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp +++ b/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp @@ -4,7 +4,7 @@ description: Use the MCP Toolkit to set up MCP servers and MCP clients. keywords: Docker Hub MCP Server, Hub MCP server, Hub MCP --- -The Docker Hub MCP Server is a Model Context Protocol (MCP) server that interfaces with Docker Hub APIs to make rich image metadata accessible to LLMs, enabling intelligent content discovery and repository management. Developers building with containers, especially in AI and LLM-powered workflows, often face inadequate context across the vast landscape of Docker Hub images. As a result, LLMs struggle to recommend the right images, and developers lose time manually searching instead of building. +The Docker Hub MCP Server is a Model Context Protocol (MCP) server that interfaces with Docker Hub APIs to make rich image metadata accessible to LLMs, enabling intelligent content discovery and repository management. Developers building with containers, especially in AI and LLM-powered workflows, often face inadequate context across the vast landscape of Docker Hub images. As a result, LLMs struggle to recommend the right images, and developers lose time manually searching instead of building. ## Key features From fce8f8309f247d0ceb41a7c2d8ef725f6fa648a3 Mon Sep 17 00:00:00 2001 From: sheltongraves <148902861+sheltongraves@users.noreply.github.com> Date: Thu, 26 Jun 2025 09:54:53 -0400 Subject: [PATCH 4/6] Update content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp Co-authored-by: Arthur --- content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp b/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp index f86b211a054..f0db1d10aeb 100644 --- a/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp +++ b/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp @@ -115,8 +115,7 @@ $ docker ai "What is the most secure image I can use to run a node.js applicatio $ docker ai "Can you help me update my Dockerfile to use a docker hardened image instead of the current one" ``` > [!NOTE] -> To access Docker Hardened Images, a subscription is required. If you're interested in using Docker Hardened Images, please visit: - [Docker Hardened Images](https://www.docker.com/products/hardened-images/) +> To access Docker Hardened Images, a subscription is required. If you're interested in using Docker Hardened Images, visit [Docker Hardened Images](https://www.docker.com/products/hardened-images/). ## Reference From a1bf2bcc02a1d6672c247afe585af3a0052aabaf Mon Sep 17 00:00:00 2001 From: sheltongraves <148902861+sheltongraves@users.noreply.github.com> Date: Thu, 26 Jun 2025 13:33:55 -0400 Subject: [PATCH 5/6] Rename hub-mcp to hub-mcp.md Added md to name --- .../manuals/ai/mcp-catalog-and-toolkit/{hub-mcp => hub-mcp.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename content/manuals/ai/mcp-catalog-and-toolkit/{hub-mcp => hub-mcp.md} (100%) diff --git a/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp b/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp.md similarity index 100% rename from content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp rename to content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp.md From 6366a490c6bf7fa606746fdb48f8cdbfacac8276 Mon Sep 17 00:00:00 2001 From: sheltongraves <148902861+sheltongraves@users.noreply.github.com> Date: Fri, 27 Jun 2025 11:37:27 -0400 Subject: [PATCH 6/6] Update hub-mcp.md Added Claude and VS Code --- .../ai/mcp-catalog-and-toolkit/hub-mcp.md | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp.md b/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp.md index f0db1d10aeb..cb9f6c71849 100644 --- a/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp.md +++ b/content/manuals/ai/mcp-catalog-and-toolkit/hub-mcp.md @@ -27,6 +27,83 @@ The Docker Hub MCP Server is a Model Context Protocol (MCP) server that interfac > [!TIP] > By default, the Gordon [client](#install-an-mcp-client) is enabled, > which means Gordon can automatically interact with your MCP servers. +> +## Use Claude Desktop as a client + +1. Add the Docker Hub MCP Server configuration to your `claude_desktop_config.json`: + +#### For public repositories only: + + - `/FULL/PATH/TO/YOUR/docker-hub-mcp-server` - The complete path to where you cloned this repository +```json +{ + "mcpServers": { + "docker-hub": { + "command": "node", + "args": ["/FULL/PATH/TO/YOUR/docker-hub-mcp-server/dist/index.js", "--transport=stdio"] + } + } +} +``` +#### For authenticated access (recommended): + Replace the following values: + - `YOUR_DOCKER_HUB_USERNAME` - Your Docker Hub username + - `YOUR_DOCKER_HUB_PERSONAL_ACCESS_TOKEN` - Your Docker Hub Personal Access Token + - `/FULL/PATH/TO/YOUR/docker-hub-mcp-server` - The complete path to where you cloned this + +```json +{ + "mcpServers": { + "docker-hub": { + "command": "node", + "args": ["/FULL/PATH/TO/YOUR/docker-hub-mcp-server/dist/index.js", "--transport=stdio", "--username=YOUR_DOCKER_HUB_USERNAME"], + "env": { + "HUB_PAT_TOKEN": "YOUR_DOCKER_HUB_PERSONAL_ACCESS_TOKEN" + } + } + } +} +``` +2. Save the configuration file and completely restart Claude Desktop for the changes to take effect. + +## Usage with VS Code +1. Add the Docker Hub MCP Server configuration to your User Settings (JSON) file in VS Code. You can do this by opening the `Command Palette` and typing `Preferences: Open User Settings (JSON)`. + +#### For public repositories only: + + - `/FULL/PATH/TO/YOUR/docker-hub-mcp-server` - The complete path to where you cloned this repository +```json +{ + "mcpServers": { + "docker-hub": { + "command": "node", + "args": ["/FULL/PATH/TO/YOUR/docker-hub-mcp-server/dist/index.js", "--transport=stdio"] + } + } +} +``` +#### For authenticated access (recommended): + Replace the following values: + - `YOUR_DOCKER_HUB_USERNAME` - Your Docker Hub username + - `YOUR_DOCKER_HUB_PERSONAL_ACCESS_TOKEN` - Your Docker Hub Personal Access Token + - `/FULL/PATH/TO/YOUR/docker-hub-mcp-server` - The complete path to where you cloned this + +```json +{ + "mcpServers": { + "docker-hub": { + "command": "node", + "args": ["/FULL/PATH/TO/YOUR/docker-hub-mcp-server/dist/index.js", "--transport=stdio"], + "env": { + "HUB_USERNAME": "YOUR_DOCKER_HUB_USERNAME", + "HUB_PAT_TOKEN": "YOUR_DOCKER_HUB_PERSONAL_ACCESS_TOKEN" + } + } + } +} +``` +2. Open the `Command Palette` and type `MCP: List Servers`. +3. Select `docker-hub` and select `Start Server`. ## Usage examples