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

Open in Claude
Open in ChatGPT

Update Mcp Server

client.mcpServers.update(stringmcpServerID, McpServerUpdateParams { config, server_name } body, RequestOptionsoptions?): McpServerUpdateResponse
patch/v1/mcp-servers/{mcp_server_id}

Update an existing MCP server configuration

ParametersExpand Collapse
mcpServerID: string
body: McpServerUpdateParams { config, server_name }
config: UpdateStdioMcpServer { args, command, env, mcp_server_type } | UpdateSseMcpServer { server_url, auth_header, auth_token, 2 more } | UpdateStreamableHTTPMcpServer { server_url, auth_header, auth_token, 2 more }

The MCP server configuration updates (Stdio, SSE, or Streamable HTTP)

Accepts one of the following:
UpdateStdioMcpServer { args, command, env, mcp_server_type }

Update schema for Stdio MCP server - all fields optional

args: Array<string> | null

The arguments to pass to the command

command: string | null

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

env?: Record<string, string> | null

Environment variables to set

mcp_server_type?: "stdio"
Accepts one of the following:
"stdio"
UpdateSseMcpServer { server_url, auth_header, auth_token, 2 more }

Update schema for SSE MCP server - all fields optional

server_url: string | null

The URL of the server

auth_header?: string | null

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

auth_token?: string | null

The authentication token or API key value

custom_headers?: Record<string, string> | null

Custom HTTP headers to include with requests

mcp_server_type?: "sse"
Accepts one of the following:
"sse"
UpdateStreamableHTTPMcpServer { server_url, auth_header, auth_token, 2 more }

Update schema for Streamable HTTP MCP server - all fields optional

server_url: string | null

The URL of the server

auth_header?: string | null

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

auth_token?: string | null

The authentication token or API key value

custom_headers?: Record<string, string> | null

Custom HTTP headers to include with requests

mcp_server_type?: "streamable_http"
Accepts one of the following:
"streamable_http"
server_name?: string | null

The name of the MCP server

ReturnsExpand Collapse
McpServerUpdateResponse = StdioMcpServer { args, command, server_name, 3 more } | SseMcpServer { server_name, server_url, id, 4 more } | StreamableHTTPMcpServer { server_name, server_url, id, 4 more }

A Stdio MCP server

Accepts one of the following:
StdioMcpServer { args, command, server_name, 3 more }

A Stdio MCP server

args: Array<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 MCP server

id?: string

The human-friendly ID of the Mcp_server

env?: Record<string, string> | null

Environment variables to set

mcp_server_type?: "stdio"
Accepts one of the following:
"stdio"
SseMcpServer { server_name, server_url, id, 4 more }

An SSE MCP server

server_name: string

The name of the MCP server

server_url: string

The URL of the server

id?: string

The human-friendly ID of the Mcp_server

auth_header?: string | null

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

auth_token?: string | null

The authentication token or API key value

custom_headers?: Record<string, string> | null

Custom HTTP headers to include with requests

mcp_server_type?: "sse"
Accepts one of the following:
"sse"
StreamableHTTPMcpServer { server_name, server_url, id, 4 more }

A Streamable HTTP MCP server

server_name: string

The name of the MCP server

server_url: string

The URL of the server

id?: string

The human-friendly ID of the Mcp_server

auth_header?: string | null

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

auth_token?: string | null

The authentication token or API key value

custom_headers?: Record<string, string> | null

Custom HTTP headers to include with requests

mcp_server_type?: "streamable_http"
Accepts one of the following:
"streamable_http"
Update Mcp Server
import Letta from '@letta-ai/letta-client';

const client = new Letta({
  apiKey: 'My API Key',
});

const mcpServer = await client.mcpServers.update('mcp_server_id', {
  config: { args: ['string'], command: 'command', mcp_server_type: 'stdio' },
});

console.log(mcpServer);
{
  "args": [
    "string"
  ],
  "command": "command",
  "server_name": "server_name",
  "id": "mcp_server-123e4567-e89b-12d3-a456-426614174000",
  "env": {
    "foo": "string"
  },
  "mcp_server_type": "stdio"
}
Returns Examples
{
  "args": [
    "string"
  ],
  "command": "command",
  "server_name": "server_name",
  "id": "mcp_server-123e4567-e89b-12d3-a456-426614174000",
  "env": {
    "foo": "string"
  },
  "mcp_server_type": "stdio"
}