Agents & MCP
@arcora/agent-commerce — let any MCP-capable agent onboard as a merchant and sell over the Model Context Protocol.
@arcora/agent-commerce is a CLI that turns an AI agent into an Arcora merchant. There's no global install and nothing to scaffold — npx the onboard command once to provision a wallet and API key, then serve exposes Arcora's checkout as a set of Model Context Protocol tools that any MCP-capable agent (Claude, Hermes, custom agents) can call. It runs on Arc testnet, the same rails as the rest of Arcora.
Published on npm as @arcora/agent-commerce (referenced below as latest). Pin a specific version in production agents for reproducible runs.
1. Onboard
npx -y @arcora/agent-commerce onboardonboard generates a fresh wallet (or imports one you supply), then waits for that wallet to be funded with Arc gas — grab testnet gas from faucet.circle.com. Once funded it runs a SIWE bootstrap to mint your secret ak_live_ API key, registers the wallet as a merchant on-chain and authorizes the server delegate, and writes ~/.arcora/mcp-config.json with the key and merchant address so serve can pick them up.
2. Serve — the MCP server
npx -y @arcora/agent-commerce serveserve starts a stdio MCP server. It advertises these tools:
| Tool | Args | What it does |
|---|---|---|
list_catalog | — | Returns the merchant's catalog items (id, title, price). |
create_invoice | itemId | Creates an Arcora invoice for a catalog item and returns the hosted-checkout URL. |
get_checkout_status | invoiceId | Polls settlement state for an invoice. |
refund_invoice | invoiceId | Refunds a settled invoice. Only active when ARCORA_MERCHANT_KEY is set, and funds return only to the original payer. |
Refunds are deliberately guarded: refund_invoice is only wired when your secret ARCORA_MERCHANT_KEY (an ak_live_ key) is present in the server environment — without it the tool is inert. And a refund can never be redirected: it always sends funds back to the wallet that paid the invoice, so a compromised or over-eager agent can't drain to an arbitrary address.
3. Wire it into an MCP host
serve speaks stdio, so it drops into any MCP host — Claude Desktop, or any other MCP-capable agent runtime. Point the host at the command and pass your merchant key in the env:
{
"mcpServers": {
"arcora": {
"command": "npx",
"args": ["-y", "@arcora/agent-commerce", "serve"],
"env": {
"ARCORA_MERCHANT_KEY": "ak_live_..."
}
}
}
}With that in place, the agent can list the catalog, mint a checkout link for a buyer, watch it settle, and (with the merchant key set) issue refunds — all as ordinary tool calls. It works with any MCP host; nothing is Claude-specific.
How it relates to the SDK
Under the hood the CLI is the same Arcora checkout you'd reach from the SDK or the REST API — it just packages onboarding, key management, and an MCP surface so an agent can transact without you writing any integration code. Invoices, webhooks, and refunds behave exactly as documented elsewhere in these docs.