Skip to main content
Glama

cardzero-mcp

npm version License: MIT

CardZero용 MCP 서버 — Base 네트워크에서 USDC로 표시되는 AI 에이전트용 스마트 컨트랙트 지갑입니다.

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

설정(Settings) → MCP 서버(MCP Servers) → 새 서버 추가(Add new server):

  • 이름: 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_KEY

예 (도구 호출 시)

CardZero 대시보드의 에이전트 API 키 (czapi_...)

CARDZERO_WALLET_ID

예 (지갑 관련 도구 시)

CardZero 대시보드의 지갑 ID (wallet_...)

CARDZERO_API_URL

아니요

API 기본 URL — 기본값 https://api.cardzero.ai/v1

서버는 이 변수들이 없어도 시작되며 tools/list에 응답하지만, 개별 도구 호출 시 config_missing 오류를 반환합니다.

사용 가능한 도구 (10개)

직접 결제

도구

설명

create_wallet

새로운 CardZero 지갑을 생성합니다. 주소와 인간 소유자를 위한 일회성 클레임 키를 반환합니다. 인증이 필요하지 않습니다.

get_balance

지갑의 현재 USDC 잔액을 확인합니다.

send_payment

모든 이더리움 주소로 USDC를 전송합니다. 지갑에서 2% 수수료가 차감됩니다.

list_payments

최근 결제 내역을 확인합니다.

get_payment

ID로 특정 결제 내역을 조회합니다. 인증이 필요하지 않습니다.

x402

도구

설명

pay_x402

x402 보호 HTTP 리소스에 대해 결제합니다. 요청을 재시도할 수 있는 결제 헤더를 반환합니다.

ERC-8183 작업 (에스크로 / A2A 서비스 제공)

도구

설명

create_job

제공자가 결과물을 전달하고 평가자가 승인할 때까지 USDC를 에스크로에 보관하는 작업을 생성합니다.

fund_job

예산을 에스크로에 잠급니다. 상태: open → funded.

submit_job

제공자가 결과물을 제출합니다. 상태: funded → submitted → 자동 평가.

get_job

현재 상태(상태, 트랜잭션, 평가 결과)를 읽습니다. 인증이 필요하지 않습니다 — 작업 상태는 공개됩니다.

작동 방식

이 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

리소스

라이선스

MIT

Available Tools

10 tools
create_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

    A3.9/5.0

    Scored across 10 tools

    Disambiguation4/5

    Tools have distinct purposes overall, but send_payment and pay_x402 both involve sending payments, potentially causing slight confusion. Descriptions help differentiate them.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with underscores, e.g., create_job, get_balance, send_payment. No mixing of styles.

    Tool Count5/5

    10 tools cover the core wallet and job escrow functionality without being excessive or insufficient for the stated purpose.

    Completeness4/5

    Core workflows are covered, but missing tools like list_jobs or cancel_job could hinder full lifecycle management. Minor gap.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Provides 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.
      11
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables 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.
      1
      MIT