Skip to Content
🚀 {xpay✦} is building the future of x402 payments - Join the developer beta →

API / cURL

Call xpay✦ Tools directly via HTTP using the MCP JSON-RPC protocol.

Prerequisites

List Available Tools

curl -X POST "https://mcp.xpay.sh/mcp?key=YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'

Call a Tool

curl -X POST "https://firecrawl.mcp.xpay.sh/mcp?key=YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "tools/call", "id": 2, "params": { "name": "firecrawl_scrape", "arguments": { "url": "https://example.com" } } }'

Using the Master Server

With the master server, use the meta-tools:

Discover tools

curl -X POST "https://mcp.xpay.sh/mcp?key=YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": { "name": "xpay_discover", "arguments": { "query": "web scraping" } } }'

Check balance

curl -X POST "https://mcp.xpay.sh/mcp?key=YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": { "name": "xpay_balance", "arguments": {} } }'

The API uses the MCP JSON-RPC protocol . All requests are POST with Content-Type: application/json.

Response Format

Successful tool calls return:

{ "jsonrpc": "2.0", "id": 2, "result": { "content": [ { "type": "text", "text": "...tool output...\n\nCost: $0.01 | Balance: $4.99 | xpay✦" } ] } }
Last updated on: