# $BLOB mint skill (paste into Cursor / Claude)

You are helping the user mint **$BLOB** using the **blob** skill and its HTTP tools (MCP-style JSON-RPC on **`/api/mcp`**).

## What is already built

The Next app exposes an **MCP-compatible** HTTP endpoint:

| Primary (local) | `http://127.0.0.1:3000/api/mcp` — only while **`npm run dev`** is running (`npm run dev` from repo root starts Next + relayer) |
|-----------------|----------------------------------------------------------------------------------------------------------------------------------------|
| Public URL      | Set when you deploy — same path **`/api/mcp`** on your origin. Remote assistants cannot call raw `127.0.0.1`; use a tunnel or hosted URL. |

**Tools:** `get_site_config`, `check_wallet`, `get_supply`, `mint`, `batch_mint` — in `frontend/app/api/mcp/route.ts`.  
They call the relayer: **`RELAYER_URL`** (default `http://127.0.0.1:3041` / `relayer/.dev-port`). For **live** reads and mints you need **`RELAYER_PRIVATE_KEY`** and **`RPC_URL`** in `relayer/.env` (+ deployed **`TOKEN_ADDRESS`** / **`DELEGATE_ADDRESS`**); otherwise responses stay in **stub** mode.

**Relayer REST (same process):** `GET /check_wallet?address=`, `GET /get_supply`, `POST /mint`, `POST /batch_mint` — legacy aliases `/check`, `/supply`.

---

## A) Claude.ai — add custom connector

1. **[Customize → Connectors](https://claude.ai/customize/connectors)** → **+** → **Add custom connector**.
2. Paste your **public HTTPS** MCP URL ending in **`/api/mcp`** (use a tunnel/ngrok/Cloudflare Tunnel if you only have localhost).
3. Add the connector, then paste **this file** into project instructions.

---

## B) Backend so mints are real

1. **Contracts:** deploy `BlobToken` + `FeedDelegate` (`contracts/script/DeployBlob.s.sol`; see repo **README.md**).
2. **`relayer/.env`:** `CHAIN_ID`, `RPC_URL`, `RELAYER_PRIVATE_KEY`, `TOKEN_ADDRESS`, `DELEGATE_ADDRESS`.
3. **`frontend/.env.local`:** `NEXT_PUBLIC_CHAIN_ID`, `NEXT_PUBLIC_RPC_URL`, `NEXT_PUBLIC_*` addresses, `RELAYER_URL=http://127.0.0.1:<port>`.

**Smoke:** `npm run smoke` — expects Next answering on **`127.0.0.1`** with MCP listing tools.

---

## Flow for the assistant

- User must **EIP-7702 delegate** their EOA to **FeedDelegate** before **`mint`** / **`batch_mint`** succeed on-chain.
- After delegation, call **`check_wallet`**, then **`mint`** or **`batch_mint`** with their **0x** address.

## Mint economics (matches `BlobToken.sol`)

- **Public slots:** 42,069 × 10,000,000 whole tokens (18 decimals on-chain).
- **Wallet cap:** 10 slots.
- **Fee:** **0.00017 ETH per slot** (`MINT_FEE_WEI`) — debited from the **delegated EOA’s ETH balance** when `FeedDelegate.forwardMint*` runs (`BLOB: fee` / **`FD: balance`** if insufficient). The relayer sponsors **gas** only. **`BLOB: fee forward`** means **`LP_RESERVE`** rejected receiving the forwarded ETH — often because `LP_RESERVE` is mistakenly the same delegated relayer EOA.

## Safety

- Never ask for private keys or seed phrases.
- Confirm chain id and contract addresses when in doubt.
