MCP server
Install
# Recommended: get the CLI (gives you cdr + cdr mcp + cdr skill install)
$ npm install -g @cdr-kit/cli
# Alternative: just the MCP wrapper (used by claude mcp add)
$ npm install -g @cdr-kit/mcp
Add to Claude Desktop (one command)
If you have Claude Code installed, the cleanest path is:
$ claude mcp add cdr-kit npx @cdr-kit/mcp
This registers npx @cdr-kit/mcp as the cdr-kit server. The first run auto-generates a wallet at ~/.config/cdr-kit/wallet.json (chmod 600) and prints the address + faucet URL to stderr. Fund it with cdr fund before calling write/subscribe tools.
Manual config (Claude Desktop / Cursor / Windsurf)
Paste this into your host's MCP config. Paths: Claude Desktop uses ~/Library/Application Support/Claude/claude_desktop_config.json. Cursor uses ~/.cursor/mcp.json. Windsurf uses ~/.codeium/windsurf/mcp_config.json.
{
"mcpServers": {
"cdr-kit": {
"command": "npx",
"args": ["-y", "@cdr-kit/mcp"],
"env": {
"CDR_PRIVATE_KEY": "0x_your_aeneid_testnet_key_here",
"CDR_NETWORK": "aeneid"
}
}
}
}CDR_PRIVATE_KEY is optional — if omitted, the wallet is auto-generated and loaded from disk on every run.
Tools (34)
All tools come from a single source of truth in @cdr-kit/tools — split across tools-read (4), tools-author (3), tools-introspect (6), tools-advanced (13), and tools-story (8). Adapter packages (Vercel AI / OpenAI / LangChain / AgentKit / GOAT) iterate the same list, so every adapter gets all 34 automatically.
| Tool | Group | Description |
|---|---|---|
cdr_discover_vaults | Discover + read | Scan recent VaultCreated events; returns uuid, ipId, creator per vault. |
cdr_subscribe_and_access | Discover + read | Pay the subscription, then read + decrypt — one composite call. |
cdr_access_vault | Discover + read | Read + decrypt a vault the agent is already entitled to. |
cdr_access_license_gated | Discover + read | Read a license-gated vault by presenting a Story license token the agent owns. |
cdr_get_vault_info | Introspection | Resolve uuid → tokenId, ipId, creator, licenseTermsId. View-only. |
cdr_creator_vaults | Introspection | List every vault a given creator has minted. View-only. |
cdr_check_entitlement | Introspection | Is the agent (or any address) currently subscribed? Returns paidUntil + isEntitled. View-only. |
cdr_estimate_cost | Introspection | Subscription plan: pricePerPeriod, period, payee, mode. View-only. |
cdr_list_subscriptions | Introspection | Every vault the agent is currently subscribed to (active paidUntil). |
cdr_get_fees | Introspection | CDR allocate / write / read fees + operational threshold. View-only, no wallet needed. |
cdr_create_vault | Author / publish | Mint NFT + register IP + allocate slot + configure read condition — one tx. |
cdr_write_vault_data | Author / publish | Encrypt a small (<1KB) UTF-8 string and write it to a vault. |
cdr_upload_file | Author / publish | Encrypt + IPFS-pin + allocate + write — for any >1KB payload. |
cdr_create_time_window_vault | Advanced conditions (0.5) | Create a Story CDR vault gated by an absolute time (or block) window. |
cdr_create_dead_man_vault | Advanced conditions (0.5) | Create a dead-man-switch vault — auto-unlocks to heirs if the creator stops poke()-ing. |
cdr_create_escrow_vault | Advanced conditions (0.5) | Create a buyer-pays-then-confirms-delivery escrow vault with optional arbiter. |
cdr_create_multi_sig_vault | Advanced conditions (0.5) | Create an N-of-M multi-sig vault — both off-chain EIP-712 sigs AND on-chain approve() paths supported. First-of-kind in the CDR ecosystem. |
cdr_approve_multi_sig | Advanced conditions (0.5) | Safe-style on-chain approval — agent calls approve(uuid). Dashboards read currentApprovalsCount(uuid). |
cdr_register_ip | Story IP (0.5) | Register an NFT as a Story IP asset (fresh-mint via SPG). |
cdr_attach_license_terms | Story IP (0.5) | Attach PIL license terms to a Story IP asset (required before minting license tokens). |
cdr_mint_license_token | Story IP (0.5) | Mint Story license tokens against an IP asset's licenseTermsId. |
cdr_publish_data | Story IP (0.5) | Agent-as-publisher one-shot: register IP + attach commercial terms + create license-gated CDR vault + write encrypted secret. The highest-DX win for autonomous data sellers. |
Env reference
| Var | Default | Purpose |
|---|---|---|
CDR_PRIVATE_KEY | (auto-generated) | Agent's wallet. Overrides the disk file at ~/.config/cdr-kit/wallet.json. |
CDR_NETWORK | aeneid | aeneid (default) or mainnet (throws — not yet deployed). |
CDR_RPC_URL | network's canonical RPC | Override the JSON-RPC endpoint (use a paid RPC for production). |
CDR_API_URL | network's canonical Story-API REST | Override the Story-API base URL. |
LOG_LEVEL | info | pino level: trace, debug, info, warn, error. |
PRIVATE_KEY | (deprecated) | Old name for CDR_PRIVATE_KEY. Still honored in 0.4 with a deprecation warning; removed in 0.5. |