MCP-compatible LLM gateway that proxies completion requests.
MCP-compatible LLM gateway that proxies completion requests to downstream OpenAI-compatible providers.
mcp-name: io.github.daedalus/mcp-llm-gateway
pip install mcp-llm-gateway
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)Run the MCP server with stdio transport:
mcp-llm-gateway
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 providermodels://list: Returns the list of available modelsconfig://info: Returns current gateway configurationgit 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/
Model: Dataclass representing an available LLM modelCompletionRequest: Dataclass for completion request payloadsGatewayConfig: Dataclass for gateway configurationHTTPAdapter: HTTP client for downstream API communicationModelListAdapter: Adapter for fetching model list from remote endpointsModelService: Service for managing model discovery and cachingCompletionService: Service for handling completion requestsConfigService: Service for managing gateway configurationSource-derived launch command. Check the maintainer’s required arguments and credentials before running:
uvx mcp-llm-gatewayMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-daedalus-mcp-llm-gateway": {
"command": "uvx",
"args": [
"mcp-llm-gateway"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencemcp-llm-gatewaypypiio.github.daedalus/mcp-llm-gateway works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.