Skip to content
Sign up

Mcp Servers

Create Mcp Server
mcp_servers.create(McpServerCreateParams**kwargs) -> McpServerCreateResponse
POST/v1/mcp-servers/
List Mcp Servers
mcp_servers.list() -> McpServerListResponse
GET/v1/mcp-servers/
Retrieve Mcp Server
mcp_servers.retrieve(strmcp_server_id) -> McpServerRetrieveResponse
GET/v1/mcp-servers/{mcp_server_id}
Delete Mcp Server
mcp_servers.delete(strmcp_server_id)
DELETE/v1/mcp-servers/{mcp_server_id}
Update Mcp Server
mcp_servers.update(strmcp_server_id, McpServerUpdateParams**kwargs) -> McpServerUpdateResponse
PATCH/v1/mcp-servers/{mcp_server_id}
Refresh Mcp Server Tools
mcp_servers.refresh(strmcp_server_id, McpServerRefreshParams**kwargs) -> object
PATCH/v1/mcp-servers/{mcp_server_id}/refresh
ModelsExpand Collapse
class CreateSseMcpServer:

Create a new SSE MCP server

server_url: str

The URL of the server

auth_header: Optional[str]

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

auth_token: Optional[str]

The authentication token or API key value

custom_headers: Optional[Dict[str, str]]

Custom HTTP headers to include with requests

mcp_server_type: Optional[Literal["sse"]]
class CreateStdioMcpServer:

Create a new Stdio MCP server

args: List[str]

The arguments to pass to the command

command: str

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

env: Optional[Dict[str, str]]

Environment variables to set

mcp_server_type: Optional[Literal["stdio"]]
class CreateStreamableHTTPMcpServer:

Create a new Streamable HTTP MCP server

server_url: str

The URL of the server

auth_header: Optional[str]

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

auth_token: Optional[str]

The authentication token or API key value

custom_headers: Optional[Dict[str, str]]

Custom HTTP headers to include with requests

mcp_server_type: Optional[Literal["streamable_http"]]
class SseMcpServer:

An SSE MCP server

server_name: str

The name of the MCP server

server_url: str

The URL of the server

id: Optional[str]

The human-friendly ID of the Mcp_server

auth_header: Optional[str]

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

auth_token: Optional[str]

The authentication token or API key value

custom_headers: Optional[Dict[str, str]]

Custom HTTP headers to include with requests

mcp_server_type: Optional[Literal["sse"]]
class StdioMcpServer:

A Stdio MCP server

args: List[str]

The arguments to pass to the command

command: str

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

server_name: str

The name of the MCP server

id: Optional[str]

The human-friendly ID of the Mcp_server

env: Optional[Dict[str, str]]

Environment variables to set

mcp_server_type: Optional[Literal["stdio"]]
class StreamableHTTPMcpServer:

A Streamable HTTP MCP server

server_name: str

The name of the MCP server

server_url: str

The URL of the server

id: Optional[str]

The human-friendly ID of the Mcp_server

auth_header: Optional[str]

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

auth_token: Optional[str]

The authentication token or API key value

custom_headers: Optional[Dict[str, str]]

Custom HTTP headers to include with requests

mcp_server_type: Optional[Literal["streamable_http"]]
class UpdateSseMcpServer:

Update schema for SSE MCP server - all fields optional

server_url: Optional[str]

The URL of the server

auth_header: Optional[str]

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

auth_token: Optional[str]

The authentication token or API key value

custom_headers: Optional[Dict[str, str]]

Custom HTTP headers to include with requests

mcp_server_type: Optional[Literal["sse"]]
class UpdateStdioMcpServer:

Update schema for Stdio MCP server - all fields optional

args: Optional[List[str]]

The arguments to pass to the command

command: Optional[str]

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

env: Optional[Dict[str, str]]

Environment variables to set

mcp_server_type: Optional[Literal["stdio"]]
class UpdateStreamableHTTPMcpServer:

Update schema for Streamable HTTP MCP server - all fields optional

server_url: Optional[str]

The URL of the server

auth_header: Optional[str]

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

auth_token: Optional[str]

The authentication token or API key value

custom_headers: Optional[Dict[str, str]]

Custom HTTP headers to include with requests

mcp_server_type: Optional[Literal["streamable_http"]]

A Stdio MCP server

One of the following:
class StdioMcpServer:

A Stdio MCP server

args: List[str]

The arguments to pass to the command

command: str

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

server_name: str

The name of the MCP server

id: Optional[str]

The human-friendly ID of the Mcp_server

env: Optional[Dict[str, str]]

Environment variables to set

mcp_server_type: Optional[Literal["stdio"]]
class SseMcpServer:

An SSE MCP server

server_name: str

The name of the MCP server

server_url: str

The URL of the server

id: Optional[str]

The human-friendly ID of the Mcp_server

auth_header: Optional[str]

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

auth_token: Optional[str]

The authentication token or API key value

custom_headers: Optional[Dict[str, str]]

Custom HTTP headers to include with requests

mcp_server_type: Optional[Literal["sse"]]
class StreamableHTTPMcpServer:

A Streamable HTTP MCP server

server_name: str

The name of the MCP server

server_url: str

The URL of the server

id: Optional[str]

The human-friendly ID of the Mcp_server

auth_header: Optional[str]

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

auth_token: Optional[str]

The authentication token or API key value

custom_headers: Optional[Dict[str, str]]

Custom HTTP headers to include with requests

mcp_server_type: Optional[Literal["streamable_http"]]
List[McpServerListResponseItem]
One of the following:
class StdioMcpServer:

A Stdio MCP server

args: List[str]

The arguments to pass to the command

command: str

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

server_name: str

The name of the MCP server

id: Optional[str]

The human-friendly ID of the Mcp_server

env: Optional[Dict[str, str]]

Environment variables to set

mcp_server_type: Optional[Literal["stdio"]]
class SseMcpServer:

An SSE MCP server

server_name: str

The name of the MCP server

server_url: str

The URL of the server

id: Optional[str]

The human-friendly ID of the Mcp_server

auth_header: Optional[str]

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

auth_token: Optional[str]

The authentication token or API key value

custom_headers: Optional[Dict[str, str]]

Custom HTTP headers to include with requests

mcp_server_type: Optional[Literal["sse"]]
class StreamableHTTPMcpServer:

A Streamable HTTP MCP server

server_name: str

The name of the MCP server

server_url: str

The URL of the server

id: Optional[str]

The human-friendly ID of the Mcp_server

auth_header: Optional[str]

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

auth_token: Optional[str]

The authentication token or API key value

custom_headers: Optional[Dict[str, str]]

Custom HTTP headers to include with requests

mcp_server_type: Optional[Literal["streamable_http"]]

A Stdio MCP server

One of the following:
class StdioMcpServer:

A Stdio MCP server

args: List[str]

The arguments to pass to the command

command: str

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

server_name: str

The name of the MCP server

id: Optional[str]

The human-friendly ID of the Mcp_server

env: Optional[Dict[str, str]]

Environment variables to set

mcp_server_type: Optional[Literal["stdio"]]
class SseMcpServer:

An SSE MCP server

server_name: str

The name of the MCP server

server_url: str

The URL of the server

id: Optional[str]

The human-friendly ID of the Mcp_server

auth_header: Optional[str]

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

auth_token: Optional[str]

The authentication token or API key value

custom_headers: Optional[Dict[str, str]]

Custom HTTP headers to include with requests

mcp_server_type: Optional[Literal["sse"]]
class StreamableHTTPMcpServer:

A Streamable HTTP MCP server

server_name: str

The name of the MCP server

server_url: str

The URL of the server

id: Optional[str]

The human-friendly ID of the Mcp_server

auth_header: Optional[str]

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

auth_token: Optional[str]

The authentication token or API key value

custom_headers: Optional[Dict[str, str]]

Custom HTTP headers to include with requests

mcp_server_type: Optional[Literal["streamable_http"]]

A Stdio MCP server

One of the following:
class StdioMcpServer:

A Stdio MCP server

args: List[str]

The arguments to pass to the command

command: str

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

server_name: str

The name of the MCP server

id: Optional[str]

The human-friendly ID of the Mcp_server

env: Optional[Dict[str, str]]

Environment variables to set

mcp_server_type: Optional[Literal["stdio"]]
class SseMcpServer:

An SSE MCP server

server_name: str

The name of the MCP server

server_url: str

The URL of the server

id: Optional[str]

The human-friendly ID of the Mcp_server

auth_header: Optional[str]

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

auth_token: Optional[str]

The authentication token or API key value

custom_headers: Optional[Dict[str, str]]

Custom HTTP headers to include with requests

mcp_server_type: Optional[Literal["sse"]]
class StreamableHTTPMcpServer:

A Streamable HTTP MCP server

server_name: str

The name of the MCP server

server_url: str

The URL of the server

id: Optional[str]

The human-friendly ID of the Mcp_server

auth_header: Optional[str]

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

auth_token: Optional[str]

The authentication token or API key value

custom_headers: Optional[Dict[str, str]]

Custom HTTP headers to include with requests

mcp_server_type: Optional[Literal["streamable_http"]]

Mcp ServersTools

List Tools For Mcp Server
mcp_servers.tools.list(strmcp_server_id) -> ToolListResponse
GET/v1/mcp-servers/{mcp_server_id}/tools
Retrieve Mcp Tool
mcp_servers.tools.retrieve(strtool_id, ToolRetrieveParams**kwargs) -> Tool
GET/v1/mcp-servers/{mcp_server_id}/tools/{tool_id}
Run Mcp Tool
mcp_servers.tools.run(strtool_id, ToolRunParams**kwargs) -> ToolExecutionResult
POST/v1/mcp-servers/{mcp_server_id}/tools/{tool_id}/run
ModelsExpand Collapse
List[Tool]
id: str

The human-friendly ID of the Tool

args_json_schema: Optional[Dict[str, object]]

The args JSON schema of the function.

created_by_id: Optional[str]

The id of the user that made this Tool.

default_requires_approval: Optional[bool]

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

description: Optional[str]

The description of the tool.

enable_parallel_execution: Optional[bool]

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

json_schema: Optional[Dict[str, object]]

The JSON schema of the function.

last_updated_by_id: Optional[str]

The id of the user that made this Tool.

metadata: Optional[Dict[str, object]]

A dictionary of additional metadata for the tool.

name: Optional[str]

The name of the function.

npm_requirements: Optional[List[NpmRequirement]]

Optional list of npm packages required by this tool.

name: str

Name of the npm package.

minLength1
version: Optional[str]

Optional version of the package, following semantic versioning.

pip_requirements: Optional[List[PipRequirement]]

Optional list of pip packages required by this tool.

name: str

Name of the pip package.

minLength1
version: Optional[str]

Optional version of the package, following semantic versioning.

project_id: Optional[str]

The project id of the tool.

return_char_limit: Optional[int]

The maximum number of characters in the response.

maximum1000000
minimum1
source_code: Optional[str]

The source code of the function.

source_type: Optional[str]

The type of the source code.

tags: Optional[List[str]]

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"