Self-hosted gateway aggregating upstream MCP servers behind one authenticated HTTP endpoint. It exposes a single entry point for clients to reach multiple MCP servers without directly connecting to each upstream service.
🛠️ Key Features
Self-hosted gateway
Aggregates upstream MCP servers
Single authenticated HTTP endpoint
🚀 Use Cases
Centralize access to multiple MCP servers
Provide one controlled HTTP interface for MCP tooling
⚡ Developer Benefits
One authenticated endpoint to integrate with
Avoid managing multiple upstream server connections directly
⚠️ Limitations
Operation depends on authentication through the single HTTP endpoint
Only the aggregation/gateway behavior is described; no specific MCP tools or capabilities are listed
GoModel is the fastest and the most resource-efficient AI Gateway (the self-reproducible benchmarks). It's an alternative to LiteLLM (which was hacked recently) and Portkey (which is no longer maintained on GitHub).
Money - because you can remember the responses on this layer (caching), track your spending and do tricks like prompt compression and intelligent routing.
Nerves - because we strive to achieve good quality and reliability. Our ambition is to be the last AI gateway you will need - the most reliable, resource-optimal, feature-rich and fast.
Quick Start
Step 1: Install and start GoModel
macOS / Linux
bash
curl -fsSL https://gomodel.enterpilot.io/install.sh | sh
# OPENAI_API_KEY="your-openai-key" # (optional)
gomodel
GoModel exposes an OpenAI-compatible API at /v1 and an Anthropic-compatible
API at /v1/messages, so the official SDKs work unchanged - just point the
base URL at your GoModel server and use your GoModel key
(set up with the GOMODEL_MASTER_KEY env variable or one generated in the dashboard).
OpenAI SDK
Python
python
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8080/v1", # your GoModel server
api_key="your-gomodel-key",
)
The Anthropic SDK authenticates with x-api-key, which GoModel accepts
alongside Authorization: Bearer.
Python
python
from anthropic import Anthropic
client = Anthropic(
base_url="http://localhost:8080", # your GoModel server (no /v1 suffix)
api_key="your-gomodel-key",
)
TypeScript / JavaScript
typescript
importAnthropicfrom"@anthropic-ai/sdk";
const client = newAnthropic({
baseURL: "http://localhost:8080", // your GoModel server (no /v1 suffix)apiKey: "your-gomodel-key",
});
Supported LLM Providers
GoModel supports OpenAI, Anthropic, Cohere, Google Gemini, Vertex AI, DeepSeek,
Groq, Fireworks AI, Meta (Muse Spark), OpenRouter, Z.ai, xAI (Grok), Alibaba
Cloud Model Studio (Bailian), Kilo AI, MiniMax, Xiaomi MiMo, OpenCode Go, Azure
OpenAI, Oracle, Ollama, vLLM, Amazon Bedrock Runtime, Amazon Bedrock Mantle, and
all OpenAI-compatible providers.
See the Providers Overview for the full
per-provider feature matrix (chat, /responses, embeddings, files, batches,
passthrough), credentials, and configuration notes.
Docker Compose
Infrastructure only (Redis, PostgreSQL, MongoDB, Adminer - no image build):
bash
cp .env.template .env# Add your API keys to .env
docker compose up -d
# or: make infra
Full stack (adds GoModel + Prometheus; builds the app image):
bash
docker compose --profile app up -d
# or: make image
GoModel exposes OpenAI-compatible and Anthropic-compatible APIs, provider-native
passthrough, and operations routes. See the
API Endpoints reference for the full
endpoint tables, and Admin Endpoints for
the admin REST API and dashboard.
Gateway Configuration
GoModel is configured through environment variables and an optional config.yaml. Environment variables override YAML values. See the Configuration reference for the full list of settings organized by category, along with .env.template and config/config.example.yaml.
Features
Caching - exact and semantic response caching, so repeated prompts cost nothing
Cost tracking - per-request cost estimates, usage analytics, and spending breakdowns in the dashboard
Budgets - hard spend limits per user, team, or key
Rate limits - requests, tokens, and concurrency caps per user path, provider, or model
Virtual models - aliases and load balancing (round-robin or cost-based) behind stable model names
Join our Discord to connect with other GoModel users.
Install
Configuration
Environment variables
GOMODEL_MASTER_KEYsecret
Gateway API key clients authenticate with; unset runs the gateway in unsafe (no-auth) mode.
MCP_SERVERS
JSON object of upstream MCP servers to aggregate, e.g. {"github":{"url":"https://api.githubcopilot.com/mcp/","headers":{"Authorization":"Bearer ${GITHUB_PAT}"}}}. Servers can also be declared in config.yaml or the admin dashboard.