$npx -y skills add BerriAI/litellm-skills --skill add-mcpRegister a new MCP server on a live LiteLLM proxy. Asks for the server name, transport type, URL, and optional auth, then calls POST /v1/mcp/server.
| 1 | # Add MCP Server |
| 2 | |
| 3 | Register an MCP (Model Context Protocol) server on a live LiteLLM proxy so it can be used by models and agents. |
| 4 | |
| 5 | ## Setup |
| 6 | |
| 7 | Ask for these if not already known: |
| 8 | ``` |
| 9 | LITELLM_BASE_URL — e.g. https://my-proxy.example.com |
| 10 | LITELLM_API_KEY — proxy admin key |
| 11 | ``` |
| 12 | |
| 13 | API reference: https://docs.litellm.ai/docs/mcp |
| 14 | |
| 15 | ## Ask the user |
| 16 | |
| 17 | 1. **Server name** (required, e.g. `my-github-mcp`) |
| 18 | 2. **URL** (required, e.g. `https://mcp.example.com/sse`) |
| 19 | 3. **Transport** — `sse` (default), `http`, or `stdio` |
| 20 | 4. **Description** (optional) |
| 21 | 5. **Auth** — does it need a bearer token or API key? (optional) |
| 22 | |
| 23 | ## Run |
| 24 | |
| 25 | ```bash |
| 26 | curl -s -X POST "$BASE/v1/mcp/server" \ |
| 27 | -H "Authorization: Bearer $KEY" \ |
| 28 | -H "Content-Type: application/json" \ |
| 29 | -d '{ |
| 30 | "server_name": "<name>", |
| 31 | "url": "<url>", |
| 32 | "transport": "sse", |
| 33 | "description": "<description_or_omit>", |
| 34 | "auth_type": "bearer_token", |
| 35 | "credentials": "<token_if_needed>" |
| 36 | }' |
| 37 | ``` |
| 38 | |
| 39 | For unauthenticated servers, omit `auth_type` and `credentials`. |
| 40 | |
| 41 | ## List existing MCP servers |
| 42 | |
| 43 | ```bash |
| 44 | curl -s "$BASE/v1/mcp/server" \ |
| 45 | -H "Authorization: Bearer $KEY" |
| 46 | ``` |
| 47 | |
| 48 | ## Delete an MCP server |
| 49 | |
| 50 | ```bash |
| 51 | curl -s -X DELETE "$BASE/v1/mcp/server/<server_id>" \ |
| 52 | -H "Authorization: Bearer $KEY" |
| 53 | ``` |
| 54 | |
| 55 | ## Output |
| 56 | |
| 57 | Show `server_id` — needed to reference this MCP server in agent configs or to delete it later. |