> ## 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

> Use Syntalic from any agent that has the pay CLI attached.

[pay.sh](https://pay.sh) is a Solana-Foundation-adjacent registry, CLI, and MCP server for paid APIs. Syntalic 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

```bash theme={null}
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 Syntalic 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](https://pay.sh/docs/get-started/agent-quickstart) is to wrap your agent with `--sandbox` so calls go against an ephemeral local wallet during testing:

```bash theme={null}
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:

```bash theme={null}
pay claude
```

<Warning>
  Sandbox mode uses an ephemeral local wallet — payments are simulated, not real. Use it for end-to-end testing before flipping to production.
</Warning>

## 3. Have the agent discover and call Syntalic

Inside the agent session, the typical tool flow is:

```txt theme={null}
search_skills -> get_skill_endpoints -> curl
```

The agent searches the registry for "syntalic" or your use case, fetches the exact endpoint URL from `get_skill_endpoints`, and curls it. The wallet signs the payment automatically.

<Tip>
  Always use the endpoint URL returned by `get_skill_endpoints` rather than constructing one. The registry is the source of truth for which paths Syntalic exposes.
</Tip>

## 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:

```json theme={null}
{
  "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 Syntalic 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 Syntalic 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](/payments/x402) and [MPP](/payments/mpp) for the underlying protocols.

## Next steps

<CardGroup cols={2}>
  <Card title="pay.sh agent quickstart" icon="book" href="https://pay.sh/docs/get-started/agent-quickstart">
    The official pay.sh walkthrough for launching Claude or Codex with Pay MCP.
  </Card>

  <Card title="Available tools" icon="wrench" href="/reference/mcp-tools">
    The 13 pricing tools Syntalic exposes that pay.sh can route to.
  </Card>
</CardGroup>
