Token导航 LogoToken导航TokenDH.com
clawlet (Clawletxyz) logo
AI代理stdio官方级别未说明来源级核验

clawlet (Clawletxyz)

MCP Server

clawlet

Clawlet是一个为AI代理提供USDC钱包管理、支付规则控制和x402支付支持的工具,适用于开发和生产环境中的自动化代理支付场景。

工具数

15

提示词数

0

GitHub Stars

2

资源数

0
AI代理区块链TypeScriptClaudeClaude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

clawletxyz

提供方

clawletxyz

最后核验

2026/5/17 20:21

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx clawlet

详细介绍

Clawlet

Spend controls for AI agents + x402 payments over HTTP.

One package. One command. Your AI agent gets a USDC wallet on Base with spending rules, x402 payment support, and a full audit trail — all running on your machine.

Quickstart

npx clawlet

That's it. Opens a dashboard at http://localhost:3000 where you create a wallet, set spending rules, and view transactions. The CLI also prints the MCP config snippet to connect Claude Desktop.

Install globally (optional)

npm install -g clawlet
clawlet start

Connect your AI agent

Clawlet runs an MCP server that gives any compatible AI agent financial tools. Add this to your Claude Desktop config:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "clawlet": {
      "command": "npx",
      "args": ["-y", "clawlet", "mcp"]
    }
  }
}

Once connected, your agent has these tools:

ToolWhat it does
create_walletCreate a new USDC wallet on Base
list_walletsList all wallets, show which is active
switch_walletSwitch the active wallet
get_walletGet active wallet address and status
get_balanceCheck USDC balance
set_spending_rulesSet per-tx limit, daily cap, service allow/blocklists
get_spending_rulesView current rules
set_networkSwitch between Base mainnet and Base Sepolia testnet
payMake an x402 payment to any URL
get_transactionsView transaction history
freeze_walletEmergency kill switch — blocks all payments instantly
unfreeze_walletRe-enable payments
set_agent_identityBind an ERC-8004 on-chain identity to the wallet
get_agent_identityRetrieve agent identity
configure_adapterConfigure Coinbase CDP wallet provider

Example conversation

You:   Create a wallet for this agent
Agent: [calls create_wallet] → Created wallet 0xABC...123 on Base.

You:   Set a $5 per transaction limit and $20 daily cap
Agent: [calls set_spending_rules] → Rules updated.

You:   Access the premium data at https://api.example.com/data
Agent: [calls pay] → Paid 0.10 USDC to api.example.com. Here's the data: {...}

You:   Something's wrong — freeze the wallet
Agent: [calls freeze_wallet] → Wallet frozen. All payments blocked.

How x402 payments work

Agent                     Clawlet                   Paid API
  |                          |                          |
  |--- pay(url) ----------->|                          |
  |                          |--- GET url ------------->|
  |                          ||
  |                          |      Port for the dashboard (default: 3000)
  --help, -h           Show help
  --version, -v        Show version

Architecture

src/
├── cli.ts         # CLI entry point (npx clawlet)
├── index.ts       # MCP server — tool definitions, stdio transport
├── api.ts         # REST API + dashboard server (Hono)
├── wallet.ts      # Multi-wallet management, freeze/unfreeze
├── rules.ts       # Spending rules engine
├── ledger.ts      # Transaction recording
├── x402.ts        # x402 protocol handler (EIP-712 signing, two-phase for browser wallets)
├── store.ts       # SQLite persistence, wallet resolution (.clawlet/clawlet.db)
├── types.ts       # TypeScript type definitions
├── constants.ts   # Network addresses, ABIs, RPC URLs
└── adapters/
    ├── local-key.ts      # Raw private key (dev/testing)
    ├── coinbase-cdp.ts   # Coinbase CDP v2 (TEE-based)
    ├── browser-wallet.ts # MetaMask / browser extension
    └── evm-balance.ts    # Shared ERC-20 balance lookup

dashboard/             # React + Vite monitoring UI
demo/                  # Mock x402 server + seed data

Development

git clone https://github.com/clawletxyz/clawlet.git
cd clawlet
npm install

# Seed sample data and run with hot reload
npm run demo:seed
npm run dev

# Run with mock x402 server (API + dashboard + mock paid endpoints)
npm run demo

# Build everything
npm run build

The mock x402 server runs on localhost:4020 with test endpoints:

EndpointPrice
/api/joke0.01 USDC
/api/weather0.05 USDC
/api/market-data0.10 USDC
/api/sentiment0.02 USDC
/api/code-review0.25 USDC

Networks

NetworkChain IDUSDC Address
Base Mainneteip155:84530x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Base Sepoliaeip155:845320x036CbD53842c5426634e7929541eC2318f3dCF7e

Switch networks via the dashboard or MCP:

Agent: [calls set_network with network="base-sepolia"] → Switched to testnet.

Security

  • Private keys are stored locally in .clawlet/clawlet.db (gitignored)
  • The wallet only signs ERC-3009 TransferWithAuthorization — the facilitator can only execute the exact transfer described
  • Spending rules are enforced before any signature is created
  • Freeze blocks all payments instantly, no confirmation needed
  • The Coinbase CDP adapter uses TEE-based key management — keys never leave the secure enclave

REST API

The dashboard server exposes a full REST API at the same port.

Authentication

Set CLAWLET_API_KEY env var to require a bearer token on all API routes (except /api/config):

CLAWLET_API_KEY=my-secret-key clawlet start

Then include Authorization: Bearer my-secret-key in requests. If the env var is not set, auth is disabled.

Legacy routes (active wallet)

GET    /api/config             Config flags (demoMode, authRequired)
GET    /api/wallets            List all wallets
POST   /api/wallets            Create a new wallet
POST   /api/wallets/switch     Switch active wallet
DELETE /api/wallets/:id        Delete a wallet
GET    /api/balance            Get USDC balance
GET    /api/rules              Get spending rules
PUT    /api/rules              Update spending rules
GET    /api/transactions       Get transaction history
GET    /api/today-spent        Today's spending total
POST   /api/pay                Make an x402 payment
POST   /api/freeze             Freeze active wallet
POST   /api/unfreeze           Unfreeze active wallet
GET    /api/agent-identity     Get agent identity
POST   /api/agent-identity     Set agent identity

Wallet-scoped routes

Target a specific wallet by ID — no need to switch the active wallet:

GET    /api/wallets/:walletId/transactions     Transactions for wallet
GET    /api/wallets/:walletId/rules            Get spending rules
PUT    /api/wallets/:walletId/rules            Update spending rules
GET    /api/wallets/:walletId/balance          Get USDC balance
POST   /api/wallets/:walletId/freeze           Freeze wallet
POST   /api/wallets/:walletId/unfreeze         Unfreeze wallet
POST   /api/wallets/:walletId/rename           Rename wallet
GET    /api/wallets/:walletId/agent-identity   Get agent identity
POST   /api/wallets/:walletId/agent-identity   Set agent identity
GET    /api/wallets/:walletId/today-spent      Today's spending total
GET    /api/wallets/:walletId/tags             Get wallet tags
PUT    /api/wallets/:walletId/tags             Set/merge wallet tags
POST   /api/wallets/:walletId/pay              Make an x402 payment

Aggregate endpoints

GET    /api/overview           All wallets with rules, tags, and today's spend
GET    /api/transactions/all   Cross-wallet transaction ledger (?limit=N)

Contributing

See CONTRIBUTING.md.

Stack

  • MCP — Model Context Protocol for agent tool communication
  • Hono — lightweight web framework for the REST API
  • viem — EVM interactions and EIP-712 signing
  • x402 — HTTP-native payment protocol
  • USDC on Base — settlement layer

License

MIT

目录标签

目录标签

AI代理区块链TypeScriptClaude本地部署支付控制USDC钱包x402支付

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

token

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

clawlet

工具数量(toolCount,工具数)

15

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiotoken部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP