update-mcp

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Update MCP Server

更新MCP服务器

Update an existing MCP server registration on a live LiteLLM proxy.
在运行中的LiteLLM代理上更新已注册的MCP服务器。

Setup

配置

LITELLM_BASE_URL  — e.g. https://my-proxy.example.com
LITELLM_API_KEY   — proxy admin key
LITELLM_BASE_URL  — 示例:https://my-proxy.example.com
LITELLM_API_KEY   — 代理管理员密钥

Ask the user

询问用户信息

  1. server_id — if they don't have it, list first:
    bash
    curl -s "$BASE/v1/mcp/server" -H "Authorization: Bearer $KEY"
  2. What to change — any combination of:
    • url
    • credentials
      (rotate the auth token)
    • description
    • allowed_tools
      (list of tool names to expose)
  1. server_id — 如果用户没有该ID,先执行以下命令列出所有服务器:
    bash
    curl -s "$BASE/v1/mcp/server" -H "Authorization: Bearer $KEY"
  2. 要修改的内容 — 可选择以下任意组合:
    • url
    • credentials
      (轮换认证令牌)
    • description
    • allowed_tools
      (要暴露的工具名称列表)

Run

执行更新

bash
curl -s -X PUT "$BASE/v1/mcp/server" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "server_id": "<server_id>",
    "url": "<new_url>",
    "credentials": "<new_token>"
  }'
Only include the fields being changed.
bash
curl -s -X PUT "$BASE/v1/mcp/server" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "server_id": "<server_id>",
    "url": "<new_url>",
    "credentials": "<new_token>"
  }'
仅包含需要修改的字段。

Output

输出

Confirm the server was updated and show the updated fields.
确认服务器已更新,并展示更新后的字段。