
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
docker/hub-mcpは、https://github.com/docker/hub-mcp.からインポートされたMCPサーバー候補です。
概要
docker/hub-mcpは、https://github.com/docker/hub-mcp.からインポートされたMCPサーバー候補です。
概要(AI 翻訳)
Docker Hub MCPサーバーは、Docker Hub APIとインターフェースし、LLMに対してアクセス可能にすることで、インテリジェントなコンテンツ発見とリポジトリ管理を可能にするモデルコンテキストプロトコル(MCP)サーバーです。
特にAIやLLM搭載のワークフローでコンテナを使った開発者は、Docker Hubの広大なイメージの中で十分なコンテキストが不足していることが多いです。その結果、LLMは適切な画像を推薦するのに苦労し、開発者は構築する代わりに手動で検索する時間を失ってしまいます。
ユースケース
- AI搭載の画像推薦 - LLMはリアルタイムのDocker Hubデータにアクセスし、正確なコンテナ画像提案を実現します。
- コンテンツ発見の強化 - AIツールが開発者により適切な画像をより早く見つけられるよう支援します。
- 簡素化されたHubワークフロー - Dockerリポジトリと画像を自然言語で管理。
前提条件
- Docker インストール済み
- Node.js(バージョン22+)
- [任意] 適切な権限を持つDocker個人アクセストークン(PAT)
セットアップ
-
ビルド
-
走れ
- デフォルトのARGS:
transport:httpかstdio(デフォルト:stdio)を選べます。port=3000host=127.0.0.1(HTTPトランスポートのみ)
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Docker Hub MCP Server
The Docker Hub MCP Server is a Model Context Protocol (MCP) server that interfaces with Docker Hub APIs to make them 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.
Use Cases
- AI-powered image recommendations - LLMs access real-time Docker Hub data for accurate container image suggestions.
- Enhanced content discovery - AI tools help developers find the right images faster.
- Simplified Hub workflows - Manage Docker repositories and images using natural language.
Prerequisites
- Docker installed
- Node.js (version 22+)
- [Optional] A Docker Personal Access Token (PAT) with appropriate permissions
Setup
-
Build
npm install npm run build -
Run
npm start -- [--transport=http|stdio] [--port=3000] [--host=127.0.0.1]
- Default args:
transport: Choose betweenhttporstdio(default:stdio)port=3000host=127.0.0.1(HTTP transport only) This starts the server with default settings and can only access public Docker Hub content.
[!IMPORTANT] The
httptransport binds to127.0.0.1(loopback) by default and requires authentication. See Securing the HTTP transport before exposing it to a network.
Run in inspector [Optional]
The MCP Inspector provides a web interface to test your server:
npx @modelcontextprotocol/inspector node dist/index.js [--transport=http|stdio] [--port=3000]
Securing the HTTP transport
The stdio transport is only reachable by the local process that spawns it. The
http transport, however, dispatches every tool call using the server operator’s
Docker Hub Personal Access Token (HUB_PAT_TOKEN). Anyone who can reach the HTTP
endpoint can therefore act as that Docker Hub identity — including creating and
modifying repositories. To prevent this, the HTTP transport is locked down by
default:
- Loopback binding. The listener binds to
127.0.0.1unless you pass--host=(for example--host=0.0.0.0to expose it from a container). - Authentication required (fail-closed). In
httpmode the server refuses to
インストール
npx @modelcontextprotocol/inspector node dist/index.js [--transport=http|stdio] [--port=3000]設定
{
"mcpServers": {
"docker-hub": {
"command": "node", // or absoulute binary path
"args": ["/FULL/PATH/TO/YOUR/docker-hub-mcp-server/dist/index.js", "--transport=stdio"]
}
}
}