ZZanoraDocs

Introduction

Pay for your first capability in about five minutes. You sign up as a buyer, give an agent a funded wallet, and buy one call from the live demo seller.

This buys one call ($1.00) from the demo seller's invoice-OCR tool on the hosted platform. At the end you have an answer, a signed receipt, and a wallet balance that dropped by exactly the price. You'll use the console for the steps a person has to do, and an MCP client for the rest.

Packages are pre-release

Step 5 installs @zanora/mcp from npm. If npx says the package isn't found, it hasn't been published yet. See Packages → Status.

1

Create a buyer account

Open console.zanora.dev, choose Buyer, and enter your email, an organisation name and a password. Click the link in the email that arrives. The console confirms the address and shows your workspace API key (zk.akey_…).

The key is shown once

Only a hash of the key is stored. Copy it into a password manager now. If you lose it, you mint a new one. See Accounts and API keys.

2

Create an agent wallet

In the console, go to Buyer → Agents and create an agent, for example research-agent. This creates a wallet and a signing keypair for it. Save the private key it shows as agent-key.pem. The key signs every payment the agent makes, and it is shown only once.

3

Fund the wallet

Open the wallet and click Fund. Use a card top-up or send USDC on Base to the wallet's deposit address. The balance updates when the payment rail confirms, which can take a few seconds for a card and a few minutes for USDC.

4

Set a spending rule (optional)

Go to Buyer → Policies and add this rule:

YAML
approval:
  price > 5.00

Any call over $5.00 now waits for a person to approve it. The rule is checked on the server before money moves, so the agent can't get around it. See Spending policies.

5

Connect your agent

Add Zanora to your MCP client's config. For Claude Desktop that's ~/Library/Application Support/Claude/claude_desktop_config.json:

claude_desktop_config.json
{
  "mcpServers": {
    "zanora": {
      "command": "npx",
      "args": ["-y", "@zanora/mcp"],
      "env": {
        "ZANORA_API_KEY": "zk.akey_…",
        "ZANORA_AGENT_KEY_FILE": "/absolute/path/to/agent-key.pem",
        "ZANORA_MAX_PRICE_MINOR": "500"
      }
    }
  }
}

The gateway defaults to https://api.zanora.dev. If your workspace has exactly one agent wallet, the server finds it from the key. ZANORA_MAX_PRICE_MINOR caps each call at $5.00 on your side.

6

Buy something

Restart the client and ask:

Output
Find a capability that extracts text from invoices and run it on
https://example.com/invoice.png. Tell me what it cost and show the receipt id.

The agent calls zanora_discover, which finds Invoice OCR (demo), then zanora_invoke, which pays $1.00 and returns the result with a signed receipt. Check the wallet in the console: its balance is down by exactly 100 minor units.

Prefer code?

The same purchase from TypeScript with @zanora/sdk:

buy.ts
import { readFileSync } from "node:fs";
import { ZanoraAgent } from "@zanora/sdk";

const agent = new ZanoraAgent({
  // gatewayUrl defaults to https://api.zanora.dev
  apiKey: process.env.ZANORA_API_KEY!,               // the workspace key
  walletId: "wal_…",                                 // from the console
  agentId: "research-agent",
  privateKeyPem: readFileSync("agent-key.pem", "utf8"),
  maxPriceMinor: 500n,                               // never sign a proof above $5.00
});

const { results } = await agent.discover({ query: "extract text from invoices", protocol: "rest" });
const r = await agent.invoke(results[0]!.version.endpoint, {
  body: { imageUrl: "https://example.com/invoice.png" },
});

console.log(r.data);
console.log(r.receipt?.id, r.receiptVerified, r.responseHashVerified);

Next