# add-mcp

Register 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.

Skill by LiteLLM. Category: Agent craft.

## Install

Project (for this project only):

```sh
npx skills add berriai/litellm-skills --skill add-mcp
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

Global (for every project on this machine):

```sh
npx skills add berriai/litellm-skills --skill add-mcp -g
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

## Tags

- Runs on your computer: It runs as a program on your machine, with your access.
- Runs shell commands: Its steps run shell commands in your terminal.

## Security audits

- Gen Agent Trust Hub: Pass
- Socket: Pass
- Snyk: Fail

Installs: 119. Installs counted by skills.sh. [Open on skills.sh](https://www.skills.sh/berriai/litellm-skills/add-mcp)

## Source

[Open the source](https://github.com/berriai/litellm-skills/tree/HEAD/add-mcp). Checked 2026-10-10. This summary may contain AI-generated text, so it can be wrong. Check the source before you rely on it.

## SKILL.md

````markdown
---
name: add-mcp
description: >
  Register 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.
license: MIT
compatibility: Requires curl.
metadata:
  author: BerriAI
  version: "1.0"
allowed-tools: Bash(curl:*)
---

# Add MCP Server

Register an MCP (Model Context Protocol) server on a live LiteLLM proxy so it can be used by models and agents.

## Setup

Ask for these if not already known:
```
LITELLM_BASE_URL  — e.g. https://my-proxy.example.com
LITELLM_API_KEY   — proxy admin key
```

API reference: https://docs.litellm.ai/docs/mcp

## Ask the user

1. **Server name** (required, e.g. `my-github-mcp`)
2. **URL** (required, e.g. `https://mcp.example.com/sse`)
3. **Transport** — `sse` (default), `http`, or `stdio`
4. **Description** (optional)
5. **Auth** — does it need a bearer token or API key? (optional)

## Run

```bash
curl -s -X POST "$BASE/v1/mcp/server" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "server_name": "<name>",
    "url": "<url>",
    "transport": "sse",
    "description": "<description_or_omit>",
    "auth_type": "bearer_token",
    "credentials": "<token_if_needed>"
  }'
```

For unauthenticated servers, omit `auth_type` and `credentials`.

## List existing MCP servers

```bash
curl -s "$BASE/v1/mcp/server" \
  -H "Authorization: Bearer $KEY"
```

## Delete an MCP server

```bash
curl -s -X DELETE "$BASE/v1/mcp/server/<server_id>" \
  -H "Authorization: Bearer $KEY"
```

## Output

Show `server_id` — needed to reference this MCP server in agent configs or to delete it later.
````

- Previous: [delete-model](https://syn4pse.dev/terminal/litellm-delete-model.md)
- Next: [delete-key](https://syn4pse.dev/terminal/litellm-delete-key.md)
- [Terminal](https://syn4pse.dev/terminal.md)
- [Suggest a change](mailto:terminal@syn4pse.dev?subject=Terminal%20suggestion)
