Skip to main content
Glama
vsima

canton-agent-mcp

by vsima

canton-agent-mcp

你的智能体请求。你批准。硬件签名。

ci License: Apache-2.0

一个 MCP 服务器,让 AI 智能体通过人类的移动钱包使用 Canton Network。智能体可以请求登录和支付;每个请求都会以批准单的形式出现在人类的手机上,而签名由设备密钥(Secure Enclave 或 Android StrongBox)完成,绝不经过智能体。

该服务器是 CIP-0103 的 dApp 客户端,基于 WalletConnect。它不持有任何密钥或账本代币。它只能请求,钱包所有者可以查看、批准或拒绝每个请求。

工作原理

  1. 智能体调用 canton_connect_wallet;出现 WalletConnect 配对二维码。

  2. 人类从钱包的 Connect 选项卡扫描二维码,并在手机上批准。

  3. 此后,智能体可以请求登录(canton_sign_in)或支付(canton_request_payment)。每个请求都会在手机上弹出批准单;钱包在其参与方上准备交易,在设备上重新验证准备好的交易哈希,并在硬件中签名。

  4. 会话持久化在磁盘上,因此钱包只需配对一次即可重复使用。

另一端的参考钱包是 canton-mobile-app(iOS 和 Android,基于原生 canton-mobile-sdk 构建),但任何支持 WalletConnect 的 CIP-0103 钱包都可以使用。

Related MCP server: Grip MCP

快速开始

需要 Node 22.6+(服务器直接运行 TypeScript,无需构建步骤)和一个免费的 WalletConnect Cloud 项目 ID。

git clone https://github.com/vsima/canton-agent-mcp
cd canton-agent-mcp && npm install

使用 Claude Code 注册:

claude mcp add canton-agent --env WC_PROJECT_ID=<your-project-id> \
  -- node <path-to>/canton-agent-mcp/src/main.ts

然后让智能体连接你的钱包并向某人付款。支付请求会阻塞,直到人类决定,因此如果你的 MCP 客户端会截断长时间调用,请提高工具超时时间(在 Claude Code 中:MCP_TIMEOUT 环境变量)。

工具

工具

功能

canton_connect_wallet

开始配对;返回人类扫描的二维码

canton_wallet_status

钱包是否已连接,以及连接到哪个网络

canton_accounts

钱包授予的参与方,以及公钥

canton_sign_in

使用 Canton 登录:参与方的签名、已验证证明

canton_request_payment

推送 Token Standard 转账以供手机批准

canton_disconnect

结束会话

配置

全部通过环境变量:

变量

默认值

含义

WC_PROJECT_ID

必需

WalletConnect Cloud 项目 ID

WC_RELAY_URL

公共中继

中继 WebSocket URL

CANTON_NETWORK_ID

canton:localnet

CAIP-2 网络 ID

AGENT_MCP_NAME

Canton Agent

显示在钱包批准单上的名称

AGENT_MCP_DOMAIN

canton-agent-mcp.local

登录挑战域

AGENT_MCP_STORAGE

~/.canton-agent-mcp/wc-store

会话存储目录

AGENT_MCP_REQUEST_EXPIRY

3600

推送请求保持可应答的秒数(300 到 604800)

CANTON_LEDGER_URL / CANTON_REGISTRY_URL / CANTON_VALIDATOR_URL

Splice LocalNet

支付命令构建位置

支付默认使用本地 Splice LocalNet(通过 SDK 仓库的 integration/run-localnet.sh 启动)。

安全模型

  • 服务器只能请求,不能执行:没有密钥、没有账本代币、没有签名。

  • 每次登录和支付都需要在手机上明确批准。

  • 钱包在硬件密钥签名之前,会在设备上重新派生并验证准备好的交易哈希,因此手机只能签名它显示的内容。

  • 请求会过期(默认一小时);中继以加密方式存储它们。

  • 钱包侧支出策略(按智能体的上限和允许列表,由钱包在签名前强制执行)是 原生 SDK 的下一个里程碑。

开发

npm test        # typecheck + unit tests (no network)
npm run probe   # opens a real relay session and prints the pairing QR

一个独立的、社区构建的开源项目,采用 Apache-2.0 许可证。与 Digital Asset、Canton Foundation 或 Global Synchronizer Foundation 无关联,也未获得其认可。

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Cryptographic proof of consent for AI agents. Sign before you act. Policy engine enforces spending caps, action whitelists, and escalation rules. Independently verifiable by anyone.
    10
    2
    Apache 2.0
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI agents to check balances and send transactions across multiple blockchains with automatic spending limit protection and policy enforcement.
    3
    MIT

View all related MCP servers

Related MCP Connectors

  • Provide AI agents and automation tools with contextual access to blockchain data including balance…

  • Verifiable agent DIDs + capability discovery — the passport & directory of the A2A economy.

  • Trust and payment layer for the agentic economy on the XRP Ledger.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vsima/canton-agent-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server