GoModel MCP Server
io.github.ENTERPILOT/gomodel
Self-hosted AI gateway aggregating MCP servers and LLM providers behind one authenticated HTTP endpoint with caching, cost tracking, and observability.
What is the GoModel MCP server?
GoModel is a self-hosted AI gateway that aggregates upstream MCP servers and multiple LLM providers (OpenAI, Anthropic, Cohere, Google Gemini, etc.) behind a single authenticated HTTP endpoint. It provides OpenAI-compatible and Anthropic-compatible APIs, enabling you to manage API keys, track costs, cache responses, and route requests across providers from one central point.
GoModel acts as a unified gateway for AI services, letting you aggregate MCP servers and LLM providers behind one endpoint with built-in authentication, caching, cost tracking, and failover. Use it to reduce API costs through response caching, monitor spending per user or team, enforce budgets and rate limits, and automatically route requests to backup providers if one fails.
How to install GoModel
Copy-paste configuration for popular MCP clients.
GOMODEL_MASTER_KEYsecretGateway API key clients authenticate with; unset runs the gateway in unsafe (no-auth) mode.
MCP_SERVERSJSON 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.
{
"mcpServers": {
"gomodel": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/enterpilot/gomodel:0.1.77"
],
"env": {
"GOMODEL_MASTER_KEY": "<YOUR_GOMODEL_MASTER_KEY>",
"MCP_SERVERS": "<YOUR_MCP_SERVERS>"
}
}
}
}{
"mcpServers": {
"gomodel": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/enterpilot/gomodel:0.1.77"
],
"env": {
"GOMODEL_MASTER_KEY": "<YOUR_GOMODEL_MASTER_KEY>",
"MCP_SERVERS": "<YOUR_MCP_SERVERS>"
}
}
}
}{
"mcpServers": {
"gomodel": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/enterpilot/gomodel:0.1.77"
],
"env": {
"GOMODEL_MASTER_KEY": "<YOUR_GOMODEL_MASTER_KEY>",
"MCP_SERVERS": "<YOUR_MCP_SERVERS>"
}
}
}
}{
"servers": {
"gomodel": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/enterpilot/gomodel:0.1.77"
],
"env": {
"GOMODEL_MASTER_KEY": "<YOUR_GOMODEL_MASTER_KEY>",
"MCP_SERVERS": "<YOUR_MCP_SERVERS>"
}
}
}
}claude mcp add gomodel --env GOMODEL_MASTER_KEY=<YOUR_GOMODEL_MASTER_KEY> --env MCP_SERVERS=<YOUR_MCP_SERVERS> -- docker run -i --rm docker.io/enterpilot/gomodel:0.1.77Tools & capabilities
Tools this server exposes to the agent.
MCP Gateway— Aggregate upstream MCP servers behind one authenticated HTTP endpointOpenAI-compatible API— Expose OpenAI SDK-compatible endpoints at /v1Anthropic-compatible API— Expose Anthropic SDK-compatible endpoints at /v1/messagesPassthrough API— Provider-native APIs under /p/{provider}/... with GoModel auth and trackingResponse Caching— Exact and semantic response caching to reduce repeated request costsCost Tracking— Per-request cost estimates, usage analytics, and spending breakdownsBudgets— Hard spend limits per user, team, or API keyRate Limiting— Request, token, and concurrency caps per user path, provider, or modelVirtual Models— Aliases and load balancing (round-robin or cost-based) behind stable model namesFailover & Retries— Automatic rerouting to backup providers with circuit breakersLabelling— Tag requests from HTTP headers or API keys and break down usage by labelUser Paths— Hierarchical scoping of keys, model access, budgets, usage, and audit logsGuardrails— Request and response policies enforced at the gatewayProvider Key Rotation— Round-robin over multiple API keys to lift per-key rate limitsObservability— Prometheus metrics, audit logs, and live request streaming in dashboard
Use cases
- Aggregate multiple MCP servers and LLM providers into one authenticated endpoint for your AI applications
- Reduce API costs by caching responses and intelligently routing requests across providers
- Monitor and control spending with per-user budgets, cost tracking, and usage analytics
- Implement automatic failover and load balancing across multiple LLM providers to ensure reliability
- Set rate limits and enforce request/response policies at the gateway layer for security and compliance
GoModel MCP server FAQ
GoModel is a self-hosted AI gateway that aggregates MCP servers and LLM providers (OpenAI, Anthropic, Cohere, Google Gemini, etc.) behind one authenticated HTTP endpoint. It provides caching, cost tracking, failover, and observability features.
GoModel is open-source and free to self-host. You pay only for the underlying LLM provider APIs you use. A live demo is available at demo.enterpilot.io.
Install via curl (macOS/Linux), PowerShell (Windows), or Docker. Run `curl -fsSL https://gomodel.enterpilot.io/install.sh | sh` on Unix, or use `docker run --rm -p 8080:8080 enterpilot/gomodel` for Docker. Access the dashboard at http://localhost:8080/admin/dashboard.
GoModel uses API keys (set via GOMODEL_MASTER_KEY environment variable or generated in the dashboard). It accepts both `Authorization: Bearer` and `x-api-key` headers. Upstream LLM provider credentials are configured via environment variables or the dashboard.
GoModel exposes OpenAI-compatible and Anthropic-compatible APIs, so you can point any official SDK at your GoModel server by setting the base URL and API key. This works with Cursor, Claude, and any tool using these SDKs.
GoModel supports OpenAI, Anthropic, Cohere, Google Gemini, Vertex AI, DeepSeek, Groq, Fireworks AI, Meta, OpenRouter, xAI (Grok), Azure OpenAI, Ollama, vLLM, Amazon Bedrock, and all OpenAI-compatible providers, plus ElevenLabs for voice.
README (reference)
Source of truth, from the repository.
Quick Start
Step 1: Install and start GoModel
macOS / Linux
curl -fsSL https://gomodel.enterpilot.io/install.sh | sh
# OPENAI_API_KEY="your-openai-key" # (optional)
gomodel
Windows (PowerShell)
irm https://gomodel.enterpilot.io/install.ps1 | iex
# $env:OPENAI_API_KEY = "your-openai-key" # (optional)
gomodel
Docker
docker run --rm -p 8080:8080 \
-e OPENAI_API_KEY="your-openai-key" \
enterpilot/gomodel
ℹ️ You can configure GoModel with .env variables, a config.yaml file, OR directly in the dashboard.
ℹ️ Full list of environment variables (including all available providers): .env.template
ℹ️ The most secure way in production is to use .env to load API keys.
Step 2: Open the dashboard
http://localhost:8080/admin/dashboard
Step 3: Make your first API call
curl http://localhost:8080/v1/responses \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-chat-latest",
"input": "Hello!"
}'
Using GoModel with official SDKs
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
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8080/v1", # your GoModel server
api_key="your-gomodel-key",
)
TypeScript / JavaScript
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "http://localhost:8080/v1", // your GoModel server
apiKey: "your-gomodel-key",
});
Anthropic SDK
The Anthropic SDK authenticates with x-api-key, which GoModel accepts
alongside Authorization: Bearer.
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
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
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, SGLang, vLLM, llm-d, Amazon Bedrock Runtime, Amazon Bedrock Mantle, and all OpenAI-compatible providers. Voice: ElevenLabs (text-to-speech and speech-to-text).
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):
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):
docker compose --profile app up -d
# or: make image
| Service | URL |
|---|---|
| GoModel API | http://localhost:8080 |
| Adminer (DB UI) | http://localhost:8081 |
| Prometheus | http://localhost:9090 |
Building the Docker Image Locally
docker build -t gomodel .
docker run --rm -p 8080:8080 --env-file .env gomodel
API Endpoints
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
- Failover - automatic rerouting to backup providers, with retries and circuit breakers
- Labelling - tag requests from HTTP headers or API keys and break down usage by label
- User paths - hierarchical scoping of keys, model access, budgets, usage, and audit logs
- MCP gateway - aggregate your MCP servers behind one authenticated endpoint
- Passthrough API - provider-native APIs under
/p/{provider}/..., with GoModel auth and tracking - Guardrails - request and response policies enforced at the gateway
- Provider key rotation - round-robin over multiple API keys to lift per-key rate limits
- Observability - Prometheus metrics, audit logs, and live request streaming in the dashboard
Roadmap
See the Roadmap for commercial features and the public 0.2.0 milestone.
Sponsors
<a href="https://github.com/Neiko2002"><img src="https://github.com/Neiko2002.png" alt="Neiko2002" width="64"></a>
Community
Join our Discord to connect with other GoModel users.
Related MCP servers
Control a real Chrome browser to complete any task: fill forms, extract data, book flights.
World Monitor
Real-time global intelligence: markets, conflicts, country risk, energy, and infrastructure monitoring via 39 MCP tools.
Netdata
Real-time infrastructure monitoring with per-second metrics, ML-powered anomaly detection, and zero-configuration setup.
Trending hip-hop artist momentum scores across four cultural dimensions.
AI orchestration platform with 100+ agents, swarm coordination, and self-learning memory for enterprise development.
Scrapling MCP Server
Web scraping with stealth HTTP, real browsers, and Cloudflare bypass capabilities.