Session Connection
Each time a new MCP connection to a server is established, a session connection is created. This allows you to track and manage the connections made during a session.
Session Connection object
Attributes
object
Objectid
StringThe unique identifier for the session connection
status
EnumCurrent status of the session connection
mcp
ObjectMCP connection details for this session
usage
ObjectUsage statistics for this session
server
Objectsession
Objectserver_deployment
Objectcreated_at
DateTimestamp when the session connection was created
started_at
DateTimestamp when the session connection started
ended_at
DateTimestamp when the session connection ended, or null if still active
{"object": "session.session_connection","id": "example_id","status": "active","mcp": {"object": "mcp","version": "example_version","connection_type": "sse","client": {"object": "session.session_connection.client","name": "example_name","version": "example_version","capabilities": {}},"server": {"object": "session.session_connection.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-08-12T09:45:16.151Z","updated_at": "2025-08-12T09:45:16.151Z"},"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-08-12T09:45:16.151Z","updated_at": "2025-08-12T09:45:16.151Z"},"server_deployment": {"object": "server.server_deployment#preview","id": "example_id","name": "example_name","description": "example_description","metadata": {},"created_at": "2025-08-12T09:45:16.151Z","updated_at": "2025-08-12T09:45:16.151Z","server": {"object": "server#preview","id": "example_id","name": "example_name","description": "example_description","type": "public","created_at": "2025-08-12T09:45:16.151Z","updated_at": "2025-08-12T09:45:16.151Z"}},"created_at": "2025-08-12T09:45:16.151Z","started_at": "2025-08-12T09:45:16.151Z","ended_at": "2025-08-12T09:45:16.151Z"}
List session connections
List all session connections
URL Parameters
sessionId
StringThe unique identifier for the session
curl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/connections" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..."
Get session connection
Get the information of a specific session connection
URL Parameters
sessionId
StringThe unique identifier for the session
sessionConnectionId
StringThe unique identifier for the sessionConnection
curl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/connections/ses_Rm4Mnheq2bfEPhBhP7SY" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..."