Magic MCP Session

Magic MCP sessions are created when a user connects to a magic MCP session using a valid magic MCP token.

Magic MCP Session object

Attributes

object

String

id

String

The unique identifier of the session

session_id

String

The ID of the associated session

connection_status

Enum

The connection state of the session

magic_mcp_server

Object

usage

Object

Usage statistics for the session

client

ObjectNullable

created_at

Date

Timestamp when the session was created

updated_at

Date

Timestamp when the session was last updated

{
"object": "magic_mcp.session",
"connection_status": "connected",
"magic_mcp_server": {
"status": "active",
"metadata": {}
},
"usage": {},
"client": {
"object": "session.client#preview",
"info": {}
}
}

List magic MCP session

List all magic MCP session

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

EnumOptional

magic_mcp_server_id

UnionOptional
GEThttp://api.metorial.com/magic-mcp-sessions
curl -X GET "https://api.metorial.com/magic-mcp-sessions" \
-H "Authorization: Bearer metorial_sk_..."

Get magic MCP session

Get the information of a specific magic MCP session

URL Parameters

magic_mcp_session_id

String

The unique identifier for the magic_mcp_session

GEThttp://api.metorial.com/magic-mcp-sessions/:magic_mcp_session_id
curl -X GET "https://api.metorial.com/magic-mcp-sessions/mag_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."