mcp-llm-gateway
Proxies completion requests to OpenAI-compatible downstream APIs, allowing AI agents to send prompts and receive completions from OpenAI models.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-llm-gatewaygenerate a short poem about the ocean"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP LLM Gateway
MCP-compatible LLM gateway that proxies completion requests to downstream OpenAI-compatible providers.
mcp-name: io.github.daedalus/mcp-llm-gateway
Install
pip install mcp-llm-gatewayRelated MCP server: MCP Token Bridge
Usage
Configuration
Set the following environment variables:
DOWNSTREAM_URL: Base URL for the OpenAI-compatible downstream API (required)DEFAULT_MODEL: Default model to use for completions (required)MODEL_LIST_URL: URL to fetch available models from (optional, defaults to models.dev)API_KEY: Optional API key for downstream (passthrough)TIMEOUT: Request timeout in seconds (optional, default: 60)
MCP Server
Run the MCP server with stdio transport:
mcp-llm-gatewayMCP Tools
The server exposes the following tools:
list_models(): List all available models from the remote endpointcomplete(prompt, model, max_tokens, temperature): Send a completion request to the downstream LLM provider
MCP Resources
models://list: Returns the list of available modelsconfig://info: Returns current gateway configuration
Development
git clone https://github.com/daedalus/mcp-llm-gateway.git
cd mcp-llm-gateway
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mypy src/API
core.models
Model: Dataclass representing an available LLM modelCompletionRequest: Dataclass for completion request payloadsGatewayConfig: Dataclass for gateway configuration
adapters.http
HTTPAdapter: HTTP client for downstream API communicationModelListAdapter: Adapter for fetching model list from remote endpoints
services.gateway
ModelService: Service for managing model discovery and cachingCompletionService: Service for handling completion requestsConfigService: Service for managing gateway configuration
Available Tools
2 toolscompleteA
Send a completion request to the downstream LLM provider.
Proxies the request to the configured OpenAI-compatible downstream endpoint.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The input prompt for the model. | |
| model | No | Optional model ID. Uses provider default if not specified. | |
| provider | No | Optional provider ID. Uses first enabled provider if not specified. | |
| max_tokens | No | Optional maximum tokens to generate. | |
| temperature | No | Optional sampling temperature (0.0 to 2.0). |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must cover behavioral traits. It mentions proxying but does not disclose authentication needs, rate limits, error handling, or whether the response is streaming or blocking.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise: two sentences that front-load the purpose. No unnecessary words or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 5 parameters and an output schema. The description is minimal but covers the core function. While it could mention more about the completion behavior (e.g., streaming), the output schema may compensate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already describes all parameters. The description adds no additional parameter-level information beyond what is in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool sends a completion request to a downstream LLM provider and proxies to an OpenAI-compatible endpoint. It is distinct from the sibling tool list_models.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this tool is for sending completions, and the sibling tool list_models is for listing models. However, it does not explicitly state when to use or not use this tool, nor are alternatives discussed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_modelsA
List all available models from the configured providers.
Fetches models from the configured providers, with caching. Can filter by provider ID.
| Name | Required | Description | Default |
|---|---|---|---|
| provider | No | Optional provider ID to filter models. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses caching and fetching from providers, but does not mention any side effects, rate limits, authentication, or whether it is read-only. The caching behavior is helpful context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, front-loaded with the main purpose, and every word adds value. No fluff or unnecessary repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of the tool (single optional parameter, output schema exists), the description adequately covers the key aspects: listing models, caching, and filtering. However, it does not mention any pagination, limits, or ordering, which could be useful for completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with the parameter already described as 'Optional provider ID to filter models.' The description adds minimal extra value ('Can filter by provider ID'), so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'List' and the resource 'all available models from the configured providers'. It distinguishes itself from the sibling tool 'complete' by focusing on listing models, which is a different operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions caching and the ability to filter by provider ID, giving context for usage. It implicitly tells when to use this tool (to list models) vs the sibling 'complete' (likely for completions), but lacks explicit exclusions or alternative conditions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.0- First observed
complete - First observed
list_models
TDQS
Scored across 2 tools
The two tools serve clearly distinct purposes: one for sending completion requests and one for listing models. There is no overlap or ambiguity between them.
The naming convention is inconsistent: 'complete' is a bare verb, while 'list_models' follows a verb_noun pattern. Consistency would improve predictability.
With only 2 tools, the surface is minimal for an LLM gateway. While it covers basic completion and model listing, it feels thin compared to typical gateways that offer more features.
The gateway lacks many expected operations such as streaming, token counting, embeddings, or health checks. This is a significant gap for a production-ready LLM gateway.
Maintenance
Related MCP Connectors
MCP-Native LLM Orchestration Agent
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
LLM Orchestration Agent (Mcp)
Related MCP Servers
- -licenseCqualityNot gradedmaintenanceEnables interaction with OpenAI-compatible APIs (like Ollama) through MCP tools. Provides access to chat completions, model listings, and embeddings generation from local or remote OpenAI-style endpoints.3-
- FlicenseNot gradedqualityDmaintenanceBridges MCP tool calls with OpenAI-compatible HTTP endpoints, allowing MCP clients to forward chat completion requests through a unified FastAPI server that returns responses with MCP-specific headers.1-
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to use llama.cpp models via MCP protocol by bridging MCP requests to an OpenAI-compatible API.-
- AlicenseNot gradedqualityDmaintenanceMCP server that provides tools to interact with the LiteLLM proxy API, enabling LLM completions, embeddings, image generation, and admin operations.7 npmMIT