# Coal - Payments for AI agents

# Coal

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y smithery mcp add coal/coal-payments

# Browse available tools
npx -y smithery tool list coal/coal-payments

# Get full schema for a tool
npx -y smithery tool get coal/coal-payments discover_merchants

# Call a tool
npx -y smithery tool call coal/coal-payments discover_merchants '{}'
```

## Direct MCP Connection

Endpoint: `https://coal-payments--coal.run.tools`

**Optional config:**
- `X-Coal-Agent-Key` (header) — Wallet private key (0x... 64-char hex). Signs payments via EIP-3009. Optional.
- `X-Coal-Api-Key` (header) — Coal API key for create_checkout + query_merchant_memory. Optional.

## Tools (13)

- `discover_merchants` — THE DEFAULT FIRST CALL whenever the user wants to buy, get, fetch, grab, order, purchase, shop for, find, or browse any…
- `search_products` — Search products across all Coal merchants. Filter by name, max price, or tag. Returns a Markdown product grid with imag…
- `get_merchant_profile` — Get the full profile of a Coal merchant including products (with images), paywalls, supported networks/tokens, and 0G S…
- `query_merchant_memory` — Ask a natural language question about a merchant's products, policies, or catalog. Powered by 0G Compute with Sealed In…
- `check_paywall` — Check whether an address has paid for a specific x402 paywall. Returns pricing info if not paid, or content access stat…
- `create_checkout` — Create a Coal checkout session to pay for a product or amount. Settles in USDC on Base (~2s). Returns a checkout URL. N…
- `get_checkout_status` — Check the payment status of a checkout session: pending, verifying, confirmed, expired, failed.
- `verify_receipt` — Verify a payment receipt and see its 3-step proof trail: (1) Base TX, (2) 0G Storage receipt, (3) 0G Chain anchor.
- `get_0g_health` — Check the live status of all 5 0G components: Storage, Chain, Compute, KV, DA.
- `agent_wallet_status` — Check the USDC balance for your agent wallet (or any address). If `X-Coal-Agent-Key` is set in your Claude config heade…
- `pay_merchant` — Send USDC on Base to any merchant payout address (the `payoutAddress` field shown by discover_merchants — NOT the merch…
- `download_product` — Retrieve / download / get the file for a digital product after the user paid for it. Use after `pay_merchant` succeeds …
- `setup_instructions` — Print step-by-step instructions for using Coal MCP from Claude / Cursor / any MCP client. Run this FIRST if you are uns…

```bash
# Get full input/output schema for a tool
npx -y smithery tool get coal/coal-payments <tool-name>
```
