# LLM Gateway

> LLM Gateway is an open-source MCP server for ai models and llm tooling. Usage, cost and model-ranking lookups, chat and image generation through LLM Gateway. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** API, self-hosted, Web
- **Website:** https://docs.llmgateway.io/developers/mcp
- **Repository:** https://github.com/theopenco/llmgateway/tree/HEAD/apps/gateway
- **MCP Registry name:** io.github.theopenco/llmgateway
- **Categories:** AI models and LLM tooling
- **Listing updated:** 2026-11-14

## About

LLM Gateway is an OpenAI-compatible gateway that routes requests to many model providers, and its MCP server turns the account side of that into tools. An assistant can inspect the connected user, organization and API key spending limits, pull request, token, error and cache-hit totals with a daily or hourly time series, and rank providers, models, coding apps or API keys by requests, cost or tokens.

It also sends chat completions to any supported model, generates images with models such as Qwen Image and Gemini 3 Pro Image, and lists available models with capabilities and pricing. The same API key authorises all of it, sent as a bearer token to a stateless Streamable HTTP endpoint; DevPass keys also work, using model ids without a provider prefix.

The gateway itself is open source under AGPLv3 with a separate enterprise licence, and can be self-hosted with Docker or used hosted at llmgateway.io. Usage reports cover up to 366 days, with hourly granularity limited to 31 days.

## Features

- **Usage analytics:** Totals, errors, cache hits, costs and a time series over a date range.
- **Ranked breakdowns:** Rank providers, models, apps or keys by requests, cost or tokens.
- **Chat and images:** Send prompts to any supported model and generate images.
- **Model discovery:** Lists models with capabilities and pricing.
- **Account view:** Shows organization, project, role and key spending limits.
- **Stateless HTTP:** Bearer-key Streamable HTTP endpoint, no session state.

## Good for

- Find which model costs the most this month
- See which coding app burns the most tokens
- Check an API key's spending limit
- Compare model prices before choosing
- Generate an image from an assistant

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http llmgateway https://api.llmgateway.io/mcp
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://api.llmgateway.io/mcp
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "llmgateway": {
      "url": "https://api.llmgateway.io/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "llmgateway": {
      "type": "http",
      "url": "https://api.llmgateway.io/mcp"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "llmgateway": {
      "serverUrl": "https://api.llmgateway.io/mcp"
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "llmgateway": {
      "type": "http",
      "url": "https://api.llmgateway.io/mcp"
    }
  }
}
```

## Tools

- `get-account`: Inspect user, organization, project, role and key spending limits
- `get-usage`: Request and token totals, costs and a time series
- `get-usage-breakdown`: Rank providers, models, apps or API keys by requests, cost or tokens

## FAQ

### How do I authenticate?

Send your LLM Gateway API key as a bearer token; a DevPass plan key also works.

### What date range can I query?

Up to 366 days, and hourly reports allow at most 31 days.

### Can I self-host the gateway?

Yes. The README documents a Docker setup; the core is AGPLv3.

### Which endpoint do I use?

https://api.llmgateway.io/mcp, or https://llmgateway.io/mcp.

### Is LLM Gateway free?

Yes. LLM Gateway is open source, so you can use and self-host it for free.

### How do I add LLM Gateway to Claude Code?

Run this command in your terminal: claude mcp add --transport http llmgateway https://api.llmgateway.io/mcp

### What are the best alternatives to LLM Gateway?

The closest alternatives to LLM Gateway are Claude Code Ultimate Guide, signafAIde, Toolkien, Lugh and HypePaper.

## Alternatives

- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [signafAIde](https://ai-powered.com/mcp/signafaide): signafAIde is a freemium MCP server for security.
- [Toolkien](https://ai-powered.com/mcp/toolkien): Toolkien is an open-source MCP server for ai models and llm tooling.
- [Lugh](https://ai-powered.com/mcp/lugh): Lugh is an open-source MCP server for ai models and llm tooling.
- [HypePaper](https://ai-powered.com/mcp/hypepaper): HypePaper is a freemium MCP server for ai models and llm tooling.
- [Agent Data Tools: Compact (find, describe, run)](https://ai-powered.com/mcp/agent-data-tools-compact-find-describe-run): Agent Data Tools: Compact (find, describe, run) is a freemium MCP server for developer tools.
- [Angel Agent Guard: pre-purchase check + prompt-injection scan](https://ai-powered.com/mcp/angel-agent-guard-pre-purchase-check-prompt-injection-scan): Angel Agent Guard: pre-purchase check + prompt-injection scan is a freemium MCP server for ai models and llm tooling.
- [Mizan Calibration](https://ai-powered.com/mcp/mizan-calibration): Mizan Calibration is a free MCP server for ai models and llm tooling.

---
Source: https://ai-powered.com/mcp/llm-gateway
