Magic MCP Token

Before you can connect to an MCP server, you need to create a magic MCP token.

Magic MCP Token object

Attributes

object

String

id

String

The unique identifier of the magic MCP token

status

Enum

The status of the magic MCP server

secret

String

The secret token used for authentication

name

String

The name of the magic MCP server

description

StringNullable

A description of the magic MCP server, if available

groups

Object

The groups associated with the magic MCP token

metadata

Object

Additional metadata related to the magic MCP server

created_at

Date

Timestamp when the magic MCP server was created

updated_at

Date

Timestamp when the magic MCP server was last updated

{
"object": "magic_mcp.token",
"status": "active",
"groups": [
{
"object": "magic_mcp.group",
"status": "active",
"metadata": {}
},
{
"object": "magic_mcp.group",
"status": "active",
"metadata": {}
}
],
"metadata": {}
}

List magic MCP token

List all magic MCP token

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

EnumOptional

status

UnionOptional

magic_mcp_group_id

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

Get magic MCP token

Get the information of a specific magic MCP token

URL Parameters

magic_mcp_token_id

String

The unique identifier for the magic_mcp_token

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

Create magic MCP token

Create a new magic MCP token

Request Body

name

String

The name of the magic MCP token

description

StringOptional

The description of the magic MCP token

metadata

ObjectOptional

The metadata of the magic MCP token

group_ids

Array of StringsOptional

The IDs of the magic MCP groups to associate with the token

POSThttp://api.metorial.com/magic-mcp-tokens
curl -X POST "https://api.metorial.com/magic-mcp-tokens" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"name": "example_name",
"description": "example_description",
"metadata": {},
"group_ids": [
"example_item"
]
}'

Delete magic MCP token

Delete a specific magic MCP token

URL Parameters

magic_mcp_token_id

String

The unique identifier for the magic_mcp_token

DELETEhttp://api.metorial.com/magic-mcp-tokens/:magic_mcp_token_id
curl -X DELETE "https://api.metorial.com/magic-mcp-tokens/mag_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."

Update magic MCP token

Update the information of a specific magic MCP token

URL Parameters

magic_mcp_token_id

String

The unique identifier for the magic_mcp_token

Request Body

name

StringOptional

The name of the magic MCP token

description

StringOptional

The description of the magic MCP token

metadata

ObjectOptional

The metadata of the magic MCP token

PATCHhttp://api.metorial.com/magic-mcp-tokens/:magic_mcp_token_id
curl -X PATCH "https://api.metorial.com/magic-mcp-tokens/mag_Rm4Mnheq2bfEPhBhP7SY" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"name": "example_name",
"description": "example_description",
"metadata": {}
}'

Add magic MCP groups to token

Add magic MCP groups to a specific magic MCP token

URL Parameters

magic_mcp_token_id

String

The unique identifier for the magic_mcp_token

Request Body

magic_mcp_group_ids

Array of Strings

The IDs of the magic MCP groups to add to the token

POSThttp://api.metorial.com/magic-mcp-tokens/:magic_mcp_token_id/add-groups
curl -X POST "https://api.metorial.com/magic-mcp-tokens/mag_Rm4Mnheq2bfEPhBhP7SY/add-groups" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"magic_mcp_group_ids": [
"example_item"
]
}'

Remove magic MCP groups from token

Remove magic MCP groups from a specific magic MCP token

URL Parameters

magic_mcp_token_id

String

The unique identifier for the magic_mcp_token

Request Body

magic_mcp_group_ids

Array of Strings

The IDs of the magic MCP groups to remove from the token

POSThttp://api.metorial.com/magic-mcp-tokens/:magic_mcp_token_id/remove-groups
curl -X POST "https://api.metorial.com/magic-mcp-tokens/mag_Rm4Mnheq2bfEPhBhP7SY/remove-groups" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"magic_mcp_group_ids": [
"example_item"
]
}'