Portkey’s AI gateway has MCP server support that many foundational model providers offer.
Example Log for the request on Portkey
Authorization
header. This is what passing this header looks like:
Use Stripe MCP tool
headers
object. These values will also not be visible in the Response object created. Additionally, because some remote MCP servers generate authenticated URLs, we also discard the path portion of the server_url
in our responses (i.e. example.com/mcp
becomes example.com
). Because of this, you must send the full path of the MCP server_url
and any relevant headers
in every Responses API creation request you make.
"anthropic-beta": "mcp-client-2025-04-04"
mcp_servers
parameter in your Messages API request:
mcp_servers
array supports the following configuration:
Property | Type | Required | Description |
---|---|---|---|
type | string | Yes | Currently only “url” is supported |
url | string | Yes | The URL of the MCP server. Must start with https:// |
name | string | Yes | A unique identifier for this MCP server. It will be used in mcp_tool_call blocks to identify the server and to disambiguate tools to the model. |
tool_configuration | object | No | Configure tool usage |
tool_configuration.enabled | boolean | No | Whether to enable tools from this server (default: true) |
tool_configuration.allowed_tools | array | No | List to restrict the tools to allow (by default, all tools are allowed) |
authorization_token | string | No | OAuth authorization token if required by the MCP server. See MCP specification. |
authorization_token
parameter in the MCP server definition.
API consumers are expected to handle the OAuth flow and obtain the access token prior to making the API call, as well as refreshing the token as needed.
access_token
value.
authorization_token
field in your MCP server configuration.