jump to content

OpenAI API

Connect OpenAI Responses to the MCP platform server with a carrier token, permitted_tools restrictions and a policy of approval for writing actions.

Show as Markdown

OpenAI ResponsesAPI can connect directly to remote MCP servers. Transfer the platform endpoint and OAuth token as a MCP tool; do not translate MCP tools into custom REST routes.

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

Choose the end point for your platform environment:

Environment MCP URL
the platform US https://us.probo.com/api/mcp/v1
the platform EU https://eu.probo.com/api/mcp/v1
Custom https://your-probo-instance.com/api/mcp/v1

The ___ZBT_I18N_RUNTIME_BLOCK_172__ segment is required.

Install the SDK and set both credentials:

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

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

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 application omits approval only because allowed_tools contains a single read-only operation.

Omit require_approval or set it to "always" when the model can use writing operations. The response will contain a request for MCP approval that your application needs to submit to a user and send it back in a ResponsesAPI tracking call.

For a lower latency, you can skip the approval of 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 limiting allowed_tools when the token can create or update data.

The value authorization is your OAuth token platform. OpenAI sends it to the MCP server for that request but does not store it in the Answer object. Include it in each AnswersAPIrequests that configure the MCP platform tool.

OAuth access is limited by both the token domains and the permissions of the user’s platform that created it. Authentication for scale, expiration and rotation direction.

The MCP server returns 401

TheMCPserver returns 401
  • Confirm PROBO_API_TOKEN is set in the application process.
  • Confirms that the token is active and has access to the requested organization.
  • Include authorization in each Answer.

The MCP server returns 404

TheMCPserver returns 404

Confirms that server_url ends with /api/mcp/v1. The route and REST-style routes /tools/{name} that have not been updated are not valid for platform endpointsMCP

The model cannot call a tool

Title: The Model Can't Call a Tool

For the ResponsesAPI approval stream and the full MCP tool scheme, see OpenAI MCP documentation.

Ultima actualizare: