litellm-mcp
MCP server that lets Claude Code dispatch tasks to the LiteLLM gateway, supporting both local Ollama models and Anthropic models via the gateway.
README
litellm-mcp
MCP server that lets Claude Code dispatch tasks to the LiteLLM gateway
(192.168.10.175:4000) as worker agents. Unlike ollama-mcp (which reaches only the
local Ollama models directly), this shim reaches the full gateway model set — the
local Ollama models and the Anthropic-via-gateway models
(claude-sonnet-4-6, claude-haiku-4-5).
Tools
list_models()— model ids registered on the gateway.ask_model(prompt, model=None, system=None)— single-turn worker call. Defaults toqwen2.5:7b-instruct(a reliable non-reasoning local model — a safer headless default than the reasoning modelqwen3.5:4b).chat(messages, model=None)— multi-turn.
Credentials — per-request header (not at rest on Proteus)
This shim brokers spend on Anthropic, so the gateway master key is sensitive. It is not
stored in /etc/mcp/litellm-mcp.env on the shared Proteus host. Instead the key travels as a
per-request header from the client's ~/.claude.json:
"litellm": {
"type": "sse",
"url": "http://192.168.10.190:8107/sse",
"headers": { "x-litellm-key": "<LITELLM_MASTER_KEY from Infisical>" }
}
The server reads x-litellm-key (or Authorization: Bearer ...) from each tool call. For
local/stdio use, LITELLM_API_KEY env is accepted as a fallback.
Config (non-sensitive, env file on Proteus)
| Var | Default |
|---|---|
LITELLM_BASE_URL |
http://192.168.10.175:4000/v1 |
LITELLM_DEFAULT_MODEL |
qwen2.5:7b-instruct |
MCP_TRANSPORT / MCP_HOST / MCP_PORT |
sse / 0.0.0.0 / 8107 |
Tests
pip install -e ".[test]"
pytest -q # unit (respx-mocked)
LITELLM_API_KEY=... pytest -q # also runs live integration against the gateway
Integration tests skip automatically when the gateway is unreachable or LITELLM_API_KEY
is unset (e.g. in CI on the GitLab runner). Deploy is via GitLab CI → Proteus
(/opt/mcp/litellm-mcp/, systemd litellm-mcp.service, port 8107).
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.