{"question":"How do I connect P0 to the OpenAI Responses API as a remote MCP server?","answer":"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.","url":"https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/answers/mcp-openai-responses","data_as_of":"2026-10-25","facts":[{"label":"P0 MCP endpoint","value":"https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp","text":"https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp"},{"label":"Transport","value":"streamable-http","text":"Streamable HTTP, JSON-RPC 2.0"},{"label":"Authentication","value":"none required","text":"None required; an optional prepaid access key is accepted as Authorization: Bearer p0k_… (see the notes)"},{"label":"Free tools worth allowing","value":"search_x402_services, x402_market_stats, list_paid_data_products","text":"search_x402_services, x402_market_stats, list_paid_data_products"}],"tables":[{"title":"Steps in OpenAI Responses API","columns":["Step","What to do"],"rows":[{"step":"1","what":"Put a tool of type mcp in the tools array of a Responses API request (POST https://api.openai.com/v1/responses)."},{"step":"2","what":"Set server_label (a name you choose) and server_url to the P0 endpoint; server_description is optional."},{"step":"3","what":"Optional: allowed_tools limits which of the server's tools the model sees, which keeps the request small."},{"step":"4","what":"No 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."}]},{"title":"What works through the connector, and what does not","columns":["Kind","Through the MCP connector"],"rows":[["Free tools","search_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 itself","The request answers HTTP 402 until it is paid. Pay with an x402 client or wallet, or by a direct transfer (below)."]]}],"sources":[{"name":"OpenAI: MCP servers in the Responses API","url":"https://developers.openai.com/api/docs/guides/tools-connectors-mcp","as_of":null,"age_days":null,"stale":false,"note":"Vendor documentation read on 2026-10-25; menu names, limits and plan availability change. P0 is not affiliated with or endorsed by OpenAI."}],"not_loaded":[],"notes":["OpenAI's guide says the Responses API works with remote MCP servers that support the Streamable HTTP or the HTTP/SSE transport; P0's endpoint is Streamable HTTP (POST, JSON-RPC 2.0).","When a request lists a remote server, the API first fetches that server's tool list; allowed_tools names the tools to import instead of all of them.","Without an access key none of P0's MCP tools returns paid data. The connectors described here do not sign x402 payments (the documentation page used for this guide describes no payment support), so the paid call is made outside the connector, or with a prepaid access key (below).","To pay: use an x402-capable client or wallet (runnable JavaScript and Python snippets: https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/integrations), or send the price as a direct stablecoin or coin transfer and claim it with the transaction hash, GET <route>?tx=<hash> (details and addresses: https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/pay). The first call without payment shows the exact price.","Agents that speak A2A with the x402 extension can pay inside the A2A message flow at https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/a2a (the agent card lists the extension).","Access key (optional): an agent that cannot sign x402 buys a prepaid key once with x402 (USD 1, 5 or 20; the $5 key credits $5.25 of calls and the $20 key $22: https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/keys/buy?usd=5) and, where your platform lets you set an Authorization header or token for a remote MCP server, sends it as Authorization: Bearer p0k_…; the data tools then return the data and each call is deducted at its listed price. Balance is free at https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/keys/balance. Unused balance never expires and is not refunded. Where the platform has no such field, use the x402 route above.","The snippets follow the vendor documentation named below; P0 has not run them on a OpenAI Responses API account of its own.","Not legal, financial or security advice; P0 is not affiliated with or endorsed by any of the publishers named here."],"code":[{"title":"curl","text":"curl https://api.openai.com/v1/responses \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -d '{\n    \"model\": \"<a model that supports the mcp tool>\",\n    \"tools\": [{\n      \"type\": \"mcp\",\n      \"server_label\": \"p0\",\n      \"server_description\": \"Live index of the x402 agent economy: search paid x402 APIs, market statistics, P0 paid products.\",\n      \"server_url\": \"https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp\",\n      \"allowed_tools\": [\"search_x402_services\",\"x402_market_stats\",\"list_paid_data_products\"],\n      \"require_approval\": \"never\"\n    }],\n    \"input\": \"Which x402 services offer web search, and what does one call cost?\"\n  }'"},{"title":"JavaScript (openai package)","text":"import OpenAI from \"openai\";\nconst client = new OpenAI();\nconst resp = await client.responses.create({\n  model: \"<a model that supports the mcp tool>\",\n  tools: [{\n    type: \"mcp\",\n    server_label: \"p0\",\n    server_description: \"Live index of the x402 agent economy: search paid x402 APIs, market statistics, P0 paid products.\",\n    server_url: \"https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp\",\n    allowed_tools: [\"search_x402_services\",\"x402_market_stats\",\"list_paid_data_products\"],\n    require_approval: \"never\",\n  }],\n  input: \"Which x402 services offer web search, and what does one call cost?\",\n});\nconsole.log(resp.output_text);"},{"title":"Check the endpoint first (any shell)","text":"curl -s -X POST https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Accept: application/json, text/event-stream\" \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\"}'"}],"full_answer":[{"path":"/keys/buy?usd=5","url":"https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/keys/buy?usd=5","price_usd":null,"what":"buy a prepaid access key with one x402 payment (usd=1, 5 or 20; $5 credits $5.25, $20 credits $22), then send it as Authorization: Bearer"},{"path":"/pay","url":"https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/pay","price_usd":null,"what":"free page: pay without an x402 client, by a direct transfer claimed with the transaction hash"},{"path":"/integrations","url":"https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/integrations","price_usd":null,"what":"free page: runnable snippets that pay and call a route with an x402 client"},{"path":"/x402/test","url":"https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/x402/test","price_usd":0.001,"what":"the cheapest real paid call, to rehearse the payment with your client or wallet"},{"path":"/a2a","url":"https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/a2a","price_usd":null,"what":"A2A endpoint with the x402 extension (GET returns the agent card)"}],"related":["https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/answers/mcp-xai-grok","https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/answers/mcp-mistral-le-chat","https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/answers/pay-api-with-x402"],"license":"https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/terms","operator":"dev Mike","version":"2026-10-25.3"}