docker/mcp-gateway
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 (with MCP Toolkit feature enabled)

Install as Docker CLI Plugin
The MCP cli will already be installed on recent versions of Docker Desktop but you can buildand install the latest version by following these steps:
|
|
After installation, the plugin will be available as:
|
|
Usage
Catalog Management
Manage the catalogs available to the MCP gateway. The default catalog is available with the name ‘docker-mcp’.
|
|
More about the MCP Catalog.
MCP Gateway Operations
Start up an MCP Gateway. This can be used for one client, or to service multiple clients if using either sse
or streaming
transports.
|
|
More about the MCP Gateway.
Server Management
Enable and disable the set of MCP servers that will be available for default clients. The MCP gateway can be configured to expose different sets of servers and tools but enabling and disabling servers here impacts the default gateway configuration.
|
|
Configuration Management
Configure any MCP servers that require custom runtime configuration.
|
|
Secrets and OAuth
Configure MCP servers that require either secrets or OAuth.
|
|
Tool Management
|
|
Configuration
The MCP CLI uses several configuration files:
docker-mcp.yaml
: Server catalog defining available MCP serversregistry.yaml
: Registry of enabled serversconfig.yaml
: Configuration per servertools.yaml
: Enabled tools per server
Configuration files are typically stored in ~/.docker/mcp/
. This is in this directory that Docker Desktop’s
MCP Toolkit with store its configuration.
Architecture
The Docker MCP CLI implements a gateway pattern:
|
|
- AI Client: Language model or AI application
- MCP Gateway: This CLI tool managing protocol translation and routing
- MCP Servers: Individual MCP servers running in Docker containers
See docs/message-flow.md for detailed message flow diagrams.
Contributing
The build instructions are available in the contribution guide.
License
This project is licensed under the MIT License - see the LICENSE file for details.