Magic MCP Server

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

Magic MCP Server object

Attributes

object

String

id

String

The unique identifier of the magic MCP server

status

Enum

The status of the magic MCP server

endpoints

Object

List of endpoints for accessing the magic MCP server

server_deployments

Object

List of server deployments associated with the magic MCP server

name

String

The name of the magic MCP server

description

StringNullable

A description of the magic MCP server, if available

oauth_configuration

Object

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.server",
"status": "active",
"endpoints": [
{
"urls": {}
},
{
"urls": {}
}
],
"server_deployments": [
{
"object": "server.server_deployment#preview",
"metadata": {},
"server": {
"object": "server#preview",
"type": "public"
}
},
{
"object": "server.server_deployment#preview",
"metadata": {},
"server": {
"object": "server#preview",
"type": "public"
}
}
],
"oauth_configuration": {
"status": "disabled"
},
"metadata": {}
}

List magic MCP server

List all magic MCP server

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

EnumOptional

status

UnionOptional

server_id

UnionOptional

server_variant_id

UnionOptional

server_implementation_id

UnionOptional

session_id

UnionOptional

magic_mcp_group_id

UnionOptional

search

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

Get magic MCP server

Get the information of a specific magic MCP server

URL Parameters

magic_mcp_server_id

String

The unique identifier for the magic_mcp_server

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

Create magic MCP server

Create a new magic MCP server

Request Body

name

StringOptional

description

StringOptional

metadata

ObjectOptional

A key-value map

oauth_config

ObjectOptional

access

ObjectOptional

server_deployment_template_id

StringOptional

default_oauth_session_id

StringOptional

The ID of the default OAuth session to use for server deployments created by this magic MCP server

Provide exactly one of the following:
These 2 fields are mutually exclusive - include only one in your request

config

Object

A key-value map

server_config_vault_id

String
Provide exactly one of the following:
These 4 fields are mutually exclusive - include only one in your request

server_implementation

Object

server_implementation_id

String

server_variant_id

String

server_id

String
POSThttp://api.metorial.com/magic-mcp-servers
curl -X POST "https://api.metorial.com/magic-mcp-servers" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"name": "example_name",
"description": "example_description",
"metadata": {},
"oauth_config": {
"client_id": "example_client_id",
"client_secret": "example_client_secret"
},
"access": {
"ip_allowlist": {
"ip_whitelist": [
"example_item"
],
"ip_blacklist": [
"example_item"
]
}
},
"server_deployment_template_id": "example_server_deployment_template_id",
"default_oauth_session_id": "example_default_oauth_session_id",
"config": {},
"server_implementation": {
"name": "example_name",
"description": "example_description",
"metadata": {},
"get_launch_params": "example_get_launch_params"
}
}'

Delete magic MCP server

Delete a specific magic MCP server

URL Parameters

magic_mcp_server_id

String

The unique identifier for the magic_mcp_server

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

Update magic MCP server

Update the information of a specific magic MCP server

URL Parameters

magic_mcp_server_id

String

The unique identifier for the magic_mcp_server

Request Body

name

StringOptional

The name of the magic MCP server

description

StringOptional

The description of the magic MCP server

metadata

ObjectOptional

The metadata of the magic MCP server

aliases

Array of StringsOptional

default_oauth_session_id

StringOptional

The ID of the default OAuth session to use for server deployments created by this magic MCP server

PATCHhttp://api.metorial.com/magic-mcp-servers/:magic_mcp_server_id
curl -X PATCH "https://api.metorial.com/magic-mcp-servers/mag_Rm4Mnheq2bfEPhBhP7SY" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"name": "example_name",
"description": "example_description",
"metadata": {},
"aliases": [
"example_item"
],
"default_oauth_session_id": "example_default_oauth_session_id"
}'