DH

docker/hub-mcp

Developer tools公式

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

171 stars 99 forks 品質 87 トレンド 31Apache-2.0

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)

セットアップ

  1. ビルド

  2. 走れ

  • デフォルトのARGS:
  • transport:httpかstdio(デフォルト:stdio)を選べます。
  • port=3000
  • host=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

Setup

  1. Build

    npm install
    npm run build
    
  2. Run

     npm start -- [--transport=http|stdio] [--port=3000] [--host=127.0.0.1]
    
  • Default args:
    • transport: Choose between http or stdio (default: stdio)
    • port=3000
    • host=127.0.0.1 (HTTP transport only) This starts the server with default settings and can only access public Docker Hub content.

[!IMPORTANT] The http transport binds to 127.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.1 unless you pass --host= (for example --host=0.0.0.0 to expose it from a container).
  • Authentication required (fail-closed). In http mode the server refuses to
GitHub で README 全文を見る

インストール

npx @modelcontextprotocol/inspector node dist/index.js [--transport=http|stdio] [--port=3000]
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "docker-hub": { "command": "node", // or absoulute binary path "args": ["/FULL/PATH/TO/YOUR/docker-hub-mcp-server/dist/index.js", "--transport=stdio"] } } }