Skip to main content

MCP Servers (bring your own tools)

Primex supports hosted / remote MCP servers through the Responses endpoint. Attach an MCP server to a request and the model can call its tools mid-generation. The whole round-trip runs server-side and is billed as normal tokens, with no per-call surcharge.

Requirements​

MCP tools ride on the Responses API, so they only work on a Responses-passthrough model:

Select a model marked for native Responses support in the live catalogue.

Send an MCP tool to a chat-only model and Primex returns a clean 400 (unsupported_responses_tools) instead of silently dropping it.

Example​

Attach a remote MCP server with a tools entry of type: "mcp":

curl https://gateway.primexos.com/v1/responses \
-H "Authorization: Bearer prx-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"input": "Which language is the modelcontextprotocol/python-sdk written in?",
"tools": [
{
"type": "mcp",
"server_label": "deepwiki",
"server_url": "https://mcp.deepwiki.com/mcp",
"require_approval": "never"
}
]
}'

The response includes the tool discovery (mcp_list_tools), any mcp_call outputs, and the model's final answer, all in Responses (output[]) shape.

Billing​

The MCP tool calls execute at the upstream provider and fold into the request's reported token usage, so your existing prx- token billing captures them. There's no separate charge for using MCP. You pay only for the tokens consumed. As with every request, a failed call costs nothing (see Billing).

Notes​

  • Authenticated MCP servers: pass credentials the way the Responses mcp tool expects (e.g. a headers / authorization field on the tool), per the OpenAI Responses MCP spec.
  • Approvals: set require_approval to "never" for unattended/agent use, or require approval to gate tool calls.
  • This uses the OpenAI Responses mcp tool shape, which is the supported path today. The Anthropic mcp_servers connector (on the Anthropic-compatible endpoint) is not yet verified. reach out if you need it.