Woow LiteLLM MCP Server
An MCP server suite for administering LiteLLM gateways, exposing tools to manage models, keys, teams, users, and spending, along with an admin GUI and an encrypted reverse proxy for secure access.
README
Woow LiteLLM MCP Server
An MCP-server suite for administering a LiteLLM
gateway. It ports the architecture of
WOOWTECH/Woow_emqx_mcp_server
to LiteLLM: a FastMCP server that exposes LiteLLM's admin API as MCP tools, a Web
admin console, and an encrypted reverse-proxy / admin-core that lets Claude (or any
MCP client) reach the tools over a single hardened endpoint.
繁體中文說明請見 README_zh-TW.md。
What's in the box
| Component | Package | Role |
|---|---|---|
| 1. MCP server | woow_litellm_mcp_server |
FastMCP server exposing 38 LiteLLM tools (stdio or Streamable-HTTP). |
| 2. Admin console | litellm_mcp_admin |
FastAPI + React GUI to configure connection, toggle tools, rotate the proxy token, tail logs. |
| 3. Admin core / encrypted proxy | mcp_admin_core |
Product-agnostic core: JWT auth, file-backed config store, MCP subprocess manager, and the reverse proxy that fronts the MCP child. |
| 4. Frontend SPA | frontend/ |
Vite + React admin UI shared with the reference, with LiteLLM overrides. |
Architecture
┌───────────────────── single container ──────────────────┐
Claude / MCP client │ │
│ │ uvicorn litellm_mcp_admin.main:app (0.0.0.0:8080) │
│ HTTPS │ ├─ AuthMiddleware (JWT) ── /api/* admin GUI + API │
▼ │ ├─ proxy /private_{token}/mcp/ ──┐ │
Cloudflare edge ─────┼──► └─ SPA (React) │ reverse proxy (nginx-free) │
│ ▼ │
│ McpProcessManager ► woow_litellm_mcp_server (127.0.0.1) │
│ │ transport=http /mcp/ │
└─────────────────────────────────┼────────────────────────────┘
▼
LiteLLM gateway (Bearer master key, port 4000)
The MCP child binds to loopback only. The single path in is the proxy route
/private_{token}/…, whose {token} must equal the stored mcp_auth_token.
"Encrypted/private" here means path-token isolation + JWT-gated GUI + TLS at the
edge — there is no at-rest payload crypto; the config JSON is plaintext protected
by file perms (chmod 600) and secret-masking in the API.
Tool surface (38 tools)
Every tool is prefixed litellm_. The registry
(woow_litellm_mcp_server/registry.py) is the single source of truth; the gate and
the admin GUI both read it.
| Category | Tools |
|---|---|
| models | list_models, model_info, model_group_info, add_model, update_model, delete_model ⚠ |
| chat | chat_completion, token_counter |
| keys | generate_key, list_keys, key_info, update_key, delete_key ⚠, block_key ⚠, unblock_key, regenerate_key |
| teams | create_team, list_teams, team_info, update_team, delete_team ⚠, team_member_add, team_member_delete ⚠ |
| users | create_user, list_users, user_info, update_user, delete_user ⚠ |
| spend | spend_logs, global_spend_report, spend_calculate |
| health | health, health_readiness |
| plugins (Claude-Code skill hub) | list_plugins, register_plugin, enable_plugin, disable_plugin, skill_hub |
⚠ = destructive ([DESTRUCTIVE] docstring prefix). Read-only mode
(LITELLM_MCP_READONLY=true) drops every destructive tool at registration time.
Gating
Three levels plus read-only, all env-driven (or set from the GUI):
LITELLM_MCP_DISABLED_CATEGORIES— drop whole families (keys,teams).LITELLM_MCP_DISABLED_TOOLS— drop individual tools (litellm_delete_key).LITELLM_MCP_DISABLED_OPERATIONS— drop CRUD operations (tool:opor bareop).LITELLM_MCP_READONLY— drop everything mutating.
Quickstart
1. Bare MCP server (local, stdio or HTTP)
pip install . # installs component 1 only
export LITELLM_MCP_BASE_URL=http://localhost:4000
export LITELLM_MCP_MASTER_KEY=sk-... # never commit this
# Streamable-HTTP (the deployed default):
python -m woow_litellm_mcp_server.server --transport http --host 0.0.0.0 --port 8000 --path /mcp/
# or stdio for a local MCP client:
python -m woow_litellm_mcp_server.server --transport stdio
Config is read from the environment (LITELLM_MCP_ prefix) — see
.env.example.
2. Admin console via Docker Compose
cp .env.example .env # set JWT_SECRET, LITELLM_MCP_* etc.
docker compose up --build # serves the GUI on http://localhost:8080
The compose service builds the SPA (stage 1) and the Python image (stage 2), then
serves litellm_mcp_admin.main:app on :8080. Log in with the admin_password
from the config store (default admin — change it on first login), point the
Connection page at your LiteLLM gateway, and toggle tools on the Tools page.
3. Kubernetes (k3s, git-clone pattern — no image build)
The live deployment uses an initContainer that clones this public repo into
an emptyDir; the main python:3.12-slim container pip installs it and launches
the server on Streamable-HTTP. No private registry required. See
k8s-deploy.yaml (it also documents the image-based path).
# 1) namespace + secret (the master key lives ONLY in the Secret, never in the repo)
kubectl apply -f k8s-secret.example.yaml # after filling in the real key
# 2) the deployment + service
kubectl apply -f k8s-deploy.yaml
In-cluster consumers then reach it at
http://litellm-mcp.litellm-mcp.svc.cluster.local:8000/mcp/.
4. Kubernetes — admin console + encrypted proxy (registryless)
k8s-deploy.yaml alone gives you a bare, unauthenticated MCP server that is
safe only because it never leaves the cluster. To publish it, deploy
k8s-admin-deploy.yaml as well: same git-clone
trick, but it builds the SPA, seeds /data/config.json on a PVC, and runs the
admin console on :8080 with the FastMCP child spawned on 127.0.0.1:3000.
kubectl apply -f k8s-deploy.yaml # namespace + litellm-mcp-secret
kubectl apply -f k8s-admin-deploy.yaml # console + encrypted proxy + child
Point a Cloudflare tunnel (or any ingress) at
http://litellm-mcp-admin.litellm-mcp.svc.cluster.local:8080 and the only
public MCP door is /private_<mcp_auth_token>/mcp/. Full design notes,
verification commands and the Bot Fight Mode caveat live in
docs/encrypted-proxy.md.
Connecting Claude
Add the MCP endpoint as a custom connector. Through the admin proxy the URL is:
https://<your-admin-hostname>/private_<mcp_auth_token>/mcp/
Rotate mcp_auth_token from the Tokens page (or
POST /api/tokens/rotate) — the previous URL dies immediately. Optionally
front it with the Cloudflare Worker in cloudflare/ to give
the MCP endpoint its own hostname and a clean anonymous fallback for OAuth
discovery.
Configuration reference
All server settings use the LITELLM_MCP_ prefix (woow_litellm_mcp_server/settings.py):
| Env var | Default | Meaning |
|---|---|---|
LITELLM_MCP_BASE_URL |
http://localhost:4000 |
LiteLLM gateway base URL (no /api/v5). |
LITELLM_MCP_MASTER_KEY |
(empty) | Bearer master/admin key. |
LITELLM_MCP_READONLY |
false |
Drop every destructive tool. |
LITELLM_MCP_DISABLED_CATEGORIES |
(empty) | CSV of categories to disable. |
LITELLM_MCP_DISABLED_TOOLS |
(empty) | CSV of tool names to disable. |
LITELLM_MCP_DISABLED_OPERATIONS |
(empty) | CSV of tool:op / op gates. |
LITELLM_MCP_DEFAULT_LIMIT |
50 |
Default page size. |
LITELLM_MCP_MAX_LIMIT |
500 |
Max page size. |
LITELLM_MCP_REQUEST_TIMEOUT |
60 |
Per-request HTTP timeout (s). |
Admin-console settings: MCP_ADMIN_CONFIG (config path), JWT_SECRET,
JWT_EXPIRY_HOURS.
Development & tests
pip install -e ".[admin,test]"
pytest # unit tests (live probes are excluded by default)
pytest -m live # opt-in: needs a reachable LiteLLM gateway
The suite mocks LiteLLM's HTTP API and asserts each tool builds the right request and parses the response; the registry↔tools invariant keeps the surface honest. See CONTRIBUTING.md.
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。