---
title: "Update Mcp Server"
method: PATCH
path: "/v1/tools/mcp/servers/{mcp_server_name}"
tags: ["tools"]
---

# Update Mcp Server

`PATCH /v1/tools/mcp/servers/{mcp_server_name}`

Update an existing MCP server configuration

## Path parameters

- `mcp_server_name` string, required

## Request body

- union
  - UpdateStdioMCPServer — Update a Stdio MCP server
    - `stdio_config` StdioServerConfig
      - `server_name` string, required — The name of the server
      - `type` 'sse' | 'stdio' | 'streamable_http'
      - `command` string, required — The command to run (MCP 'local' client will run this command)
      - `args` string[], required — The arguments to pass to the command
      - `env` object, nullable — Environment variables to set
  - UpdateSSEMCPServer — Update an SSE MCP server
    - `server_url` string, nullable — The URL of the server (MCP SSE client will connect to this URL)
    - `token` string, nullable — The access token or API key for the MCP server (used for SSE authentication)
    - `custom_headers` object, nullable — Custom authentication headers as key-value pairs
  - UpdateStreamableHTTPMCPServer — Update a Streamable HTTP MCP server
    - `server_url` string, nullable — The URL path for the streamable HTTP server (e.g., 'example/mcp')
    - `auth_header` string, nullable — The name of the authentication header (e.g., 'Authorization')
    - `auth_token` string, nullable — The authentication token or API key value
    - `custom_headers` object, nullable — Custom authentication headers as key-value pairs

## Response `200`

Successful Response

- union
  - StdioServerConfig
    - `server_name` string, required — The name of the server
    - `type` 'sse' | 'stdio' | 'streamable_http'
    - `command` string, required — The command to run (MCP 'local' client will run this command)
    - `args` string[], required — The arguments to pass to the command
    - `env` object, nullable — Environment variables to set
  - SSEServerConfig — Configuration for an MCP server using SSE Authentication can be provided in multiple ways: 1. Using auth_header + auth_token: Will add a specific header with the token Example: auth_header="Authorization", auth_token="Bearer abc123" 2. Using the custom_headers dict: For more complex authentication scenarios Example: custom_headers={"X-API-Key": "abc123", "X-Custom-Header": "value"}
    - `server_name` string, required — The name of the server
    - `type` 'sse' | 'stdio' | 'streamable_http'
    - `server_url` string, required — The URL of the server (MCP SSE client will connect to this URL)
    - `auth_header` string, nullable — The name of the authentication header (e.g., 'Authorization')
    - `auth_token` string, nullable — The authentication token or API key value
    - `custom_headers` object, nullable — Custom HTTP headers to include with SSE requests
  - StreamableHTTPServerConfig — Configuration for an MCP server using Streamable HTTP Authentication can be provided in multiple ways: 1. Using auth_header + auth_token: Will add a specific header with the token Example: auth_header="Authorization", auth_token="Bearer abc123" 2. Using the custom_headers dict: For more complex authentication scenarios Example: custom_headers={"X-API-Key": "abc123", "X-Custom-Header": "value"}
    - `server_name` string, required — The name of the server
    - `type` 'sse' | 'stdio' | 'streamable_http'
    - `server_url` string, required — The URL path for the streamable HTTP server (e.g., 'example/mcp')
    - `auth_header` string, nullable — The name of the authentication header (e.g., 'Authorization')
    - `auth_token` string, nullable — The authentication token or API key value
    - `custom_headers` object, nullable — Custom HTTP headers to include with streamable HTTP requests

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/yu-code666/apis/letta-api.md) · [All operations](https://skmtc.dev/yu-code666/apis/letta-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/yu-code666/letta-api/revisions/6cec99480c13/schema)
