Skip to content
Discord

Mcp Servers

Create Mcp Server
client.mcpServers.create(McpServerCreateParams { config, server_name } body, RequestOptionsoptions?): McpServerCreateResponse
POST/v1/mcp-servers/
List Mcp Servers
client.mcpServers.list(RequestOptionsoptions?): McpServerListResponse { , , }
GET/v1/mcp-servers/
Retrieve Mcp Server
client.mcpServers.retrieve(stringmcpServerID, RequestOptionsoptions?): McpServerRetrieveResponse
GET/v1/mcp-servers/{mcp_server_id}
Delete Mcp Server
client.mcpServers.delete(stringmcpServerID, RequestOptionsoptions?): void
DELETE/v1/mcp-servers/{mcp_server_id}
Update Mcp Server
client.mcpServers.update(stringmcpServerID, McpServerUpdateParams { config, server_name } body, RequestOptionsoptions?): McpServerUpdateResponse
PATCH/v1/mcp-servers/{mcp_server_id}
Refresh Mcp Server Tools
client.mcpServers.refresh(stringmcpServerID, McpServerRefreshParams { agent_id } params?, RequestOptionsoptions?): McpServerRefreshResponse
PATCH/v1/mcp-servers/{mcp_server_id}/refresh
ModelsExpand Collapse
CreateSseMcpServer { server_url, auth_header, auth_token, 2 more }

Create a new SSE MCP server

server_url: string

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"
CreateStdioMcpServer { args, command, env, mcp_server_type }

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

env?: Record<string, string> | null

Environment variables to set

mcp_server_type?: "stdio"
CreateStreamableHTTPMcpServer { 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?: 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"
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"
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"
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"
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"
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"
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"
McpServerCreateResponse = 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

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"
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"
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"
McpServerListResponse = Array<StdioMcpServer { args, command, server_name, 3 more } | SseMcpServer { server_name, server_url, id, 4 more } | StreamableHTTPMcpServer { server_name, server_url, id, 4 more } >
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"
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"
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"
McpServerRetrieveResponse = 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

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"
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"
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"
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

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"
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"
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"
McpServerRefreshResponse = unknown

Mcp ServersTools

List Tools For Mcp Server
client.mcpServers.tools.list(stringmcpServerID, RequestOptionsoptions?): ToolListResponse { id, args_json_schema, created_by_id, 15 more }
GET/v1/mcp-servers/{mcp_server_id}/tools
Retrieve Mcp Tool
client.mcpServers.tools.retrieve(stringtoolID, ToolRetrieveParams { mcp_server_id } params, RequestOptionsoptions?): Tool { id, args_json_schema, created_by_id, 15 more }
GET/v1/mcp-servers/{mcp_server_id}/tools/{tool_id}
Run Mcp Tool
client.mcpServers.tools.run(stringtoolID, ToolRunParams { mcp_server_id, args } params, RequestOptionsoptions?): ToolExecutionResult { status, agent_state, func_return, 3 more }
POST/v1/mcp-servers/{mcp_server_id}/tools/{tool_id}/run
ModelsExpand Collapse
ToolListResponse = Array<Tool { id, args_json_schema, created_by_id, 15 more } >
id: string

The human-friendly ID of the Tool

args_json_schema?: Record<string, unknown> | null

The args JSON schema of the function.

created_by_id?: string | null

The id of the user that made this Tool.

default_requires_approval?: boolean | null

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

description?: string | null

The description of the tool.

enable_parallel_execution?: boolean | null

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

json_schema?: Record<string, unknown> | null

The JSON schema of the function.

last_updated_by_id?: string | null

The id of the user that made this Tool.

metadata_?: Record<string, unknown> | null

A dictionary of additional metadata for the tool.

name?: string | null

The name of the function.

npm_requirements?: Array<NpmRequirement { name, version } > | null

Optional list of npm packages required by this tool.

name: string

Name of the npm package.

minLength1
version?: string | null

Optional version of the package, following semantic versioning.

pip_requirements?: Array<PipRequirement { name, version } > | null

Optional list of pip packages required by this tool.

name: string

Name of the pip package.

minLength1
version?: string | null

Optional version of the package, following semantic versioning.

project_id?: string | null

The project id of the tool.

return_char_limit?: number

The maximum number of characters in the response.

maximum1000000
minimum1
source_code?: string | null

The source code of the function.

source_type?: string | null

The type of the source code.

tags?: Array<string>

Metadata tags.

tool_type?: 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"