Skip to content
Letta Platform Letta Platform Letta Docs
Sign up

Mcp Servers

Create Mcp Server
POST/v1/mcp-servers/
List Mcp Servers
GET/v1/mcp-servers/
Retrieve Mcp Server
GET/v1/mcp-servers/{mcp_server_id}
Delete Mcp Server
DELETE/v1/mcp-servers/{mcp_server_id}
Update Mcp Server
PATCH/v1/mcp-servers/{mcp_server_id}
Refresh Mcp Server Tools
PATCH/v1/mcp-servers/{mcp_server_id}/refresh
ModelsExpand Collapse
CreateSseMcpServer object { server_url, auth_header, auth_token, 2 more }

Create a new SSE MCP server

server_url: string

The URL of the 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

mcp_server_type: optional "sse"
CreateStdioMcpServer object { args, command, env, mcp_server_type }

Create a new 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)

env: optional map[string]

Environment variables to set

mcp_server_type: optional "stdio"
CreateStreamableHTTPMcpServer object { server_url, auth_header, auth_token, 2 more }

Create a new Streamable HTTP MCP server

server_url: string

The URL of the 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

mcp_server_type: optional "streamable_http"
SseMcpServer object { 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: 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

mcp_server_type: optional "sse"
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 MCP server

id: optional string

The human-friendly ID of the Mcp_server

env: optional map[string]

Environment variables to set

mcp_server_type: optional "stdio"
StreamableHTTPMcpServer object { 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: 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

mcp_server_type: optional "streamable_http"
UpdateSseMcpServer object { server_url, auth_header, auth_token, 2 more }

Update schema for SSE MCP server - all fields optional

server_url: string

The URL of the 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

mcp_server_type: optional "sse"
UpdateStdioMcpServer object { args, command, env, mcp_server_type }

Update schema for Stdio MCP server - all fields optional

args: array of string

The arguments to pass to the command

command: string

The command to run (MCP ‘local’ client will run this command)

env: optional map[string]

Environment variables to set

mcp_server_type: optional "stdio"
UpdateStreamableHTTPMcpServer object { server_url, auth_header, auth_token, 2 more }

Update schema for Streamable HTTP MCP server - all fields optional

server_url: string

The URL of the 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

mcp_server_type: optional "streamable_http"
McpServerCreateResponse = StdioMcpServer { args, command, server_name, 3 more } or SseMcpServer { server_name, server_url, id, 4 more } or StreamableHTTPMcpServer { server_name, server_url, id, 4 more }

A Stdio MCP server

One of the following:
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 MCP server

id: optional string

The human-friendly ID of the Mcp_server

env: optional map[string]

Environment variables to set

mcp_server_type: optional "stdio"
SseMcpServer object { 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: 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

mcp_server_type: optional "sse"
StreamableHTTPMcpServer object { 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: 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

mcp_server_type: optional "streamable_http"
McpServerListResponse = array of StdioMcpServer { args, command, server_name, 3 more } or SseMcpServer { server_name, server_url, id, 4 more } or StreamableHTTPMcpServer { server_name, server_url, id, 4 more }
One of the following:
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 MCP server

id: optional string

The human-friendly ID of the Mcp_server

env: optional map[string]

Environment variables to set

mcp_server_type: optional "stdio"
SseMcpServer object { 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: 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

mcp_server_type: optional "sse"
StreamableHTTPMcpServer object { 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: 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

mcp_server_type: optional "streamable_http"
McpServerRetrieveResponse = StdioMcpServer { args, command, server_name, 3 more } or SseMcpServer { server_name, server_url, id, 4 more } or StreamableHTTPMcpServer { server_name, server_url, id, 4 more }

A Stdio MCP server

One of the following:
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 MCP server

id: optional string

The human-friendly ID of the Mcp_server

env: optional map[string]

Environment variables to set

mcp_server_type: optional "stdio"
SseMcpServer object { 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: 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

mcp_server_type: optional "sse"
StreamableHTTPMcpServer object { 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: 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

mcp_server_type: optional "streamable_http"
McpServerUpdateResponse = StdioMcpServer { args, command, server_name, 3 more } or SseMcpServer { server_name, server_url, id, 4 more } or StreamableHTTPMcpServer { server_name, server_url, id, 4 more }

A Stdio MCP server

One of the following:
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 MCP server

id: optional string

The human-friendly ID of the Mcp_server

env: optional map[string]

Environment variables to set

mcp_server_type: optional "stdio"
SseMcpServer object { 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: 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

mcp_server_type: optional "sse"
StreamableHTTPMcpServer object { 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: 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

mcp_server_type: optional "streamable_http"
McpServerRefreshResponse = unknown

Mcp ServersTools

List Tools For Mcp Server
GET/v1/mcp-servers/{mcp_server_id}/tools
Retrieve Mcp Tool
GET/v1/mcp-servers/{mcp_server_id}/tools/{tool_id}
Run Mcp Tool
POST/v1/mcp-servers/{mcp_server_id}/tools/{tool_id}/run
ModelsExpand Collapse
ToolListResponse = array of Tool { id, args_json_schema, created_by_id, 15 more }
id: string

The human-friendly ID of the Tool

args_json_schema: optional map[unknown]

The args JSON schema of the function.

created_by_id: optional string

The id of the user that made this Tool.

default_requires_approval: optional boolean

Default value for whether or not executing this tool requires approval.

description: optional string

The description of the tool.

enable_parallel_execution: optional boolean

If set to True, then this tool will potentially be executed concurrently with other tools. Default False.

json_schema: optional map[unknown]

The JSON schema of the function.

last_updated_by_id: optional string

The id of the user that made this Tool.

metadata_: optional map[unknown]

A dictionary of additional metadata for the tool.

name: optional string

The name of the function.

npm_requirements: optional array of NpmRequirement { name, version }

Optional list of npm packages required by this tool.

name: string

Name of the npm package.

minLength1
version: optional string

Optional version of the package, following semantic versioning.

pip_requirements: optional array of PipRequirement { name, version }

Optional list of pip packages required by this tool.

name: string

Name of the pip package.

minLength1
version: optional string

Optional version of the package, following semantic versioning.

project_id: optional string

The project id of the tool.

return_char_limit: optional number

The maximum number of characters in the response.

maximum1000000
minimum1
source_code: optional string

The source code of the function.

source_type: optional string

The type of the source code.

tags: optional array of string

Metadata tags.

tool_type: optional ToolType

The type of the tool.

One of the following:
"custom"
"letta_core"
"letta_memory_core"
"letta_multi_agent_core"
"letta_sleeptime_core"
"letta_voice_sleeptime_core"
"letta_builtin"
"letta_files_core"
"external_langchain"
"external_composio"
"external_mcp"