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

Object

id

String

The unique identifier for the session connection

status

Enum

Current status of the session connection

mcp

Object

MCP connection details for this session

usage

Object

Usage statistics for this session

server

Object

session

Object

server_deployment

Object

created_at

Date

Timestamp when the session connection was created

started_at

Date

Timestamp when the session connection started

ended_at

Date

Timestamp 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

String

The unique identifier for the session

GEThttp://api.metorial.com/sessions/:sessionId/connections
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

String

The unique identifier for the session

sessionConnectionId

String

The unique identifier for the sessionConnection

GEThttp://api.metorial.com/sessions/:sessionId/connections/:sessionConnectionId
curl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/connections/ses_Rm4Mnheq2bfEPhBhP7SY" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..."