llm-fallback-mcp
Allows sending prompts to Google Gemini's API as part of a fallback chain across multiple LLM providers.
Allows sending prompts to OpenAI's API (GPT models) as part of a fallback chain across multiple LLM providers.
Click on "Install 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., "@llm-fallback-mcpexplain machine learning in one sentence"
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.
llm-fallback-mcp
MCP server that completes prompts with automatic provider fallback across OpenAI, Anthropic Claude, and Google Gemini. Built for production: rate-limit aware, retries on transient failures, transparent attempt log.
Why
LLM APIs go down. They rate-limit you. One provider has an outage, the others usually don't. Production LLM apps need fallback. This server gives you the pattern as a single MCP tool.
Try OpenAI → Anthropic → Gemini in order (configurable)
Each provider retries once on 429 / 5xx / network errors with backoff
Return first success with a full per-provider attempt log
Skip providers without keys automatically
Zero SDK dependencies — calls each provider's REST API directly
Related MCP server: litellm-mcp
Install
npm install -g llm-fallback-mcpOr npx:
npx llm-fallback-mcpUse with Claude Desktop
Add to claude_desktop_config.json (Windows: %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"llm-fallback": {
"command": "npx",
"args": ["-y", "llm-fallback-mcp"],
"env": {
"OPENAI_API_KEY": "sk-...",
"ANTHROPIC_API_KEY": "sk-ant-...",
"GEMINI_API_KEY": "..."
}
}
}
}Only set keys for providers you want active. Missing keys = provider skipped.
Tools
complete
Arg | Type | Required | Default |
| string | yes | — |
| string[] | no |
|
| object | no | — |
| number | no |
|
| number | no |
|
health_check
Returns which providers are configured.
Example response
{
"text": "...",
"provider_used": "anthropic",
"model_used": "claude-haiku-4-5-20251001",
"attempts": [
{ "provider": "openai", "ok": false, "status": 429, "durationMs": 412 },
{ "provider": "anthropic", "ok": true, "durationMs": 1133 }
]
}Local development
git clone https://github.com/KhushalB25/llm-fallback-mcp.git
cd llm-fallback-mcp
npm install
npm run build
OPENAI_API_KEY=sk-... npm startAuthor
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- Alicense-qualityCmaintenanceAn MCP server that functions as an intelligent gateway for multiple LLM backends including OpenAI, Claude, and Ollama. It supports automatic provider fallback, streaming responses via Server-Sent Events, and real-time monitoring for robust AI integration.MIT
- Alicense-qualityCmaintenanceMCP server that provides tools to interact with the LiteLLM proxy API, enabling LLM completions, embeddings, image generation, and admin operations.10MIT
- Flicense-qualityDmaintenanceLocal MCP server that exposes fixed tools for GPT, Claude, and Gemini while routing to any OpenAI-compatible chat completions backend with independent configuration per target.1
- Flicense-qualityCmaintenanceExposes multiple LLM providers (AWS Bedrock, OpenAI, Google Gemini, local Ollama) as MCP tools with automatic routing by task type and Prometheus metrics, enabling any MCP-compatible client to generate text, route prompts, and list providers.
Related MCP Connectors
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
MCP server for generating rough-draft project plans from natural-language prompts.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/KhushalB25/llm-fallback-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server