PluginBench
MCP Server
Active
MIT

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 unified access to diverse AI services with built-in features like response caching, cost tracking, rate limiting, and failover.

GoModel acts as a central gateway for managing multiple AI model providers and MCP servers. It lets you consolidate API keys, track spending, cache responses, implement rate limits and budgets, and route requests intelligently across providers—all from a self-hosted dashboard. Useful for teams wanting cost control, observability, and reliability without vendor lock-in.

How to install GoModel

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • GOMODEL_MASTER_KEY
    secret

    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.

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "gomodel": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/enterpilot/gomodel:0.1.98"
      ],
      "env": {
        "GOMODEL_MASTER_KEY": "<YOUR_GOMODEL_MASTER_KEY>",
        "MCP_SERVERS": "<YOUR_MCP_SERVERS>"
      }
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • MCP Gateway — Aggregate upstream MCP servers behind one authenticated endpoint
  • OpenAI-compatible API — Expose OpenAI SDK-compatible endpoints at /v1
  • Anthropic-compatible API — Expose Anthropic SDK-compatible endpoints at /v1/messages
  • Passthrough API — Provider-native APIs under /p/{provider}/... with GoModel auth and tracking
  • Response Caching — Exact and semantic response caching to reduce costs
  • Cost Tracking — Per-request cost estimates, usage analytics, and spending breakdowns
  • Rate Limiting — Requests, tokens, and concurrency caps per user, path, provider, or model
  • Budgets — Hard spend limits per user, team, or API key
  • 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 and break down usage by label
  • User Paths — Hierarchical scoping of keys, model access, budgets, usage, and audit logs
  • 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 dashboard

Use cases

  • Consolidate access to multiple LLM providers (OpenAI, Anthropic, Cohere, etc.) and MCP servers through a single gateway with unified authentication
  • Track and control AI spending with per-request cost estimates, budgets, and usage analytics across teams and users
  • Reduce API costs by caching exact and semantic responses, compressing prompts, and intelligently routing requests
  • Implement rate limiting, failover, and load balancing across multiple provider accounts or models
  • Monitor AI usage and performance with Prometheus metrics, audit logs, and live request streaming in the dashboard

GoModel MCP server FAQ

What is GoModel?

GoModel is a self-hosted AI gateway that aggregates MCP servers and multiple LLM providers (OpenAI, Anthropic, Cohere, Google Gemini, Groq, etc.) behind one authenticated HTTP endpoint. It provides OpenAI and Anthropic SDK-compatible APIs, cost tracking, caching, rate limiting, and observability.

Is GoModel free?

GoModel is open-source and free to self-host. You pay only for the underlying LLM provider APIs you use. There is no GoModel subscription fee.

How do I install GoModel in Cursor or Claude?

GoModel is not a Cursor/Claude extension. It's a self-hosted gateway server you run locally or on your infrastructure. Once running, you configure your Cursor or Claude client to point to GoModel's HTTP endpoint (e.g., http://localhost:8080) as the base URL and use your GoModel API key for authentication.

What authentication does GoModel require?

GoModel requires a master key (set via GOMODEL_MASTER_KEY environment variable or generated in the dashboard) to authenticate requests. You also configure API keys for each upstream LLM provider you want to use.

Can I use GoModel with the official OpenAI and Anthropic SDKs?

Yes. GoModel exposes OpenAI-compatible APIs at /v1 and Anthropic-compatible APIs at /v1/messages, so the official SDKs work unchanged—just point the base URL to your GoModel server and use your GoModel key.

What LLM providers does GoModel support?

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.

<p align="center"> <img alt="GoModel logo" src="docs/logo.svg" width="96"> </p> <h1 align="center"> GoModel - The last AI gateway you will ever need </h1> <p align="center"> <a href="https://github.com/ENTERPILOT/GoModel/actions/workflows/test.yml"><img alt="CI" src="https://github.com/ENTERPILOT/GoModel/actions/workflows/test.yml/badge.svg"></a> <a href="https://github.com/ENTERPILOT/GoModel/blob/main/go.mod"><img alt="GO Version" src="https://img.shields.io/github/go-mod/go-version/ENTERPILOT/GoModel?label=GO"></a> <a href="https://hub.docker.com/r/enterpilot/gomodel"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/enterpilot/gomodel?label=Docker%20Pulls"></a> <a href="https://discord.gg/gaEB9BQSPH"><img alt="Discord" src="https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white"></a> </p> <p align="center"> <a href="https://news.ycombinator.com/item?id=47849097"><img alt="Hacker News" src="https://img.shields.io/badge/Hacker%20News-Apr%2021%20%2726%20%7C%20%234-brightgreen?logo=ycombinator&logoColor=white"></a> <a href="https://gomodel.enterpilot.io/docs?utm_source=readme"><img alt="docs GoModel" src="https://img.shields.io/badge/Docs-GoModel-blue"></a> </p> <p align="center"> <a href="https://news.ycombinator.com/item?id=47849097"><img alt="GoModel on Hacker News" src="https://hackerbadge.vercel.app/api?id=47849097"></a> </p> <p align="center"> GoModel is the fastest and the most resource-efficient AI Gateway (<a href="https://gomodel.enterpilot.io/docs/about/benchmarks?utm_source=readme">the self-reproducible benchmarks</a>). It's an alternative to LiteLLM (which was hacked recently) and Portkey (which is no longer maintained on GitHub). </p> <a href="https://demo.enterpilot.io/admin/dashboard?utm_source=readme"> <img src="docs/2026-07-07_demo.gif" alt="GoModel AI gateway dashboard showing AI usage analytics, observability panel, token and costs tracking, and estimated cost monitoring" width="100%"> </a> <p align="center"> (click on the animation ↑ to see the live demo) </p> <p> GoModel saves you money and nerves. </p> <p> <strong>Money</strong> - because you can remember the responses on this layer (caching), track your spending and do tricks like prompt compression and intelligent routing. </p> <p> <strong>Nerves</strong> - 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. </p>

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
ServiceURL
GoModel APIhttp://localhost:8080
Adminer (DB UI)http://localhost:8081
Prometheushttp://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

MCP server providing documentation and API information for EOxElements geospatial Web Components.

34
JavaScript
MIT
View repository →

EQIQs Workplace Dynamics & Psychometric Compatibility Scoring

10 crypto tools for AI agents: BTC/ETH/SOL/XRP momentum signals, Polymarket odds, sentiment, x402.

View repository →
CHCharles Local MCP logo

Guarded local Charles Proxy automation and bounded XML session evidence

0
Rust
Apache-2.0
View repository →

Unofficial local-first MCP for ClassDojo roster imports and classroom skill synchronization.

0
TypeScript
MIT
View repository →

AI-friendly, safety-first TestLink MCP server

0
TypeScript
MIT
View repository →