mcp-gateway
CLAUDE.md1.6k starsChanged 11 months agoMITView on GitHub
This is the Docker MCP Gateway - a CLI plugin that enables easy and secure running of Model Context Protocol (MCP) servers through Docker containers. The plugin acts as a gateway between AI clients and containerized MCP servers, providing isolation, security, and management capabilities. The codebase follows a gateway pattern where: - AI Client connects to the MCP Gateway - MCP Gateway (this CLI) manages multiple MCP Servers running in Docker containers Key architectural components: - Gateway: Core routing and…
Trending
Less talk lately.about the whole repository
Who's talking about docker/mcp-gateway
- orbstack/orbstack“Docker MCP Gateway”GitHub · Jul 21, 2025 · 96 reactions
- @github-trending.bsky.social“📦 docker / mcp-gateway ⭐ 372 (+23) 🗒 Go docker mcp CLI plugin / MCP Gateway”Bluesky · Sep 14, 2025 · 12 likes
- openclaw/openclaw“Feature Request: MCP (Model Context Protocol) Client Support”GitHub · Feb 3, 2026 · 3 reactions
- A Hacker News story“Mcp-gateway, central auth and config manager for mcp servers”Hacker News · Jul 10, 2025 · 3 points
- ARUNAGIRINATHAN-K/awesome-ai-agents-2026“🔗 Broken links detected”GitHub · May 3, 2026 · 1 reactions
The biggest 5 of 19 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 19
Talked about on GitHub, Hacker News and Bluesky (19 times).
On GitHub · 17
- Jul 21, 2025Docker MCP Gateway — orbstack/orbstack96 reactions · 1 comment
- Feb 3, 2026Feature Request: MCP (Model Context Protocol) Client Support — openclaw/openclaw3 reactions · 2 comments
- May 3, 2026🔗 Broken links detected — ARUNAGIRINATHAN-K/awesome-ai-agents-20261 reaction
- Jul 6, 2025MCP Tools are not getting loaded from Docker MCP tool kit — docker/for-win1 reaction · 12 comments
- Oct 3, 2026agent-skills.github.docker.mcp-gateway: 0.43.3 → 0.44.1 — sudosubin/agents.nix0 reactions
12 more on GitHub
- Sep 26, 2026agent-skills.github.docker.mcp-gateway: init at 0.43.3 — sudosubin/agents.nix0 reactions
- Aug 22, 2026[Deep Dive] MCP 开发连接的热重载与生命周期 Supervisor — Kingminghuang/OpportunityRadar0 reactions
- Aug 6, 2026research(mcp): evaluate docker/mcp-gateway against fak — anthony-chaudhary/fak0 reactions
- Jun 25, 2026x/vulndb: potential Go vuln in github.com/docker/mcp-gateway: GHSA-r2xf-7jw5-pjg6 — golang/vulndb0 reactions · 1 comment
- Jun 6, 2026content(mcp): add Docker MCP Gateway — JSONbored/awesome-claude0 reactions · 3 comments
- Apr 15, 2026chore(deps): update dependency docker/mcp-gateway to v0.41.0 — killo431/tools0 reactions
- Feb 18, 2026[Review] Remove JFS references + secrets engine injection — govambam/mcp-gateway0 reactions · 1 comment
- Feb 13, 2026build(deps): bump github.com/docker/mcp-gateway from 0.22.0 to 0.28.0 in the go_modules group across 1 directory — Takuya-Miyazaki/docker.github.io0 reactions
- Feb 12, 2026Docker MCP Toolkit support — schmitthub/clawker0 reactions
- Dec 8, 2025BUG: Telemetry middleware crashes with nil pointer dereference on all transports (stdio, SSE, streaming) — jcowhigjr/yelp_search_demo0 reactions · 97 comments
- Sep 26, 2025mcp gateway error — k33g/bob-agent0 reactions
- Jul 15, 2025Doc: Request for all parameter supported by catalog.yaml — docker/mcp-registry0 reactions
On Hacker News · 1
- Jul 10, 2025Mcp-gateway, central auth and config manager for mcp servers3 points · 2 comments
On Bluesky · 1
- Sep 14, 2025📦 docker / mcp-gateway ⭐ 372 (+23) 🗒 Go docker mcp CLI plugin / MCP Gateway — @github-trending.bsky.social12 likes and reposts
In this repositoryOne other file it gives its agents.
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 107
Call interception and logging
- Very specific: line 145
Use go test -count=1 to disable test caching
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Overview
This is the Docker MCP Gateway - a CLI plugin that enables easy and secure running of Model Context Protocol (MCP) servers through Docker containers. The plugin acts as a gateway between AI clients and containerized MCP servers, providing isolation, security, and management capabilities.
Architecture
The codebase follows a gateway pattern where:
- AI Client connects to the MCP Gateway
- MCP Gateway (this CLI) manages multiple MCP Servers running in Docker containers
Key architectural components:
- Gateway: Core routing and protocol translation (
cmd/docker-mcp/internal/gateway/) - Client Management: Handles connections to AI clients (
cmd/docker-mcp/client/) - Server Management: Manages MCP server lifecycle (
cmd/docker-mcp/server/) - Catalog System: Manages available MCP servers (
cmd/docker-mcp/catalog/) - Security: Secrets management and OAuth flows (
cmd/docker-mcp/secret-management/,cmd/docker-mcp/oauth/)
Development Commands
Building
# Build the CLI plugin locally
make docker-mcp
# Cross-compile for all platforms
make docker-mcp-crossTesting
# Run all tests
make test
# Run integration tests specifically
make integration
# Run long-lived integration tests
go test -count=1 ./... -run 'TestLongLived'
# Run specific tests by pattern
go test -count=1 ./... -run 'TestIntegration'
# Run a single test file
go test ./cmd/docker-mcp/server/server_test.go
# Run tests with coverage
go test -cover ./...Code Quality
# Format code
make format
# Run linter
make lint
# Run linter for specific platform
make lint-linux
make lint-darwin
# Run Go vet (static analysis)
go vet ./...
# Run Go mod tidy to clean dependencies
go mod tidyProject Structure
cmd/docker-mcp/- Main CLI application entry pointcmd/docker-mcp/internal/gateway/- Core gateway implementation with client pooling, proxy management, and transport handlingcmd/docker-mcp/internal/docker/- Docker integration for container managementcmd/docker-mcp/internal/mcp/- MCP protocol implementations (stdio, SSE)cmd/docker-mcp/internal/desktop/- Docker Desktop integration and authenticationcmd/docker-mcp/catalog/- Server catalog management commandscmd/docker-mcp/client/- Client configuration and connection managementcmd/docker-mcp/server/- Server lifecycle management commandscmd/docker-mcp/tools/- Tool execution and managementexamples/- Usage examples and compose configurationsdocs/- Technical documentation
Key Configuration Files
The CLI uses these configuration files (typically in ~/.docker/mcp/):
docker-mcp.yaml- Server catalog definitionsregistry.yaml- Registry of enabled serversconfig.yaml- Gateway configuration and options
Important Patterns
Transport Modes
The gateway supports multiple transport modes:
stdio- Standard input/output (default)streaming- HTTP streaming for multiple clientssse- Server-sent events
Security Features
- Container isolation for MCP servers
- Secrets management via Docker Desktop
- OAuth flow handling
- API key and credential protection
- Call interception and logging
Client Integration
The system integrates with various AI clients:
- VS Code / Cursor
- Claude Desktop
- Continue Dev
- Custom MCP clients
Configuration files for different clients are automatically managed in cmd/docker-mcp/client/testdata/.
CLI Plugin Development
This is a Docker CLI plugin written in Go 1.24+. Key development patterns:
Plugin Installation
The plugin is installed as docker-mcp and becomes available as docker mcp <command>. The Makefile handles building and installing to the correct Docker CLI plugins directory (~/.docker/cli-plugins/).
Command Structure
Commands follow the Cobra CLI pattern with the main command tree defined in cmd/docker-mcp/commands/. Each major command area (catalog, server, client, etc.) has its own file.
Configuration Management
The CLI uses YAML configuration files stored in ~/.docker/mcp/:
- Server definitions are loaded from catalog files
- Runtime configuration is managed through config.yaml
- Server enablement tracked in registry.yaml
Container Lifecycle
MCP servers run as Docker containers with proper lifecycle management:
- Images are pulled and validated before use
- Containers have consistent naming patterns
- Health checks and logging are built-in
- Proper cleanup on shutdown
Testing Patterns
- Integration tests require Docker daemon
- Long-lived tests run actual container scenarios
- Mock configurations in testdata directories
- Use
go test -count=1to disable test caching
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

