zcash mcp
](https://www.npmjs.com/package/@frontiercompute/zcash-mcp) 
Zcash MCP服务器。将AI代理连接到屏蔽的Zcash操作。发表在MCP注册表上。
MCP(模型上下文协议)是人工智能模型调用外部工具的标准方式。该服务器公开了12个Zcash工具,任何MCP客户端都可以使用这些工具——Claude Desktop、ChatGPT、OpenClaw或任何使用该协议的工具。
工具
| 工具 | 它做什么 |
|---|---|
get_balance | 钱包哈希的ZAP1证明历史和锚定状态 |
send_shielded | 生成zcash:支付URI(ZIP 321) |
decode_memo | 解码屏蔽备忘录-ZAP1类型,ZIP 302,文本,二进制 |
attest_event | 将ZAP1证明写入Zcash区块链 |
verify_proof | 验证ZAP1 Merkle证明 |
get_stats | ZAP1协议统计数据(叶子、锚点、类型) |
get_block_height | Zebra的当前链条高度 |
lookup_transaction | 按txid列出的原始交易数据 |
get_anchor_history | 所有具有txid和块高度的ZAP1 Merkle根锚 |
get_anchor_status | 当前Merkle树状态:根、未固定的叶子、推荐 |
get_events | 最近的ZAP1认证事件,包括类型、钱包哈希、叶子哈希 |
get_agent_status | ZAP1代理ID的证明摘要 |
zcash_create_invoice | 创建ZAP1付款发票,返回地址、金额、zcash:URI、到期日 |
zcash_watch_payment | 轮询发票,直到付款或超时,返回txid、高度、金额 |
zcash_prove_payment | 获取叶哈希的完整Merkle证明包 |
zcash_identity_register | 通过agent_Register证明注册代理身份 |
zcash_reputation_score | 获取代理债券数据和政策合规性作为信誉对象 |
zcash_crosschain_swap | 跨链互换意图:ZEC通过Ika或NEAR对BTC、USDC、USDT透明 |
zcash_create_wallet | 通过Ika 2PC-MPC创建一个分体式密钥钱包(secp256k1表示ZEC、BTC、ETH) |
zcash_sign_mpc | 通过Ika 2PC-MPC对消息哈希进行签名(双方都看不到完整密钥) |
zcash_shield | 将ZEC从透明的MPC监管转移到屏蔽的Orchard游泳池 |
zcash_verify_evm | 通过EVM合同验证链上的ZAP1 Merkle证明(Sepolia、Base、Arbitrum) |
安装
npx @frontiercompute/zcash-mcp或全局安装:
npm install -g @frontiercompute/zcash-mcp配置
环境变量:
| 变量 | 默认值 | 描述 |
|---|---|---|
ZEBRA_RPC_URL | http://127.0.0.1:8232 | 斑马节点JSON-RPC端点 |
ZAP1_API_URL | https://pay.frontiercompute.io | ZAP1认证API |
ZAP1_API_KEY | none | certificate_event的API密钥 |
克劳德桌面版
添加 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"zcash": {
"command": "npx",
"args": ["@frontiercompute/zcash-mcp"],
"env": {
"ZEBRA_RPC_URL": "http://127.0.0.1:8232",
"ZAP1_API_KEY": "your-key-here"
}
}
}
}任何MCP客户端
服务器使用JSON-RPC通过stdio进行通信。将您的MCP客户端指向 zcash-mcp 二元的。
从源代码构建
git clone https://github.com/Frontier-Compute/zcash-mcp.git
cd zcash-mcp
npm ci
npm run build
node dist/index.js测试
离线验证包括内置的stdio服务器和打包的npm tarball的无尘室安装:
npm run test:offline实时验证命中真实的Zebra RPC和ZAP1 API:
ZEBRA_RPC_URL=http://127.0.0.1:8232 \
ZAP1_API_URL=http://127.0.0.1:3080 \
ZAP1_API_KEY=your-key-here \
npm run test:livetest:live 通过stdio驱动MCP服务器,并练习实时工具界面,而不仅仅是底层HTTP端点。集 ZAP1_AGENT_ID 如果你想要 get_agent_status 选中以针对特定的已部署代理。
GitHub Actions反映了这种分裂:
.github/workflows/offline-ci.yml对每个推送和拉取请求运行确定性打包和MCP握手检查。.github/workflows/live-e2e.yml运行秘密支持的实时检查main,按计划,通过人工调度。
依赖项
- 跑步 斑马 用于链查询的节点(get_block_height,lookup_transaction)
- 在pay.frontiercompute.io上的ZAP1 API,用于证明工具(get_b天平、certific_event、verify_proform、get_stats、get_anchor_history、get_anhor_status、get_events、get_agent_status)
- 备忘录解码在本地工作,没有外部依赖关系
相关套餐
| 包装 | 它的作用 |
|---|---|
| @前沿计算/zcash | 通过Ika 2PC-MPC进行Zcash+比特币签名 |
| @前端计算/openclaw-zap1 | ZAP1认证的OpenClaw技能 |
| @frontiercompute/zap1 | ZAP1认证客户端 |
| @frontiercompute/silo-zap1 | 通过ZAP1进行筒仓代理认证 |
链接
许可证
麻省理工学院
快速入门(5分钟)
添加到您的MCP配置中:
{
"mcpServers": {
"zcash": {
"command": "npx",
"args": ["@frontiercompute/zcash-mcp"]
}
}
}重新启动您的客户端。问:“当前zcash块高度是多少?”
完成。22种可用工具。读取操作不需要API密钥。
获取写操作的试用密钥:
curl -s -X POST https://frontiercompute.cash/api/trial-key