# Integrate SQLGuard (Cursor / Claude / agents)

**Promise:** No production SQL mutation without a signed PASS certificate.

Canonical: `https://sqlguard.io` · Money truth: `GET /v1/money`

- **Cursor-only paste:** [/CURSOR.md](https://sqlguard.io/CURSOR.md)
- **Claude MCP paste:** [/CLAUDE.md](https://sqlguard.io/CLAUDE.md)

## Primary buy — Session ($0.50 / 5 slots)

Paste into Cursor / Claude / your agent:

```
POST https://sqlguard.io/v1/session
Header: Content-Type: application/json
Header: X-SQLGuard-Agent: <YOUR_0x_WALLET>
Body: {"agent_id":"<YOUR_0x_WALLET>"}
```

1. Expect **HTTP 402** → settle Exact USDC on Base (`eip155:8453`) to  
   `0xC8d524703f1751b565a220087D1d4c44a413C1D7` (**$0.50**)
2. Retry → receive `session_token` (5 slots / TTL)
3. Burn a slot:

```
POST https://sqlguard.io/v1/session/cert
Header: X-SQLGuard-Agent: <YOUR_0x_WALLET>
Header: X-SQLGuard-Session: <session_token>
Body: {"schema_ddl":"<CREATE TABLE …>","sql":"<exact mutating SQL>","agent_id":"<YOUR_0x_WALLET>"}
```

4. `POST /v1/verify` with `certificate` + `signature` → only if `ok:true` execute on production

MCP: `sqlguard_session` then burn path via cert/session tools · Handshake: `GET /handshake?need=session`

## Claude Desktop / MCP

Add to Claude Desktop MCP config (or any MCP client):

```json
{
  "mcpServers": {
    "sqlguard": {
      "url": "https://sqlguard.io/mcp"
    }
  }
}
```

Then: `sqlguard_handshake` with `{ "need": "session" }` → `sqlguard_session` → settle Exact $0.50 → burn via session cert path → `sqlguard_verify`.

## First taste — Instant Cert ($0.05)

One write only? `POST /v1/cert` with schema + sql → Exact **$0.05** → verify → execute.

## Humans

Open https://sqlguard.io/buy#session → Pay Session.

## Do not

- Treat lint / probe / GATE as authorization
- Skip `/v1/verify`
- Count operator wallets as GTM — only `GET /v1/money` → `sales.gtm`
