Server Session
Read and write server session information
Server Session object
Attributes
object
Objectid
StringThe unique identifier for the server session
status
EnumCurrent status of the server session
mcp
ObjectMCP connection details for this session
usage
ObjectUsage statistics for this session
server
Objectsession
Objectserver_deployment
Objectcreated_at
DateTimestamp when the server session was created
{"object": "session.server_session","id": "example_id","status": "active","mcp": {"object": "mcp","version": "example_version","connection_type": "sse","client": {"object": "session.server_session.client","name": "example_name","version": "example_version","capabilities": {}},"server": {"object": "session.server_session.server","name": "example_name","version": "example_version","capabilities": {}}},"usage": {"total_productive_message_count": 0,"total_productive_client_message_count": 0,"total_productive_server_message_count": 0},"server": {"object": "server#preview","id": "example_id","name": "example_name","description": "example_description","type": "public","created_at": "2025-07-20T12:25:39.260Z","updated_at": "2025-07-20T12:25:39.260Z"},"session": {"object": "session#preview","id": "example_id","status": "active","connection_status": "connected","usage": {"total_productive_message_count": 0,"total_productive_client_message_count": 0,"total_productive_server_message_count": 0},"metadata": {},"created_at": "2025-07-20T12:25:39.260Z","updated_at": "2025-07-20T12:25:39.260Z"},"server_deployment": {"object": "server.server_deployment#preview","id": "example_id","name": "example_name","description": "example_description","metadata": {},"created_at": "2025-07-20T12:25:39.260Z","updated_at": "2025-07-20T12:25:39.260Z","server": {"object": "server#preview","id": "example_id","name": "example_name","description": "example_description","type": "public","created_at": "2025-07-20T12:25:39.260Z","updated_at": "2025-07-20T12:25:39.260Z"}},"created_at": "2025-07-20T12:25:39.260Z"}
List server sessions
List all server sessions
URL Parameters
sessionId
StringThe unique identifier for the session
GEThttp://api.metorial.com/sessions/:sessionId/server-sessions
curl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/server-sessions" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..."
Get server session
Get the information of a specific server session
URL Parameters
sessionId
StringThe unique identifier for the session
serverSessionId
StringThe unique identifier for the serverSession
GEThttp://api.metorial.com/sessions/:sessionId/server-sessions/:serverSessionId
curl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/server-sessions/ser_Rm4Mnheq2bfEPhBhP7SY" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..."