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
Stringid
StringThe unique identifier of the magic MCP token
status
EnumThe status of the magic MCP server
secret
StringThe secret token used for authentication
name
StringThe name of the magic MCP server
description
StringNullableA description of the magic MCP server, if available
groups
ObjectThe groups associated with the magic MCP token
metadata
ObjectAdditional metadata related to the magic MCP server
created_at
DateTimestamp when the magic MCP server was created
updated_at
DateTimestamp 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
NumberOptionalafter
StringOptionalbefore
StringOptionalcursor
StringOptionalorder
EnumOptionalstatus
UnionOptionalmagic_mcp_group_id
UnionOptionalcurl -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
StringThe unique identifier for the magic_mcp_token
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
StringThe name of the magic MCP token
description
StringOptionalThe description of the magic MCP token
metadata
ObjectOptionalThe metadata of the magic MCP token
group_ids
Array of StringsOptionalThe IDs of the magic MCP groups to associate with the token
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
StringThe unique identifier for the magic_mcp_token
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
StringThe unique identifier for the magic_mcp_token
Request Body
name
StringOptionalThe name of the magic MCP token
description
StringOptionalThe description of the magic MCP token
metadata
ObjectOptionalThe metadata of the magic MCP token
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
StringThe unique identifier for the magic_mcp_token
Request Body
magic_mcp_group_ids
Array of StringsThe IDs of the magic MCP groups to add to the token
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
StringThe unique identifier for the magic_mcp_token
Request Body
magic_mcp_group_ids
Array of StringsThe IDs of the magic MCP groups to remove from the token
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"]}'