CLI / Server
Aggregate multiple MCP servers into a single endpoint.
Problem It Solves
Before MCP Gateway:
{
"mcpServers": {
"github": { "command": "npx", "args": ["@modelcontextprotocol/server-github"] },
"slack": { "command": "npx", "args": ["@slack/mcp-server"] },
"postgres": { "command": "npx", "args": ["@modelcontextprotocol/server-postgres"] },
"filesystem": { "command": "npx", "args": ["@modelcontextprotocol/server-filesystem"] }
// ... and more, each requiring separate configuration
}
}With MCP Gateway:
{
"mcpServers": {
"gateway": { "command": "mcp-gateway", "args": ["start"] }
}
}Just ONE config entry for ALL your MCP servers! 🎉
Features
- 🚀 Single Configuration - One entry in your MCP client config
- 🔌 Hot Reload - Add/remove servers without restarting clients
- 🎨 CLI Interface - Easy server management from terminal
- 🔒 Secure - Credentials stored in config file
- 📦 Zero Dependencies (for clients) - Just install and use
- 🛠️ Tool Prefixing - Avoids naming conflicts between servers
- ⚡ Fast - Parallel execution of tool calls
Installation
Global Installation (Recommended)
npm install -g @mcp-gateway/cliLocal Installation
npm install @mcp-gateway/cliQuick Start
1. Initialize
mcp-gateway init2. Add Servers
# Add GitHub server
mcp-gateway add \
--id github \
--name "GitHub" \
--command npx \
--args @modelcontextprotocol/server-github \
--env GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token
# Add Slack server
mcp-gateway add \
--id slack \
--name "Slack" \
--command npx \
--args @slack/mcp-server \
--env SLACK_BOT_TOKEN=xoxb-your-token3. List Servers
mcp-gateway list4. Generate Client Config
mcp-gateway configCLI Commands
mcp-gateway init: Initialize MCP Gateway with interactive setupmcp-gateway start: Start the gateway server (used by clients)mcp-gateway list: List all configured serversmcp-gateway add: Add a new servermcp-gateway remove <id>: Remove a servermcp-gateway enable <id>: Enable a disabled servermcp-gateway disable <id>: Disable a servermcp-gateway config: Generate client configuration
Configuration
Configuration is stored at ~/.mcp-gateway/config.json.
How It Works
Tool Prefixing
To avoid naming conflicts, MCP Gateway prefixes all tool names with the server ID:
Original tool: "create_issue"
Gateway tool: "github_create_issue"
Original tool: "send_message"
Gateway tool: "slack_send_message"Programmatic Usage
import { MCPGateway } from '@mcp-gateway/cli';
const gateway = new MCPGateway();
await gateway.start();