jump to content

OpenAI API

Connect the OpenAI Responses API to the the platform MCP server with a bearer token, allowed_tools restrictions, and an approval policy for write actions.

View as Markdown

The OpenAI Responses API can connect directly to remote MCP servers. Pass the the platform endpoint and OAuth token as an MCP tool; do not translate MCP tools into custom REST routes.

  • An OpenAI API key
  • Access to a the platform instance
  • A scoped the platform OAuth token
  • A recent version of the OpenAI Python or JavaScript SDK

Choose the endpoint for your the platform environment:

EnvironmentMCP URL
the platform UShttps://us.probo.com/api/mcp/v1
the platform EUhttps://eu.probo.com/api/mcp/v1
Customhttps://your-probo-instance.com/api/mcp/v1

The /v1 segment is required.

Install the SDK and set both credentials:

pip install --upgrade openai
export OPENAI_API_KEY="your_openai_api_key"
export PROBO_API_TOKEN="your_probo_api_token"

Call a read-only the platform tool through the Responses API:

import os
from openai import OpenAI

client = OpenAI()

response = client.responses.create(
    model="gpt-5.6",
    input="List the Probo organizations I can access.",
    tools=[
        {
            "type": "mcp",
            "server_label": "probo",
            "server_description": "Probo compliance management",
            "server_url": "https://us.probo.com/api/mcp/v1",
            "authorization": os.environ["PROBO_API_TOKEN"],
            "allowed_tools": ["listOrganizations"],
            "require_approval": "never",
        }
    ],
)

print(response.output_text)

This request skips approval only because allowed_tools contains one read-only operation.

Omit require_approval or set it to "always" when the model can use write operations. The response will contain an MCP approval request that your application must present to a user and send back in a follow-up Responses API call.

For lower latency, you can skip approval for an explicit set of read-only tools:

{
  "allowed_tools": ["listOrganizations", "listRisks", "getRisk"],
  "require_approval": {
    "never": {
      "tool_names": ["listOrganizations", "listRisks", "getRisk"]
    }
  }
}

Do not use "require_approval": "never" without also restricting allowed_tools when the token can create or update data.

The authorization value is your the platform OAuth token. OpenAI sends it to the MCP server for that request but does not store it in the Response object. Include it in every Responses API request that configures the the platform MCP tool.

OAuth access is limited by both the token’s scopes and the the platform permissions of the user who created it. See Authentication for scope, expiration, and rotation guidance.

  • Confirm PROBO_API_TOKEN is set in the application process.
  • Confirm the token is active and has access to the requested organization.
  • Include authorization in every Responses API request.

Confirm that server_url ends in /api/mcp/v1. The unversioned /api/mcp route and REST-style /tools/{name} routes are not valid the platform MCP endpoints.

For the Responses API approval flow and complete MCP tool schema, see the OpenAI MCP documentation.

Ultima actualizare: