MCP Gateway
Integrates with Gmail through a Google Workspace MCP service, providing tools for sending, searching, and managing emails via the gateway's orchestration.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Gatewayactivate my google-workspace service lazily"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Gateway
A service orchestration layer for the Model Context Protocol. Manages multiple MCP services through a single unified interface — spawn, supervise, and route tool calls across all your services.
Key Feature: Lazy Activate
By default, services activate in lazy mode — the process spawns and tool list is fetched, but zero tool schemas are injected into the LLM context. This means you can have hundreds of tools across dozens of services with no token overhead.
activate({name: "google-workspace"}) → 281 tools ready, 0 context tokens
tools({service: "google-workspace"}) → browse available tools
call({service: "...", tool: "...", args}) → call any tool directlyRelated MCP server: SuperMCP Server
Features
Lazy activate — spawn services with 0 context tokens, browse with
tools(), call withcall()Service orchestration — spawn, stop, restart child MCP services
On-demand tool browsing —
tools({service, filter})returns tool descriptions as conversation text (not system prompt)Direct routing —
call()routes to child connections without needing schema registrationEnvironment variable expansion — use
$VARor${VAR}in config for secretsDynamic management — add/remove services at runtime without restarting
Health monitoring — built-in ping/health checks
Any command — supports
bun,node,npx,ssh, or any executable
Quick Start
# Install
bun install
# Create your config from the example
cp gateway.config.example.json gateway.config.json
# Edit gateway.config.json with your services
# Then start the gateway
bun run startConfiguration
gateway.config.json defines your services:
{
"services": [
{
"name": "my-service",
"command": "bun",
"args": ["run", "/path/to/service/index.ts"],
"env": { "API_KEY": "$MY_API_KEY" },
"autoActivate": false
}
]
}Field | Required | Default | Description |
| yes | — | Unique service identifier |
| yes | — | Executable to run ( |
| no |
| Command arguments |
| no |
| Environment variables (supports |
| no |
| Start automatically on gateway launch |
| no |
| Always-on: respawn with exponential backoff on crash; never GC'd when idle |
| no | — | Named tool subsets for full-mode activation, e.g. |
Environment Variables
Config values support $VAR and ${VAR} syntax, resolved from process.env at load time:
{
"env": { "API_KEY": "$MY_SECRET_KEY" },
"args": ["--config", "${HOME}/.config/my-service.json"]
}This keeps secrets out of your config file. Pass them through your MCP client config (see below).
Built-in Tools
Once running, the gateway exposes these management tools:
Tool | Description |
| List all services with status, mode (lazy/full), tool count, uptime |
| Start a service. Default lazy (0 context tokens). Set |
| List available tools for an active service. Supports |
| Stop a service and clean up |
| Kill and respawn a service (preserves lazy/full mode) |
| Ping all active services |
| Register a new service dynamically (persists to config) |
| Remove a service from config |
| Call any tool on any active service |
Workflow
1. activate({name: "my-service"}) → spawn process, 0 tokens
2. tools({service: "my-service"}) → see all tools
3. tools({service: "my-service", filter: "search"}) → filter by keyword
4. call({service: "my-service", tool: "...", args: {}}) → call a tool
5. deactivate({name: "my-service"}) → stop when doneFull Mode (optional)
If you want tool schemas injected into the LLM context (traditional MCP behavior):
activate({name: "my-service", lazy: false}) → register all schemas
activate({name: "my-service", lazy: false, groups: ["gmail", "drive"]}) → register specific groupsHTTP Daemon Mode (always-on, shared)
Set GATEWAY_HTTP_PORT to run the gateway as a long-lived Streamable HTTP daemon instead of per-client stdio:
GATEWAY_HTTP_PORT=8770 bun run startEndpoint:
http://127.0.0.1:8770/mcp(Streamable HTTP,Mcp-Session-Idper client)Health:
GET /healthreturns JSON with session count and per-service status/pidShared processes, isolated views: child services are spawned once and shared by every connected client; each session keeps its own tool registry, so one agent's full-mode activation never leaks into another's context
Session GC: sessions idle longer than the TTL are swept automatically (clients often exit without sending DELETE). Tune with
GATEWAY_SESSION_TTL_MS(default 60 min) andGATEWAY_SESSION_SWEEP_MS(default 5 min)Safe boot:
GATEWAY_NO_AUTOACTIVATE=1skipsautoActivateservices (e.g. when stateful singletons are already running elsewhere)
A systemd unit is provided in deploy/mcp-gateway.service.
Point Claude Code (or any MCP client) at the daemon:
{
"mcpServers": {
"gateway": { "type": "http", "url": "http://127.0.0.1:8770/mcp" }
}
}Using with Claude Code
Add to your Claude Code MCP config (~/.claude/config.json or project settings).
API keys go in the env block — they're passed to the gateway process and expanded in gateway.config.json via $VAR syntax:
{
"mcpServers": {
"gateway": {
"command": "bun",
"args": ["run", "/path/to/mcp-gateway/src/index.ts"],
"env": {
"GEMINI_API_KEY": "your-gemini-key",
"EXA_API_KEY": "your-exa-key"
}
}
}
}License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityFmaintenanceA dynamic service that creates and manages Model Context Protocol (MCP) servers, allowing users to spawn, customize, and control multiple MCP servers as child processes.Last updated5897MIT
- Alicense-qualityDmaintenanceA powerful orchestration layer for Model Context Protocol (MCP) servers that enables AI assistants to dynamically discover, inspect, and interact with multiple MCP servers through a unified interface.Last updatedMIT
- Flicense-quality-maintenanceMCP Hub aggregates and proxies multiple Model Context Protocol servers into a unified Streamable HTTP interface. It allows users to combine diverse stdio, SSE, and HTTP-based servers while providing tool namespacing, health monitoring, and secure authentication.Last updated608
- Flicense-qualityDmaintenanceA centralized management platform that aggregates multiple Model Context Protocol (MCP) servers into a single unified endpoint for AI agents. It provides a web interface for hot-swappable tool management, proxying of existing servers, and AI-powered generation of custom MCP plugins.Last updated1
Related MCP Connectors
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jfikrat/mcp-gateway'
If you have feedback or need assistance with the MCP directory API, please join our Discord server