Docs

Quickstart

Install the CLI, get a key, and your agent can pay any x402, MPP, AP2 or ACP endpoint with one call. The router picks the chain, stablecoin and facilitator; your code never changes when a rail does.

1. Install

npm i -g superstables
superstables init        # creates a workspace and a key

2. Pay

Pass a URL and a cap. The router reads the endpoint's 402 challenge, MPP session or AP2 mandate, quotes the live facilitators and settles the cheapest one from your agent's wallet.

import { pay } from "superstables";

const res = await pay.route("https://api.example.com/v1/prices", {
  max: "0.05 USDC",
});
// res.receipt   -> { id, protocol, chain, stable, amount, fee, ms }
// res.body      -> the data you paid for

3. Earn

import { earn } from "superstables";

app.get("/v1/forecast", earn.accept({ price: "0.01 USDC" }), handler);
// payable over x402, MPP, AP2 and ACP; listed in the discovery index

4. Set a policy

Caps and allow lists are enforced by the agent's smart-contract wallet, so a prompt injection cannot spend past them. Edit them in the dashboard or commit a policy file.

# superstables.policy.yaml
caps:
  per_call: 0.05 USDC
  session:  2.00 USDC
  daily:    25.00 USDC
allow: [api.example.com, "*.nosana.io"]
approve_above: 10.00 USDC
kill_switch: off

5. Use it from Claude, Codex or Gemini

Add the MCP server and the agent gets find, pay and receipts as tools.

{
  "mcpServers": {
    "superstables": {
      "command": "npx",
      "args": ["-y", "superstables", "mcp"],
      "env": { "SUPERSTABLES_KEY": "ss_live_..." }
    }
  }
}

Ready to try it? Get early access.