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

Open in Claude
Open in ChatGPT

Get Mcp Server

mcp_servers.retrieve(strmcp_server_id) -> McpServerRetrieveResponse
get/v1/mcp-servers/{mcp_server_id}

Get a specific MCP server

ParametersExpand Collapse
mcp_server_id: str
ReturnsExpand Collapse
McpServerRetrieveResponse = McpServerRetrieveResponse

A Stdio MCP server

Accepts 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 server

id: Optional[str]

The human-friendly ID of the Mcp_server

env: Optional[Dict[str, str]]

Environment variables to set

type: Optional[Literal["sse", "stdio", "streamable_http"]]
Accepts one of the following:
"sse"
"stdio"
"streamable_http"
class SseMcpServer:

An SSE MCP server

server_name: str

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

type: Optional[Literal["sse", "stdio", "streamable_http"]]
Accepts one of the following:
"sse"
"stdio"
"streamable_http"
class StreamableHTTPMcpServer:

A Streamable HTTP MCP server

server_name: str

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

type: Optional[Literal["sse", "stdio", "streamable_http"]]
Accepts one of the following:
"sse"
"stdio"
"streamable_http"
Get Mcp Server
from letta_client import Letta

client = Letta(
    api_key="My API Key",
)
mcp_server = client.mcp_servers.retrieve(
    "mcp_server_id",
)
print(mcp_server)
{
  "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"
}