cellula.id

v0.5.0
io.github.LusoCryptoLabs/cellula Checked 1 day ago Published 20 hours ago

Resolve and check .cell names on Nervos, verify what a name signed, pay over Fiber as an agent.

An MCP server that lets an AI agent work with .cell names on the Nervos blockchain: look them up, and prepare a registration for a person to sign. It reads the chain itself through cellula-sdk, holds no key and sends nothing. An agent that pays does so with its own wallet, to the address this returns; a registration is signed by the person, at the link this returns.

Summary extracted from the README.

cellula-mcp

An MCP server that lets an AI agent work with .cell names on the Nervos blockchain: look them up, and prepare a registration for a person to sign. It reads the chain itself through cellula-sdk, holds no key and sends nothing. An agent that pays does so with its own wallet, to the address this returns; a registration is signed by the person, at the link this returns.

Tools

tool what it answers
resolve_cell_name where a name is paid: its CKB address, and when published a Bitcoin address, an Ethereum/EVM address, a Lightning Address and a Fiber node; whether it is registered, its state and when it expires
name_for_address the .cell name a CKB address chose for itself, checked both ways
check_cell_name whether a name is free, today's yearly fee and the deposit; when a taken one expires
cell_name_registration_link a link that opens the registration of a free name, for the person to sign with their own wallet; with invited_by (a registered name whose owner published their own CKB address) the link carries its invitation, and a tenth of the fee goes to that owner in the same transaction, at the same price for the person
verify_cell_statement whether a statement was signed by whoever owns the name now

Every tool takes network (mainnet or testnet); the default is mainnet, or set CELLULA_NETWORK=testnet:

claude mcp add cellula npx cellula-mcp@0.4.2 -e CELLULA_NETWORK=testnet

Payments from an agent's own balance (testnet)

When the Cellula agent runs on the same machine (cellula-agent, its page at testnet.cellula.id/agent), five more tools pay from its own Fiber balance. This server finds the agent's API key where cellula-agent key writes it (.cellula-agent/api.key in the home folder) and calls it on 127.0.0.1:8280; CELLULA_AGENT_URL, CELLULA_AGENT_KEY or CELLULA_AGENT_KEY_FILE say otherwise. This server still holds no key of its own: the agent signs, keeps to the limits the person set when starting it (per payment, in all, in any 24 hours, the sellers allowed, their approval above an amount), and sends a taken-out balance only to the address the person fixed then. A payment waiting for the person's approval comes back as needs_approval, saying where they approve it.

npx cellula-agent key
npx cellula-agent --return-to ckt1... --per-payment 1 --total 10
claude mcp add cellula npx cellula-mcp@0.4.2 -e CELLULA_NETWORK=testnet

The first makes the agent's keys and says the address to fund; the second starts it with the person's address and limits; the third, in another terminal, connects Claude Code. Each is one line, the same in PowerShell, cmd and bash.

tool what it does
fiber_agent_status the balance, what was spent, the caps and what is left, the address to top it up
fiber_fetch_paid calls a URL; when the seller answers HTTP 402 asking a Fiber payment (x402 v2, scheme exact on fiber:testnet), pays it once up to max_ckb and asks again with the receipt
fiber_pay_invoice pays a Fiber invoice that names its amount, and returns its receipt
fiber_payments the recent payments and their receipts
fiber_take_out closes the balance and sends it to the address set when the agent started; it takes no address

CELLULA_AGENT_URL must be on this machine (http://127.0.0.1:<port>), where the agent listens, since its key goes with every call: a setting changed by mistake cannot send it elsewhere. Without an agent's key, the server has only the five read-only tools.

Use it

Name the version: with it npx starts the server in a couple of seconds; without, npx asks the registry at every start, which took 15 to 19 s on 2026-11-01, near Claude Code's 30 s limit for a server to start.

Claude Code, the same line in PowerShell, cmd and bash:

claude mcp add cellula npx cellula-mcp@0.4.2

No -- before npx: Windows PowerShell drops it on its way through npm's claude.ps1, and the command then fails with "unknown option '-y'". npx needs no -y here, since a client starts it with no terminal.

Claude Desktop, and other clients that read the same config:

{
  "mcpServers": {
    "cellula": { "command": "npx", "args": ["-y", "cellula-mcp@0.4.2"] }
  }
}

What to trust

The answers are read just now from a public CKB node. A name that has expired gives no address. Nothing is cached between calls.

A name's records stay with it when it changes hands, so after a sale they are the seller's until the buyer changes them. From 0.3.0, every address is checked against the name's history (recordByHolder in cellula-sdk): only one written by whoever holds the name now is given, and one a former owner left, or one whose writer could not be read in about ten seconds, is listed under withheld instead.

Earlier versions did not do this. 0.2.1 returns the addresses as the records hold them, and its verify_cell_statement cannot check a statement signed by a Cellula passkey account (cellula-sdk reads that signature from 0.3.0 on), so it answers false for one even when the owner signed it. Use 0.3.0 or later.

Check it

npm run smoke starts the server over stdio with the MCP SDK's own client and calls every tool against both networks, with controls (an unregistered name, input that is not a name, a statement moved to another name, a taken name, an inviter that is not registered, a sub-name). Behind a proxy, run it with NODE_USE_ENV_PROXY=1: the server is started with the caller's whole environment.

node test/agent.mjs checks the payment tools against a stand-in for the agent, with controls (no payment tools without an agent's key, the key found where cellula-agent key writes it, a wrong key, an agent that is not running, an agent elsewhere over plain HTTP). node test/agent-live.mjs runs them against a real agent and a real seller on testnet, and spends test CKB.