cardzero-mcp
cardzero-mcp
CardZero 用のMCPサーバー — Base上のAIエージェント向けスマートコントラクトウォレット(USDC建て)。
AIエージェントに以下の機能を提供します:
ウォレットの作成とUSDC残高の確認
直接的なUSDC送金(プラットフォーム手数料2%)
x402 で保護されたHTTPリソースの支払い(HTTP 402ペイウォール)
A2Aサービス提供のための ERC-8183 エスクロージョブの実行(プラットフォーム手数料2% + 評価者手数料5%)
オンチェーンでの支払い/ジョブ状態の照会
CardZeroは基盤となるAPIレイヤーであり、このMCPはRESTエンドポイントをラップしているため、MCP対応クライアント(Claude Desktop、Claude Code、Cursor、VS Codeなど)であればstdio経由で呼び出すことができます。
前提条件
CardZeroダッシュボード でウォレットを請求した後に取得できる、CardZeroの APIキー と ウォレットID が必要です。
Related MCP server: x402tools MCP Server
設定
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json を編集します:
{
"mcpServers": {
"cardzero": {
"command": "npx",
"args": ["-y", "cardzero-mcp"],
"env": {
"CARDZERO_API_KEY": "czapi_...",
"CARDZERO_WALLET_ID": "wallet_..."
}
}
}
}Claude Code
claude mcp add cardzero -- npx -y cardzero-mcpまたは、プロジェクト内の .mcp.json に追加します:
{
"mcpServers": {
"cardzero": {
"command": "npx",
"args": ["-y", "cardzero-mcp"],
"env": {
"CARDZERO_API_KEY": "czapi_...",
"CARDZERO_WALLET_ID": "wallet_..."
}
}
}
}Cursor
設定 → MCPサーバー → 新しいサーバーを追加:
名前:
cardzeroコマンド:
npx -y cardzero-mcp環境変数:
CARDZERO_API_KEY,CARDZERO_WALLET_ID
VS Code
.vscode/settings.json に追加します:
{
"mcp": {
"servers": {
"cardzero": {
"command": "npx",
"args": ["-y", "cardzero-mcp"],
"env": {
"CARDZERO_API_KEY": "czapi_...",
"CARDZERO_WALLET_ID": "wallet_..."
}
}
}
}
}環境変数
変数 | 必須 | 説明 |
| はい (ツール呼び出し用) | CardZeroダッシュボードから取得したエージェントAPIキー ( |
| はい (ウォレット関連ツール用) | CardZeroダッシュボードから取得したウォレットID ( |
| いいえ | APIベースURL — デフォルトは |
サーバーはこれらの変数がなくても起動し tools/list に応答しますが、個別のツール呼び出し時に config_missing エラーが返されます。
利用可能なツール (10)
直接支払い
ツール | 説明 |
| 新しいCardZeroウォレットを作成します。アドレスと、人間である所有者用のワンタイム請求キーを返します。認証は不要です。 |
| ウォレットの現在のUSDC残高を確認します。 |
| 任意のイーサリアムアドレスにUSDCを送金します。ウォレットから2%の手数料が差し引かれます。 |
| 最近の支払い履歴を表示します。 |
| IDを指定して特定の支払いを照会します。認証は不要です。 |
x402
ツール | 説明 |
| x402で保護されたHTTPリソースの支払いを行います。リクエストを再試行するための支払いヘッダーを返します。 |
ERC-8183 ジョブ (エスクロー / A2Aサービス提供)
ツール | 説明 |
| プロバイダーが成果物を納品し、評価者が承認するまでUSDCをエスクローするジョブを作成します。 |
| 予算をエスクローにロックします。ステータス: |
| プロバイダーが成果物を提出します。ステータス: |
| 現在の状態(ステータス、トランザクション、評価結果)を読み取ります。認証は不要です(ジョブの状態は公開されています)。 |
仕組み
このMCPサーバーは、CardZero REST APIを呼び出す軽量なクライアントです。ローカルマシン上で実行され、stdio経由でAIアシスタントと通信します。データはローカルに保存されません。
AI Assistant (Claude / Cursor / VS Code)
⇅ stdio (JSON-RPC)
cardzero-mcp (local Node process)
⇅ HTTPS
api.cardzero.ai → Base mainnet (USDC + ERC-4337 + ERC-8004 + ERC-8183)開発
git clone https://github.com/mrocker/cardzero-mcp.git
cd cardzero-mcp
npm install
npm run dev # tsx-watch the source
npm run build # compile to ./distリソース
ウェブサイト: https://cardzero.ai
ドキュメント: https://cardzero.ai/docs
LLMフレンドリーな全コーパス: https://cardzero.ai/llms-full.txt
メインネットコントラクト: /docs/reference/contracts に記載
ライセンス
MIT
Available Tools
10 toolscreate_jobA
Create a Job that escrows USDC payment until a Provider delivers and an Evaluator approves. Use this for A2A service delivery (vs send_payment for direct transfers). Confirm budget + provider with user first. Provider must have a CardZero wallet (Sprint 9 MVP requirement).
Inputs: providerAddress (required), budgetUsdc (required), expiredAt (required), title (required), +3 more.
create_walletA
Create a new CardZero wallet. Returns a wallet address and one-time claim key for the human owner. No authentication required.
Inputs: name.
fund_jobA
Fund a Job created via create_job. Locks the budget USDC into escrow. Requires that the Job is in 'open' state. Two on-chain operations: USDC.approve(jobs) + Jobs.fund. Status: open → funded.
Inputs: jobId (required).
get_balanceA
Check the current USDC balance of your CardZero wallet.
Inputs: no named parameters.
get_jobA
Get the current state of a Job (status, budget, transactions, evaluation outcome). No authentication required — Job state is public.
Inputs: jobId (required).
get_paymentA
Check the status of a specific payment by its ID. No authentication required.
Inputs: paymentId (required).
list_paymentsB
View recent payment history for your CardZero wallet.
Inputs: limit, offset.
pay_x402A
Pay for an x402-protected HTTP resource (HTTP 402 Payment Required). Use after receiving a 402 response. Returns a paymentHeader to include in the retry request as X-PAYMENT header.
Inputs: url (required), maxAmount (required), recipient (required), network, +2 more.
send_paymentA
Send a USDC payment to any Ethereum address. A 2% service fee is deducted automatically from your wallet. Confirm amount and recipient with the user before calling.
Inputs: to (required), amount (required), memo, idempotencyKey.
submit_jobA
Submit a deliverable for a Job (Provider side). Posts the deliverable hash on-chain; Evaluator then auto-approves or rejects. Status: funded → submitted.
Inputs: jobId (required), contentHash (required), contentURI.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Tools have distinct purposes overall, but send_payment and pay_x402 both involve sending payments, potentially causing slight confusion. Descriptions help differentiate them.
All tools follow a consistent verb_noun pattern with underscores, e.g., create_job, get_balance, send_payment. No mixing of styles.
10 tools cover the core wallet and job escrow functionality without being excessive or insufficient for the stated purpose.
Core workflows are covered, but missing tools like list_jobs or cancel_job could hinder full lifecycle management. Minor gap.
Maintenance
Related MCP Connectors
Pay-per-call tools for autonomous agents, settled in USDC on Base via x402.
Pay-per-use MCP tools for AI agents. USDC on Base via x402. No API keys.
Pay-per-call tools for AI agents. Live x402 APIs paid in USDC on Base.
Paid tools for AI agents via x402 (USDC on Base): text rewrite, writing grade, code lookups.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceUSDC payments for AI agents on Base. Direct transfers, pre-funded tabs, x402 paywall handling, and service discovery.92 npmMIT
- AlicenseAqualityDmaintenanceProvides AI agents with 10 pay-per-call utility tools (QR generation, DNS lookup, OCR, etc.) using USDC on Base via the x402 protocol, with agent's private key never leaving the agent.11MIT

token4u-mcpofficial
AlicenseAqualityDmaintenanceEnables AI agents to call LLM APIs via x402 micropayments in USDC on Base network, manage a local wallet, and query consumption records.341 npmMIT- AlicenseNot gradedqualityBmaintenanceEnables AI agents to check their wallet address and USDC balance, preview the cost of an x402 call, and pay for API requests in USDC on Base without an account or API key. Spend caps, allow-lists and blocked contracts are enforced in code before anything is signed, so a prompt injection cannot bypass them.1MIT