LLM Gateway
Lets your AI agent chat with many LLMs, generate images, browse models and check your usage and costs.
1.7k stars on GitHubby LLM Gateway (theopenco)License NOASSERTIONUpdated 18 days ago
How to install
This MCP is remote: it runs in the cloud.
Nothing to install. Copy the address and paste it into your AI app:
Server address
https://api.llmgateway.io/mcp
- βΊClaude (site or app): Settings β Connectors β Add custom connector.
- βΊChatGPT: Settings β Apps β Create app (developer mode), and paste the address.
- βΊClaude Code, Cursor, VS Code and Windsurf: pick your app below.
Paste in the terminal:
claude mcp add --transport http llmgateway https://api.llmgateway.io/mcp --header "Authorization: <your value>"
What to fill in
| Name | What it is | Required |
|---|---|---|
Authorization | LLM Gateway API key as 'Bearer <api-key>'. Create one at https://llmgateway.io/dashboard | Yes |
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Ask GPT-4o and another model the same question and compare the answers.
Show me my LLM usage and costs for this month.
What it is
LLM Gateway is an open-source gateway that sends your requests to many LLM providers through one OpenAI-compatible API. Its MCP server lets your agent chat with any model, generate images, browse the model list and see usage and costs. You can use the hosted version or run it yourself.
What it can do
- Chat with any LLM
- Generate images
- Browse available models
- Check your usage and costs
- Underlying gateway: route requests to OpenAI, Anthropic, Google Vertex AI and others
When to use
- βΊWhen you want your agent to compare answers from different models.
- βΊWhen you want to see how much your LLM requests cost.
- βΊWhen you want one account and API key for many providers.
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
llm-gatewayLets your agent manage language model traffic. It distributes requests, controls access, and monitors costs to ensure efficiency.exploring-llm-clustersHelps your agent examine groups of similar AI conversations, compare how each group behaves, and check the cost and speed of each.serving-llms-vllmHelps your agent serve language models to many users at high speed using vLLM, with an OpenAI-compatible API and quantization support.Frequently asked questions
Is it open source?
Core functionality is under AGPLv3. Features in the ee directory need an Enterprise license.
Can I self-host it?
Yes, with Docker. The readme gives a docker run example with named volumes.
Is there a hosted version?
Yes. Create an account at llmgateway.io to get an API key.
Which providers does it support?
The readme names OpenAI, Anthropic and Google Vertex AI, among others.
Is the API compatible with OpenAI?
Yes, it uses the OpenAI API format for easier migration.
What does it track?
Requests, tokens used, response times and costs across your LLM calls.
If it does not work
- βΊCheck that your LLM Gateway API key is valid and set in the server config.
- βΊIf self-hosting, use Docker-managed volumes for PostgreSQL, not a host folder.
- βΊRestart your AI app fully after adding the server.
5 new skills a week. 1 minute to read.