Skip to content

Commit 3a51b4d

Browse files
authored
Merge pull request #8 from AElfProject/codex/ironclaw-trusted-mcp
Codex/ironclaw trusted mcp
2 parents ed61747 + 09c14f4 commit 3a51b4d

12 files changed

Lines changed: 850 additions & 9 deletions

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Unit Tests](https://github.com/AElfProject/aelf-node-skill/actions/workflows/test.yml/badge.svg)](https://github.com/AElfProject/aelf-node-skill/actions/workflows/test.yml)
66
[![Coverage](https://img.shields.io/endpoint?url=https://AElfProject.github.io/aelf-node-skill/coverage.json)](https://AElfProject.github.io/aelf-node-skill/coverage.json)
77

8-
AElf Node Skill provides MCP, CLI, and SDK interfaces for AElf public nodes with `REST for reads, SDK for contract execution, and selective fallback for fee estimate`.
8+
AElf Node Skill provides MCP, CLI, and SDK interfaces for AElf public nodes with `REST for reads, SDK for contract execution, and selective fallback for fee estimate`, plus OpenClaw and IronClaw integration.
99

1010
## Features
1111

@@ -62,20 +62,50 @@ bun run test:unit
6262

6363
## Setup CLI
6464

65-
This repository includes a one-command setup CLI for Claude, Cursor, and OpenClaw.
65+
This repository includes a one-command setup CLI for Claude, Cursor, OpenClaw, and IronClaw.
6666

6767
```bash
6868
bun run setup claude
6969
bun run setup cursor
7070
bun run setup cursor --global
71+
bun run setup ironclaw
7172
bun run setup openclaw
7273
bun run setup openclaw --config-path /path/to/openclaw-config.json
7374
bun run setup list
7475
bun run setup uninstall claude
7576
bun run setup uninstall cursor --global
77+
bun run setup uninstall ironclaw
7678
bun run setup uninstall openclaw --config-path /path/to/openclaw-config.json
7779
```
7880

81+
## IronClaw
82+
83+
```bash
84+
bun run setup ironclaw
85+
bun run setup uninstall ironclaw
86+
```
87+
88+
The IronClaw setup writes a stdio MCP entry to `~/.ironclaw/mcp-servers.json` and installs this repo's `SKILL.md` to `~/.ironclaw/skills/aelf-node-skill/SKILL.md`.
89+
90+
Important trust model note:
91+
92+
- Use the trusted skill path above for write-capable flows such as `aelf_send_contract_transaction`.
93+
- Do not rely on `~/.ironclaw/installed_skills/` for the primary install path when you need write approval behavior.
94+
- This MCP server emits both standard MCP camelCase annotations and IronClaw-compatible snake_case annotations so the current IronClaw source can honor read/write hints.
95+
96+
Remote activation contract:
97+
98+
- GitHub repo/tree URLs are discovery sources only, not the final IronClaw install payload.
99+
- Preferred IronClaw activation from npm: `bunx -p @blockchain-forever/aelf-node-skill aelf-node-setup ironclaw`
100+
- Prefer ClawHub / managed install for OpenClaw when available; otherwise use `bunx -p @blockchain-forever/aelf-node-skill aelf-node-setup openclaw`
101+
- Local repo checkout remains a development smoke-test path only.
102+
103+
Minimal smoke test:
104+
105+
1. `bun run setup ironclaw`
106+
2. Ask IronClaw for `latest block height on AELF`
107+
3. Ask it to `send a contract transaction` and confirm approval appears before execution
108+
79109
Installed package users can also run:
80110

81111
```bash

README.zh-CN.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Unit Tests](https://github.com/AElfProject/aelf-node-skill/actions/workflows/test.yml/badge.svg)](https://github.com/AElfProject/aelf-node-skill/actions/workflows/test.yml)
66
[![Coverage](https://img.shields.io/endpoint?url=https://AElfProject.github.io/aelf-node-skill/coverage.json)](https://AElfProject.github.io/aelf-node-skill/coverage.json)
77

8-
AElf Node Skill 提供 MCP、CLI、SDK 三种接口,采用“读走 REST、合约执行走 SDK、手续费估算选择性 fallback”的架构访问 AElf 公共节点。
8+
AElf Node Skill 提供 MCP、CLI、SDK 三种接口,采用“读走 REST、合约执行走 SDK、手续费估算选择性 fallback”的架构访问 AElf 公共节点,并支持 OpenClaw 与 IronClaw 集成
99

1010
## 功能
1111

@@ -62,20 +62,50 @@ bun run test:unit
6262

6363
## Setup CLI
6464

65-
仓库内置一键 setup,支持 Claude、Cursor、OpenClaw。
65+
仓库内置一键 setup,支持 Claude、Cursor、OpenClaw、IronClaw
6666

6767
```bash
6868
bun run setup claude
6969
bun run setup cursor
7070
bun run setup cursor --global
71+
bun run setup ironclaw
7172
bun run setup openclaw
7273
bun run setup openclaw --config-path /path/to/openclaw-config.json
7374
bun run setup list
7475
bun run setup uninstall claude
7576
bun run setup uninstall cursor --global
77+
bun run setup uninstall ironclaw
7678
bun run setup uninstall openclaw --config-path /path/to/openclaw-config.json
7779
```
7880

81+
## IronClaw
82+
83+
```bash
84+
bun run setup ironclaw
85+
bun run setup uninstall ironclaw
86+
```
87+
88+
IronClaw 安装会向 `~/.ironclaw/mcp-servers.json` 写入 stdio MCP entry,并把当前仓库的 `SKILL.md` 安装到 `~/.ironclaw/skills/aelf-node-skill/SKILL.md`
89+
90+
关于 trust model 的说明:
91+
92+
- 如果要执行 `aelf_send_contract_transaction` 这类写能力,必须使用上面的 trusted skill 路径。
93+
- 不要把 `~/.ironclaw/installed_skills/` 当成主安装路径,否则写操作的 approval 行为会不稳定。
94+
- 当前 MCP server 会同时输出标准 MCP camelCase annotations 和 IronClaw 兼容 snake_case annotations,确保 IronClaw 能识别读写 hints。
95+
96+
远程激活契约:
97+
98+
- GitHub repo/tree URL 只用于 discovery,不是最终的 IronClaw 安装载体。
99+
- 推荐的 IronClaw npm 激活命令:`bunx -p @blockchain-forever/aelf-node-skill aelf-node-setup ironclaw`
100+
- OpenClaw 若有 ClawHub / managed install 则优先使用;否则回退到 `bunx -p @blockchain-forever/aelf-node-skill aelf-node-setup openclaw`
101+
- 本地 repo checkout 仅保留给开发阶段 smoke test。
102+
103+
最短 smoke test:
104+
105+
1. `bun run setup ironclaw`
106+
2. 让 IronClaw 查询 `latest block height on AELF`
107+
3. 再让它 `send a contract transaction`,确认执行前会出现 approval
108+
79109
安装后的包也可直接执行:
80110

81111
```bash

SKILL.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,43 @@
11
---
22
name: "aelf-node-skill"
3+
version: "0.1.3"
34
description: "AElf node querying and contract execution skill for agents."
5+
activation:
6+
keywords:
7+
- node
8+
- rpc
9+
- block
10+
- transaction
11+
- contract
12+
- fee
13+
- chain status
14+
- system contract
15+
exclude_keywords:
16+
- wallet
17+
- dex
18+
- dao
19+
- explorer
20+
- guardian
21+
tags:
22+
- node
23+
- rpc
24+
- aelf
25+
- blockchain
26+
max_context_tokens: 1800
427
---
528

629
# AElf Node Skill
730

831
## When to use
932
- Use this skill when you need AElf chain query, contract view/send, and fee estimation tasks.
33+
- Default to this skill for node, RPC, block, transaction, contract metadata, and fee estimation requests.
1034

1135
## Capabilities
1236
- Chain reads: status, block, transaction result, metadata
1337
- Contract operations: view call and transaction sending
1438
- Node registry import/list with REST-first and SDK fallback strategy
1539
- Shared signer resolution for write operations: `explicit -> context -> env`
16-
- Supports SDK, CLI, MCP, and OpenClaw integration from one codebase.
40+
- Supports SDK, CLI, MCP, OpenClaw, and IronClaw integration from one codebase.
1741

1842
## Safe usage rules
1943
- Never print private keys, mnemonics, or tokens in channel outputs.
@@ -24,13 +48,21 @@ description: "AElf node querying and contract execution skill for agents."
2448
## Command recipes
2549
- Start MCP server: `bun run mcp`
2650
- Run CLI entry: `bun run cli`
51+
- Install into IronClaw: `bun run setup ironclaw`
2752
- Generate OpenClaw config: `bun run build:openclaw`
2853
- Verify OpenClaw config: `bun run build:openclaw:check`
2954
- Run CI coverage gate: `bun run test:coverage:ci`
3055
- For write calls, pass optional `signerContext` with `signerMode=auto`.
3156

57+
## Distribution / Activation
58+
- GitHub repo/tree URLs are discovery-only for hosts and agents.
59+
- Preferred IronClaw activation from npm: `bunx -p @blockchain-forever/aelf-node-skill aelf-node-setup ironclaw`
60+
- Preferred OpenClaw activation from npm when managed install is unavailable: `bunx -p @blockchain-forever/aelf-node-skill aelf-node-setup openclaw`
61+
- Local repo checkout is for development and smoke tests only.
62+
3263
## Limits / Non-goals
3364
- This skill focuses on domain operations and adapters; it is not a full wallet custody system.
3465
- Do not hardcode environment secrets in source code or docs.
3566
- Avoid bypassing validation for external service calls.
3667
- `signerMode=daemon` is reserved and returns `SIGNER_DAEMON_NOT_IMPLEMENTED` in this release.
68+
- Do not use this skill for wallet lifecycle, DEX trading, DAO governance, or explorer analytics routing.

0 commit comments

Comments
 (0)