DM

docker/mcp-gateway

开发工具官方

本页由 AI 翻译,技术细节请以原文为准。 查看原文

1616 stars 288 forks 质量 82 趋势 45MIT

Docker MCP CLI 插件 / MCP 网关

概览

Docker Desktop 中的 MCP 工具包允许开发者配置和使用 Docker MCP 目录中的 MCP 服务器。 在底层,Toolkit 由一个 docker CLI 插件 docker-mcp 驱动。该仓库是该 CLI 插件的代码。它可以在 Docker Desktop 中工作,也可以独立运行。 该CLI的主要特点是能够轻松安全地运行和部署MCP服务器。有关所有功能的列表,请参见功能部分。 模型上下文协议(MCP)是一种开放协议,规范了人工智能应用如何连接外部数据源和工具。它为语言模型提供了一种安全、受控的方式,以便访问和交互各种服务、数据库和API。 开发者在将模型上下文协议(MCP)工具整合到生产工作流时面临关键障碍: - 目录中的每个本地MCP服务器运行在隔离的Docker容器中。NPX和UVX服务器被授予最小的主机权限。

概述(AI 翻译)

Docker Desktop 中的 MCP 工具包允许 开发者配置并调用Docker MCP目录中的MCP服务器。

在底层,工具包由一个 docker CLI 插件 docker-mcp 驱动。该仓库是该 CLI 插件的代码。它可以在 Docker Desktop 中运行,也可以独立运行。

该CLI的主要功能是Docker MCP Gateway,允许轻松且安全地运行和部署MCP服务器。所有功能列表请参见功能列表。

什么是MCP?

模型上下文协议(MCP)是一种开放协议,规范了人工智能应用如何连接外部数据源和工具。它为语言模型提供了一种安全、受控的方式,以便访问和交互各种服务、数据库和API。

概述

开发者在将模型上下文协议(MCP)工具整合到生产工作流时面临关键障碍:

  • 管理MCP服务器生命周期目录中的每个本地MCP服务器运行在隔离的Docker容器中。NPX和UVX服务器被授予最小的主机权限。
  • 提供统一界面 AI模型通过单一网关访问MCP服务器。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Docker MCP Plugin and Docker MCP Gateway

The MCP Toolkit, in Docker Desktop, allows developers to configure and consume MCP servers from the Docker MCP Catalog.

Underneath, the Toolkit is powered by a docker CLI plugin: docker-mcp. This repository is the code of this CLI plugin. It can work in Docker Desktop or independently.

The main feature of this CLI is the Docker MCP Gateway which allows easy and secure running and deployment of MCP servers. See Features for a list of all the features.

What is MCP?

The Model Context Protocol (MCP) is an open protocol that standardizes how AI applications connect to external data sources and tools. It provides a secure, controlled way for language models to access and interact with various services, databases, and APIs.

Overview

Developers face criticial barriers when integrating Model Context Protocol (MCP) tools into production workflows:

  • Managing MCP server lifecycle Each local MCP sever in the catalog runs in an isolated Docker container. npx and uvx servers are granted minimal host privileges.
  • Providing a unified interface AI models access MCP servers through a single Gateway.
  • Handling authentication and security Keep secrets out of environment variables using Docker Desktop’s secrets management.
  • Supports dynamic tool discovery and configuration. Each MCP client (eg VS Code, Cursor, Claude Desktop, etc.) connects to the same Gateway configuration, ensuring consistency across different clients.
  • Enables OAuth flows for MCPs that require OAuth access token service connections.

Features

  • 🐳 Container-based Servers: Run MCP servers as Docker containers with proper isolation.
  • 🔧 Server Management: List, inspect, and call MCP tools, resources and prompts from multiple servers.
  • 🔐 Secrets Management: Secure handling of API keys and credentials via Docker Desktop.
  • 🌐 OAuth Integration: Built-in OAuth flows for service authentication.
  • 📋 Server Catalog: Manage and configure multiple MCP catalogs.
  • 🔍 Dynamic Discovery: Automatic tool, prompt, and resource discovery from running servers.
  • 📊 Monitoring: Built-in logging and call tracing capabilities.

Installation

Prerequisites

  • Docker Desktop 4.59+ (with MCP Toolkit feature enabled)

  • Go 1.24+ (for development)

Install as Docker CLI Plugin

The MCP cli will already be installed on recent versions of Docker Desktop but you can build and install the latest version by following these steps:

# Clone the repository
git clone https://github.com/docker/mcp-gateway.git
cd mcp-gateway
mkdir -p "$HOME/.docker/cli-plugins/"
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →