Join our Discord Server
Docker MCP Gateway

Running MCP Gateway in a Docker container

Estimated reading: 3 minutes 1723 views

The MCP Gateway is Docker’s open-source tool that helps you manage AI servers safely in both development and production. Think of it as a single control center that connects AI tools from Docker’s catalog to your AI applications without security risks.

Instead of connecting to many different AI servers directly, you connect to one gateway that handles everything. This makes AI tools easier to use and more secure.

When you run the MCP Gateway in a Docker container, it becomes a cloud service that can work anywhere – from your laptop to big cloud platforms like Kubernetes. It connects to all your AI servers and makes them available through one simple endpoint.

Key Benefits:

  • Safe by Design: AI servers run in separate containers with limited access to your system
  • One Control Point: Manage all your AI tools, passwords, and settings from one place
  • Full Visibility: See exactly what your AI tools are doing with built-in logs and monitoring

Docker MCP Gateway can be deployed as a containerized service, transforming it from a local CLI tool into a cloud-native, production-ready platform. This approach extends the gateway’s unified MCP server management capabilities into scalable, distributed environments while maintaining enterprise-grade security and observability.

When containerized, the MCP Gateway becomes a managed service that orchestrates multiple MCP servers across cloud infrastructure, providing teams with consistent AI tool access regardless of deployment environment. It seamlessly integrates with existing container orchestration platforms like Kubernetes, Docker Swarm, and cloud-native CI/CD pipelines.

The MCP Gateway can run in a container and still mount the MCP Toolkit’s configuration. The following command runs an always on Gateway on your machine. It’ll even start automatically on Docker’s reboot.

docker run -d -p 8811:8811 --restart=always --name=mcp-gateway -v /var/run/docker.sock:/var/run/docker.sock -v $HOME/.docker/mcp:/mcp:ro docker/mcp-gateway --catalog=/mcp/catalogs/docker-mcp.yaml --config=/mcp/config.yaml --registry=/mcp/registry.yaml --secrets=docker-desktop --watch=true --transport=sse --port=8811

Result:

 

- Running mcp/dockerhub with [run --rm -i --init --security-opt no-new-privileges --cpus 1 --memory 2Gb --pull never -l docker-mcp=true -l docker-mcp-tool-type=mcp -l docker-mcp-name=dockerhub -l docker-mcp-transport=stdio --network bridge -e HUB_PAT_TOKEN] and command [--transport=stdio --username=ajeetraina777]

- github-official: GitHub MCP Server running on stdio

- sequentialthinking: Sequential Thinking MCP Server running on stdio

  > github-official: (67 tools) (1 prompts) (5 resourceTemplates)

  > sequentialthinking: (1 tools)

- github-official: time="2025-07-05T17:13:53Z" level=info msg="shutting down server..."

  > dockerhub: (13 tools)

- firecrawl: Initializing Firecrawl MCP Server...

- firecrawl: Running in stdio mode, logging will be directed to stderr

- firecrawl: [info] Firecrawl MCP Server initialized successfully

- firecrawl: [info] Configuration: API URL: fc-7e8c2e7fc67f41579ed1626e734ad48a

- firecrawl: Firecrawl MCP Server running on stdio

  > firecrawl: (8 tools)

- duckduckgo: [07/05/25 17:13:53] INFO     Processing request of type            server.py:523

- duckduckgo:                              ListToolsRequest                                   

- duckduckgo:                     INFO     Processing request of type            server.py:523

- duckduckgo:                              ListPromptsRequest                                 

- duckduckgo:                     INFO     Processing request of type            server.py:523

- duckduckgo:                              ListResourcesRequest                               

- duckduckgo:                     INFO     Processing request of type            server.py:523

- duckduckgo:                              ListResourceTemplatesRequest                       

  > duckduckgo: (2 tools)
 

Leave a Reply

Share this Doc

Running MCP Gateway in a Docker container

Or copy link

CONTENTS
Join our Discord Server