# Five-minute MCP walkthrough

> Inspect a Canvas64 cell and understand unsigned purchase preparation without connecting a wallet or spending funds.

Read the wall, inspect a cell and check the rules without an account, wallet connection or API key. The examples below do not sign or send transactions. For client setup and the complete tool reference, see [For AI agents and developers](https://canvas64.com/docs/agents).

The wall has 64 cells. Read current availability, `cheapestPriceUsd` and `cheapestCells` from `get_wall`. When `free` is zero, buying continues through buyouts of occupied cells. Neither availability nor a quoted price is reserved.

## 1. Connect and discover

Endpoint: `https://canvas64.com/api/mcp`. Use an MCP client with Streamable HTTP support. For direct HTTP requests, POST JSON with `Content-Type: application/json` and `Accept: application/json, text/event-stream`. Send each example as a separate request, not a JSON batch. A normal MCP client handles initialization and notifications for you.

```json
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"canvas64-readonly-demo","version":"1.0"}}}
```

Use the returned `protocolVersion` in the `MCP-Protocol-Version` HTTP header on every subsequent request. Complete initialization with this notification, which has no request ID:

```json
{"jsonrpc":"2.0","method":"notifications/initialized"}
```

Discover the five tools:

```json
{"jsonrpc":"2.0","id":2,"method":"tools/list"}
```

Check the returned protocol version and stop on errors rather than assuming a successful connection.

## 2. Read the wall and choose a cell

```json
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"get_wall","arguments":{"filter":"all"}}}
```

Compare current buying prices and owners. Choose a cell from this response and replace `D4` below with that returned address. `D4` is an example, not a recommendation or reservation.

```json
{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"get_cell","arguments":{"cell":"D4"}}}
```

Read `result.structuredContent`. Stop if the response has a JSON-RPC error or `result.isError`. Distinguish the previous purchase price from the price to buy now. A portrait or displayed name does not establish that person's wallet ownership or entitlement to sale proceeds.

## 3. Read the rules and price model

```json
{"jsonrpc":"2.0","id":5,"method":"tools/call","params":{"name":"get_rules","arguments":{}}}
```

The `quote` tool explains a purchase step; it does not reserve a cell or replace its live contract quote. For example, the following asks about step 2 of the model. Before considering a real purchase, use the chosen cell's current step plus one rather than assuming step 2 still applies.

```json
{"jsonrpc":"2.0","id":6,"method":"tools/call","params":{"name":"quote","arguments":{"step":2}}}
```

You have completed the read-only walkthrough. No money moved and no wallet was connected.

## Optional: inspect unsigned purchase preparation

`prepare_buy` reads the current contract state and returns unsigned calls; Canvas64 does not sign or broadcast them. This example still sends no transaction:

```json
{"jsonrpc":"2.0","id":7,"method":"tools/call","params":{"name":"prepare_buy","arguments":{"cell":"D4"}}}
```

Without `wallet`, balance and gas checks have not run. Optional `wallet` accepts the actual paying address for USDC balance and allowance checks. Obtain the person's agreement before sharing their public address with a service. `ready` is a preparation result, not spending consent, a successful purchase or a guarantee that the quoted state will remain unchanged. Positive ETH balance is not a gas estimate.

A real buyer needs their own USDC on Base and ETH for gas. Review the actual payer, chain, contract, cell, price, allowances and calls before separate authorization. The calls may include an exact-price USDC approval followed by the purchase; an adequate existing allowance can remove the approval. The wallet sends authorized calls in order, confirming any approval before sending the purchase.

For the current profile-signing flow, qualify an EOA that can both pay onchain and sign EIP-191/`personal_sign` messages from that same owning address. A controlling signer behind a different smart-account owner does not establish profile compatibility. Confirm purchase and profile editing as separate outcomes. Never provide a private key, recovery phrase or reusable session signature to a demonstration.

## Verification checklist for an authorized purchase

| Observation | Required interpretation or next check |
|---|---|
| USDC approval succeeded | This permits spending; it is not a cell purchase. |
| A transaction hash was returned | Track its receipt; the hash alone does not prove success. |
| Purchase receipt succeeded | Verify a matching `Bought` event from the correct contract: cell, actual buyer, step and price. |
| Purchase is pending or its outcome is uncertain | Reconcile the existing hash and wallet nonce. Do not automatically repeat the purchase. |
| Cell advanced or a wrong-step error occurred | Read and prepare again; obtain fresh consent if price or transaction terms change. Gas may be spent and an approval may remain. |
| Another buyer purchased the cell afterward | The earlier matching successful receipt/event still proves the earlier purchase; current ownership alone cannot disprove it. |
| Owning wallet is confirmed | Verify that wallet's profile signature and intended cell update separately; a purchase does not prove profile compatibility. |

Independent audit planned; not yet completed. Later buyouts and royalties depend on subsequent purchases. Read the [risks](https://canvas64.com/docs/risks), [terms](https://canvas64.com/docs/terms), [rules](https://canvas64.com/rules) and [audit status](https://canvas64.com/docs/trust-and-safety#audit-status) before authorizing funds.
