Connect to OpenAI API
1 min
In this guide, learn how to connect your MCP toolbox through the OpenAI API.
Prerequisites
To connect to your MCP toolbox through the OpenAI API:
Use the following configuration for your API call:
curl https://api.openai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-4.1",
"input": "List all available tools.",
"tools": [
{
"type": "mcp",
"server_label": "make",
"server_url": "<MCP SERVER URL>/t/<API KEY>"
}
]
}'In server_url, replace the placeholders with your actual values:
- <MCP SERVER URL>: The URL generated when you created the MCP toolbox.
- <API KEY>: The API key generated for the MCP toolbox.
Example configuration:
curl https://api.openai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-4.1",
"input": "List all available tools.",
"tools": [
{
"type": "mcp",
"server_label": "make",
"server_url": "https://eu2.make.com/mcp/server/•••••••••••••/t/•••••••••••••"
}
]
}'You've now connected your MCP toolbox through the OpenAI API.
MCP toolbox timeout: Your MCP toolbox scenarios must finish running within 40 seconds. If a scenario runs longer, the connection times out and no outputs are returned to the client.