Skip to main content

Documentation Index

Fetch the complete documentation index at: https://crushrewards.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

pay.sh is a Solana-Foundation-adjacent registry, CLI, and MCP server for paid APIs. Crush Rewards is listed in the live registry, so any agent already wired to pay.sh can discover and call our endpoints with no extra config — the pay CLI handles the x402 / MPP payment dance and signs from a local wallet.

1. Install the pay CLI

brew install pay
pay --version
The CLI handles HTTP 402 challenges for both protocols pay.sh supports today: MPP and x402. You don’t need to know which protocol Crush speaks (we accept both) — pay detects the challenge and responds.

2. Launch an agent with Pay MCP attached

The recommended flow per pay.sh’s agent quickstart is to wrap your agent with --sandbox so calls go against an ephemeral local wallet during testing:
pay --sandbox claude
# or
pay --sandbox codex
This injects the Pay MCP server and payment-safety instructions into the agent session. The agent can now discover paid providers, inspect their endpoints, and make wallet-approved calls. Drop --sandbox to charge real USDC from your wallet:
pay claude
Sandbox mode uses an ephemeral local wallet — payments are simulated, not real. Use it for end-to-end testing before flipping to production.

3. Have the agent discover and call Crush

Inside the agent session, the typical tool flow is:
search_skills -> get_skill_endpoints -> curl
The agent searches the registry for “crush” or your use case, fetches the exact endpoint URL from get_skill_endpoints, and curls it. The wallet signs the payment automatically.
Always use the endpoint URL returned by get_skill_endpoints rather than constructing one. The registry is the source of truth for which paths Crush exposes.

Manual MCP config

If you don’t want to use the pay --sandbox claude wrapper and prefer to wire pay.sh into your existing agent config, add Pay as an MCP server:
{
  "mcpServers": {
    "pay": {
      "command": "pay",
      "args": ["mcp"]
    }
  }
}
Drop this into ~/.claude/mcp.json, ~/.cursor/mcp.json, ~/.codeium/windsurf/mcp_config.json, or wherever your client reads its MCP config.

What happens behind the scenes

  1. The agent calls search_skills (a Pay MCP tool) and finds Crush Rewards in the live registry.
  2. It calls get_skill_endpoints to get the exact URL for the tool it wants — e.g. best_price.
  3. It issues a curl against that URL.
  4. The Crush API returns 402 Payment Required with the price and recipient addresses.
  5. The pay CLI builds and signs a payment proof using your local wallet.
  6. The retried request returns the paid response.
You don’t manage signing keys directly; pay does. See x402 and MPP for the underlying protocols.

Next steps

pay.sh agent quickstart

The official pay.sh walkthrough for launching Claude or Codex with Pay MCP.

Available tools

The 13 pricing tools Crush exposes that pay.sh can route to.