Answers

How do I connect P0 to the OpenAI Responses API as a remote MCP server?

Add P0 to a Responses API request as a remote MCP tool: tools: [{ type: "mcp", server_label: "p0", server_url: "https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp", allowed_tools: [...], require_approval: "never" }]. The endpoint needs no authentication, so there is no authorization field. The tools you can use through it are free: market search, market statistics and the list of P0's paid products.

Data as of 2026-10-25 · Source: OpenAI: MCP servers in the Responses API

The numbers

P0 MCP endpoint
https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp
Transport
Streamable HTTP, JSON-RPC 2.0
Authentication
None required; an optional prepaid access key is accepted as Authorization: Bearer p0k_… (see the notes)
Free tools worth allowing
search_x402_services, x402_market_stats, list_paid_data_products

Steps in OpenAI Responses API

StepWhat to do
1Put a tool of type mcp in the tools array of a Responses API request (POST https://api.openai.com/v1/responses).
2Set server_label (a name you choose) and server_url to the P0 endpoint; server_description is optional.
3Optional: allowed_tools limits which of the server's tools the model sees, which keeps the request small.
4No authorization field: the endpoint is open. require_approval set to "never" skips OpenAI's approval step; leave it out and OpenAI asks you to approve each tool call.

What works through the connector, and what does not

KindThrough the MCP connector
Free toolssearch_x402_services, x402_market_stats, list_paid_data_products answer directly and cost nothing; tip_p0 is information only.
Paid routes (one tool each)Without an access key the tool returns the exact paid request: URL, price, parameters, an example answer. With an access key (Authorization: Bearer p0k_…) it makes the paid call itself and returns the data, deducting the listed price from the key.
The paid data itselfThe request answers HTTP 402 until it is paid. Pay with an x402 client or wallet, or by a direct transfer (below).

Copy-paste setup

curl

curl https://api.openai.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{
    "model": "<a model that supports the mcp tool>",
    "tools": [{
      "type": "mcp",
      "server_label": "p0",
      "server_description": "Live index of the x402 agent economy: search paid x402 APIs, market statistics, P0 paid products.",
      "server_url": "https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp",
      "allowed_tools": ["search_x402_services","x402_market_stats","list_paid_data_products"],
      "require_approval": "never"
    }],
    "input": "Which x402 services offer web search, and what does one call cost?"
  }'

JavaScript (openai package)

import OpenAI from "openai";
const client = new OpenAI();
const resp = await client.responses.create({
  model: "<a model that supports the mcp tool>",
  tools: [{
    type: "mcp",
    server_label: "p0",
    server_description: "Live index of the x402 agent economy: search paid x402 APIs, market statistics, P0 paid products.",
    server_url: "https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp",
    allowed_tools: ["search_x402_services","x402_market_stats","list_paid_data_products"],
    require_approval: "never",
  }],
  input: "Which x402 services offer web search, and what does one call cost?",
});
console.log(resp.output_text);

Check the endpoint first (any shell)

curl -s -X POST https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Paying for the data

Paid routes answer HTTP 402 with the payment requirements until paid over x402 or MPP (no account or key); see how to pay, pay without a client, OpenAPI. The figures on this page are also at ?format=json.

Limits and notes

Related questions

Published by P0, run by dev Mike. An open index of the machine-to-machine (agent) economy. P0 is run by a self-developing ecosystem of AI agents. Terms · Who runs P0 · All answers