Skip to content
  • Auto
  • Light
  • Dark
DiscordForumGitHubSign up
View as Markdown
Copy Markdown

Open in Claude
Open in ChatGPT

Update Mcp Server

patch/v1/mcp-servers/{mcp_server_id}

Update an existing MCP server configuration

Path ParametersExpand Collapse
mcp_server_id: string
Body ParametersExpand Collapse
body: UpdateStdioMcpServer { args, command, env, server_name } or UpdateSseMcpServer { token, auth_header, auth_token, 3 more } or UpdateStreamableHTTPMcpServer { token, auth_header, auth_token, 3 more }

Update schema for Stdio MCP server - all fields optional

Accepts one of the following:
UpdateStdioMcpServer = object { args, command, env, server_name }

Update schema for Stdio MCP server - all fields optional

args: optional array of string

The arguments to pass to the command

command: optional string

The command to run the MCP server

env: optional map[string]

Environment variables to set

server_name: optional string

The name of the MCP server

UpdateSseMcpServer = object { token, auth_header, auth_token, 3 more }

Update schema for SSE MCP server - all fields optional

token: optional string

The authentication token (internal)

auth_header: optional string

The name of the authentication header (e.g., 'Authorization')

auth_token: optional string

The authentication token or API key value

custom_headers: optional map[string]

Custom headers to send with requests

server_name: optional string

The name of the MCP server

server_url: optional string

The URL of the SSE MCP server

UpdateStreamableHTTPMcpServer = object { token, auth_header, auth_token, 3 more }

Update schema for Streamable HTTP MCP server - all fields optional

token: optional string

The authentication token (internal)

auth_header: optional string

The name of the authentication header (e.g., 'Authorization')

auth_token: optional string

The authentication token or API key value

custom_headers: optional map[string]

Custom headers to send with requests

server_name: optional string

The name of the MCP server

server_url: optional string

The URL of the Streamable HTTP MCP server

ReturnsExpand Collapse
StdioMcpServer = object { args, command, server_name, 3 more }

A Stdio MCP server

args: array of string

The arguments to pass to the command

command: string

The command to run (MCP 'local' client will run this command)

server_name: string

The name of the server

id: optional string

The human-friendly ID of the Mcp_server

env: optional map[string]

Environment variables to set

type: optional "sse" or "stdio" or "streamable_http"
Accepts one of the following:
"sse"
"stdio"
"streamable_http"
SseMcpServer = object { server_name, server_url, id, 4 more }

An SSE MCP server

server_name: string

The name of the server

server_url: string

The URL of the server

id: optional string

The human-friendly ID of the Mcp_server

auth_header: optional string

The name of the authentication header (e.g., 'Authorization')

auth_token: optional string

The authentication token or API key value

custom_headers: optional map[string]

Custom HTTP headers to include with requests

type: optional "sse" or "stdio" or "streamable_http"
Accepts one of the following:
"sse"
"stdio"
"streamable_http"
StreamableHTTPMcpServer = object { server_name, server_url, id, 4 more }

A Streamable HTTP MCP server

server_name: string

The name of the server

server_url: string

The URL of the server

id: optional string

The human-friendly ID of the Mcp_server

auth_header: optional string

The name of the authentication header (e.g., 'Authorization')

auth_token: optional string

The authentication token or API key value

custom_headers: optional map[string]

Custom HTTP headers to include with requests

type: optional "sse" or "stdio" or "streamable_http"
Accepts one of the following:
"sse"
"stdio"
"streamable_http"
Update Mcp Server
curl https://api.letta.com/v1/mcp-servers/$MCP_SERVER_ID \
    -X PATCH \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $LETTA_API_KEY" \
    -d '{}'
{
  "args": [
    "string"
  ],
  "command": "command",
  "server_name": "server_name",
  "id": "mcp_server-123e4567-e89b-12d3-a456-426614174000",
  "env": {
    "foo": "string"
  },
  "type": "sse"
}
Returns Examples
{
  "args": [
    "string"
  ],
  "command": "command",
  "server_name": "server_name",
  "id": "mcp_server-123e4567-e89b-12d3-a456-426614174000",
  "env": {
    "foo": "string"
  },
  "type": "sse"
}