Session Connections

Session connections represent the MCP connections established within a session. This read-only resource provides visibility into the connection state and capabilities.

Session Connections object

Attributes

object

String

String representing the object's type

id

String

Unique session connection identifier

status

StringNullable

Connection status

connection_state

StringNullable

Connection state

mcp

Object

MCP connection details

metadata

ObjectNullable

Custom key-value pairs

session_id

String

Parent session ID

session_provider_id

StringNullable

Session provider ID

started_at

DateNullable

Timestamp when connection started

ended_at

DateNullable

Timestamp when connection ended

created_at

Date

Timestamp when created

updated_at

Date

Timestamp when last updated

{
"object": "session.connection",
"id": "scn_8hJkLmNpQrStUvWx",
"status": "active",
"connection_state": "connected",
"mcp": {
"object": "session.connection.mcp",
"version": "2024-11-05",
"connection_type": "sse",
"client": {
"object": "session.connection.client",
"name": "Claude Desktop",
"version": "1.2.3",
"capabilities": {}
},
"server": {
"object": "session.connection.server",
"name": "GitHub MCP",
"version": "0.1.0",
"capabilities": {}
}
},
"metadata": {
"client_id": "abc123"
},
"session_id": "ses_4dEfGhJkLmNpQrSt",
"session_provider_id": "spr_3cDeFgHjKlMnPqRs",
"started_at": "2025-09-15T10:30:00.000Z",
"ended_at": "2025-09-15T11:30:00.000Z",
"created_at": "2025-09-15T10:30:00.000Z",
"updated_at": "2026-01-10T14:45:00.000Z"
}

List session connections

Returns a paginated list of connections for a session.

URL Parameters

session_id

String

The unique identifier for the session

Query Parameters

limit

NumberOptional

Maximum number of items to return (1-100)

after

StringOptional

Return items after this ID

before

StringOptional

Return items before this ID

cursor

StringOptional

Pagination cursor from a previous response

order

EnumOptional

Sort order for results

status

StringOptional

Filter by connection status

connection_state

StringOptional

Filter by connection state

session_provider_id

UnionOptional

Filter by session provider ID(s)

GEThttp://api.metorial.com/sessions/:session_id/connections
curl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/connections" \
-H "Authorization: Bearer metorial_sk_..."

Get session connection

Retrieves a specific connection from a session.

URL Parameters

session_id

String

The unique identifier for the session

session_connection_id

String

The unique identifier for the session_connection

GEThttp://api.metorial.com/sessions/:session_id/connections/:session_connection_id
curl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/connections/ses_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."