Get the FREE Ultimate OpenClaw Setup Guide →

local -gateway

Aggregate multiple MCP servers into a single endpoint with web UI, OAuth 2.1, and profile-based tool management

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio dxheroes-local-mcp-gateway docker run -i dxheroes/local-mcp-gateway:latest \
  --env UI_PORT="Port for the web UI (default 9630)" \
  --env DATA_DIR="Path to store gateway data (defaults to user home directory if not set)" \
  --env MCP_API_PORT="Port for MCP endpoint API (default 9631)"

How to use

Local MCP Gateway acts as a central control plane for configuring and exposing multiple MCP servers through profiles. It lets you assemble a curated set of MCP servers (whether stdio, SSE, remote, or custom TypeScript servers) into reusable profiles, and then expose those profiles to your AI clients via a unified API. This reduces fragmentation and gives each assistant exactly the tools it needs, while keeping data and keys under your control. The gateway also provides a modern UI for managing profiles, MCP servers, and logs, along with built-in API key management and OAuth 2.1 support for secure access.

To use it, start the gateway (via Docker in the quickstart) and navigate to the UI at http://localhost:9630. The MCP endpoint is available at http://localhost:9631/api/mcp/default by default. You can configure your AI clients to point at specific profiles or to switch between profiles dynamically using the gateway API or the frontend UI. Examples in the README show how to reference profiles like gateway, development, and marketing, and how to turn multiple profiles on or off from your client by composing an mcp.json with multiple mcpServers entries.

How to install

Prerequisites:

  • Docker and Docker Compose installed on your machine
  • curl available to fetch the quickstart file (recommended)

Step-by-step installation (Docker Quick Start):

  1. Fetch the quickstart Docker Compose manifest and start the gateway:
curl -fsSL https://raw.githubusercontent.com/DXHeroes/local-mcp-gateway/main/docker-compose.hub.yml \
  -o local-mcp-gateway.yml && \
docker compose -f local-mcp-gateway.yml up -d --pull always
  1. Access the UI and MCP endpoint:
  1. Stop the gateway when done:
docker compose -f local-mcp-gateway.yml down

Optional: If you prefer running the gateway directly as a Docker container without docker-compose, you can start a container using the command:

curl -fsSL https://raw.githubusercontent.com/DXHeroes/local-mcp-gateway/main/docker-compose.hub.yml \
  -o local-mcp-gateway.yml && \
docker compose -f local-mcp-gateway.yml up -d --pull always

Prerequisites recap: Ensure Docker is installed and running, and that you have network access to pull images from Docker Hub.

Additional notes

Tips and caveats:

  • Data persistence is stored under ~/.local-mcp-gateway-data; ensure this path is writable by the user running Docker for reliable storage.
  • The gateway supports multiple MCP servers and profiles; you can compose a single mcp.json that references gateway as well as development and marketing profiles to switch contexts in your AI clients.
  • The quickstart uses a docker-compose file, but you can run Docker directly with the image if you prefer a container-only flow. Consider exposing/adjusting ports if you run on a non-default environment.
  • The UI provides observability like real-time request/response logs, useful when debugging tool access and profile configurations.
  • Enable OAuth 2.1 and API key management for secure access to the MCP endpoints.
  • When integrating with Claude Desktop or other clients, you may need HTTPS tunneling for secure connections; the documentation includes guidance on using localtunnel for HTTPS exposure.

Related MCP Servers

Sponsor this space

Reach thousands of developers