AlphaBotPro MCP + x402 Example
A minimal, runnable example showing an AI agent discovering, paying for, and unlocking live trading data over MCP using the x402 machine-payment pattern — no human, no dashboard, no checkout form.
This talks to the real, live AlphaBotPro MCP server. Nothing here is a mock.
What it demonstrates
initialize— standard MCP JSON-RPC handshaketools/list— discover the available toolsget_catalog— a public tool: prices and sample payloads, no authget_signalswithout a key — a clean, structuredpayment_requirederror (the x402 pattern) instead of a silent failurepurchase_access— request a crypto invoice (USDT/USDC on TRON, Polygon or Base) for a paid tiercheck_payment— poll until the invoice settles, then receive a scoped API keyget_signalsagain, now authenticated
Run it
node example.mjs
No dependencies, no API key required to run steps 1–5 (only step 6/7 need a
real payment to complete — the script prints the payment instructions and
exits there unless you pass --pay, which is left as a manual step since it
requires a funded wallet).
Server details
- MCP endpoint:
https://mcp.alphabotpro.cloud/v1/mcp(JSON-RPC 2.0 over HTTPS, stateless) - Manifest:
.well-known/mcp/server-card.json - Plugin manifest:
.well-known/ai-plugin.json - REST + OpenAPI:
openapi.json· docs - Pricing/catalog (human-readable): https://alphabotpro.cloud/api-mcp
Why this exists
Most "AI-ready" APIs still assume a human signs up, enters a card number, and pastes a key into a config file. That breaks the moment the buyer is an autonomous agent. This server lets an agent discover the price, pay in stablecoins, and start pulling data — all inside one continuous session.
Full write-up: https://alphabotpro.cloud/blog/post/how-ai-agents-pay-for-data-with-crypto-x402-mcp-example
Disclaimer
Trading signals returned by this API are informational tools, not financial advice, and not a guarantee of profit. Trading carries risk of loss. AlphaBotPro is not affiliated with the Model Context Protocol project or the x402 project — this repo is an independent example of using both.
License
MIT — see LICENSE.