LiteLLM MCP Server

Generate an MCP client configuration for Claude Desktop, Cursor, Claude Code, or any MCP-compatible client.

Template Config

{
  "mcpServers": {
    "litellm": {
      "command": "uvx",
      "args": ["--refresh", "--extra-index-url", "https://nikitatsym.github.io/litellm-mcp/simple", "litellm-mcp"],
      "env": {
        "LITELLM_URL": "https://litellm.example.com",
        "LITELLM_API_KEY": "YOUR_ADMIN_KEY"
      }
    }
  }
}

Generate Your Config

Base URL of your LiteLLM proxy (no trailing slash).

Master key or an admin-role virtual key. Sent as Authorization: Bearer.

How to Mint a Scoped Admin Key

This MCP wraps the proxy administration surface, so it needs an admin-scoped key (not a plain inference key). You can use the master key, but a dedicated virtual key with the proxy_admin role is safer to rotate.

  1. In the LiteLLM Admin UI: go to Virtual KeysCreate New Key, assign the proxy_admin role (or a role with admin permissions), and copy the key — it is shown only once.
  2. Or via the API, calling with the master key:
    curl -X POST "$LITELLM_URL/key/generate" \
      -H "Authorization: Bearer $LITELLM_MASTER_KEY" \
      -H "Content-Type: application/json" \
      -d '{"user_role": "proxy_admin", "key_alias": "mcp-admin"}'
  3. Paste the resulting key into the field above, click Generate Config, and add the result to your MCP client configuration file.

Where to Put the Config

  1. Claude Desktop — paste into claude_desktop_config.json.
  2. Cursor — paste into .cursor/mcp.json in your project root.
  3. Claude Code — paste into .claude/settings.json or use claude mcp add.
  4. For other MCP clients, consult their documentation on where to place the server configuration.