curl --request POST \
--url https://api.portkey.ai/v1/mcp-integrations \
--header 'Content-Type: application/json' \
--header 'x-portkey-api-key: <api-key>' \
--data '
{
"name": "My MCP Server",
"url": "https://mcp.example.com/mcp",
"auth_type": "none",
"transport": "http"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>"
}Create MCP Integration
Create a new MCP Integration. Requires either organisation_id (with admin API key) or workspace_id in body.
curl --request POST \
--url https://api.portkey.ai/v1/mcp-integrations \
--header 'Content-Type: application/json' \
--header 'x-portkey-api-key: <api-key>' \
--data '
{
"name": "My MCP Server",
"url": "https://mcp.example.com/mcp",
"auth_type": "none",
"transport": "http"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>"
}Authorizations
Body
Only include optional fields (slug, description, configurations) when you have values for them. The example and code samples show required fields plus workspace_id and organisation_id when scoping.
Display name of the MCP integration
MCP server URL
oauth_auto, headers, none http, sse Organisation ID (optional; required when using org admin API key without workspace_id)
Workspace ID (optional; to create at workspace level)
Optional slug; must be unique within organisation
^[a-zA-Z0-9_-]+$Auth/config key-value pairs (e.g. headers, client credentials)
Show child attributes
Show child attributes
Dynamically resolve secrets from secret references at runtime. Valid target_field values are "configurations." (e.g. "configurations.oauth_metadata"). Each target_field must be unique.
Show child attributes
Show child attributes
Was this page helpful?

