create_mcp_integration
Create a Portkey integration for an external MCP server by providing its URL, transport (HTTP/SSE), and authentication type. Supports custom headers or secret references for credential handling.
Instructions
Create a Portkey integration for an external MCP server URL. For headers auth, provide custom_headers or a Secret Reference mapping targeting configurations.custom_headers; secret_mappings resolve protected values at runtime without storing them in the tool call. Organisation admin keys normally need workspace_id. After creation, create_mcp_server and configure capabilities/access; returns the integration id and slug.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL endpoint of the MCP server to integrate | |
| name | Yes | Display name for the MCP integration | |
| slug | No | Custom slug. Auto-generated if omitted | |
| auth_type | Yes | Authentication type: 'none', 'headers' (custom headers), or 'oauth_auto' (OAuth) | |
| transport | Yes | MCP transport protocol: 'http' (streamable HTTP) or 'sse' (server-sent events) | |
| description | No | Description of the MCP integration | |
| workspace_id | No | Workspace ID — required when using organization admin API keys | |
| custom_headers | No | Custom headers for authentication (e.g. { "Authorization": "Bearer xxx" }). Sent via configurations.custom_headers | |
| secret_mappings | No | Runtime Secret Reference mappings; every configurations.<field> target must be unique |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool call succeeded and returned structured data | |
| data | No | Structured success payload when ok is true | |
| error | No | Structured error payload when ok is false |