DH

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

171 stars 99 forks Качество 87 Тренд 31Apache-2.0

docker/hub-mcp — это кандидат на сервер MCP, импортированный из https://github.com/docker/hub-mcp.

Обзор

docker/hub-mcp — это кандидат на сервер MCP, импортированный из https://github.com/docker/hub-mcp.

Обзор (машинный перевод)

Docker Hub MCP Server — это сервер Model Context Protocol (MCP), который взаимодействует с API Docker Hub, делая их доступными для LLM, обеспечивая интеллектуальное обнаружение контента и управление репозиториями.

Разработчики, строящие с помощью контейнеров, особенно в рабочих процессах на базе ИИ и LLM, часто сталкиваются с недостаточным контекстом в огромном пространстве изображений Docker Hub. В результате LLM испытывают трудности с рекомендовать правильные изображения, а разработчики теряют время на ручной поиск вместо построения.

Сценарии использования

  • Рекомендации изображений на базе искусственного интеллекта — LLM получают доступ к данным Docker Hub в реальном времени для точных предложений по изображениям контейнеров.
  • Расширенное обнаружение контента — инструменты ИИ помогают разработчикам быстрее находить нужные изображения.
  • Упрощённые рабочие процессы Hub — управление репозиториями и изображениями Docker с использованием естественного языка.

Предварительные требования

  • Установлен Docker
  • Node.js (версия 22+)
  • [Опционально] Персональный токен доступа Docker (PAT) с соответствующими правами

Подготовка

  1. Build

  2. Беги

  • Стандартные аргументы:
  • transport: Выберите между http или stdio (по умолчанию: stdio)
  • port=3000
  • host=127.0.0.1 (только HTTP-транспорт)

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

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
Открыть полный README на GitHub

Установка

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"] } } }