MCP server giving AI agents access to 100+ LLMs through LiteLLM
Project description
LiteLLM Agent MCP Server
Give your AI agent access to 100+ LLMs.
This MCP server lets AI agents (Claude Code, Cursor, etc.) call any LLM through LiteLLM's unified API. Stop being limited to one model — use the right model for each task.
Why?
AI agents are typically stuck on a single model. With this MCP server, your agent can:
- 🔀 Call any model — GPT-4, Claude, Gemini, Mistral, and 100+ more
- ⚖️ Compare outputs — Get responses from multiple models and pick the best
- 🎯 Use the right tool — Code tasks → GPT-4, writing → Claude, long docs → Gemini
- 💰 Save costs — Route simple queries to cheaper models
Tools
| Tool | Description |
|---|---|
call |
Call any LLM model (OpenAI chat completions format) |
responses |
Use OpenAI Responses API format (stateful, tools, structured output) |
messages |
Use Anthropic Messages API format (native Claude format) |
generate_content |
Use Google generateContent format (native Gemini format) |
compare |
Compare responses from multiple models |
models |
List available models and their strengths |
recommend |
Get model recommendation for a task type |
Installation
Claude Desktop / Cursor
Add to your MCP config:
{
"mcpServers": {
"litellm": {
"command": "python",
"args": ["-m", "litellm_agent_mcp"],
"env": {
"OPENAI_API_KEY": "sk-...",
"ANTHROPIC_API_KEY": "sk-..."
}
}
}
}
From PyPI
pip install litellm-agent-mcp
From Source
git clone https://github.com/BerriAI/litellm-agent-mcp
cd litellm-agent-mcp
pip install -e .
Usage Examples
Call a specific model
Use the `call` tool:
- model: "gpt-4o"
- prompt: "Explain this code: [code here]"
Compare multiple models
Use the `compare` tool:
- models: ["gpt-4o", "claude-sonnet-4-20250514"]
- prompt: "What's the best approach to implement caching?"
Get a recommendation
Use the `recommend` tool:
- task_type: "code"
→ Returns: gpt-4o (Strong at code generation, debugging, and review)
Environment Variables
Set API keys for the providers you want to use:
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-...
GEMINI_API_KEY=...
MISTRAL_API_KEY=...
Or point to a LiteLLM proxy:
LITELLM_API_BASE=https://your-proxy.com
LITELLM_API_KEY=sk-...
Supported Models
| Provider | Models |
|---|---|
| OpenAI | gpt-4o, gpt-4o-mini, o1-preview, o1-mini |
| Anthropic | claude-sonnet-4, claude-opus-4 |
| gemini-1.5-pro, gemini-1.5-flash | |
| Mistral | mistral-large-latest |
| + 100 more | See LiteLLM docs |
License
MIT
Links
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file litellm_mcp-1.0.4.tar.gz.
File metadata
- Download URL: litellm_mcp-1.0.4.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a036bcdff46d527b4e438a11875b3547901396a2b52340d62eba9f94f3ff4737
|
|
| MD5 |
1a99ec734bd475d0eba5397853310f56
|
|
| BLAKE2b-256 |
cb8c040c10351d54843a8ffcaec3cd21422f22ba4f8e5b63e83a5671def648ef
|
File details
Details for the file litellm_mcp-1.0.4-py3-none-any.whl.
File metadata
- Download URL: litellm_mcp-1.0.4-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0479e37b873bf0cbbe84ce954f00d17d2aaa558eb3d5f4eaa79fd3a7afa33700
|
|
| MD5 |
cc2e6f00bced579dd322b39c16cfba5a
|
|
| BLAKE2b-256 |
82323cafc752e6cea6861b2dbcbba724e4073fd54b94a0e27cd915174e7a1386
|