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.
- Read: chain status, block height, block detail, transaction result
- Contract metadata: view methods and system contract address (REST adapter)
- Contract execution: view call and send transaction (SDK)
- Fee estimate: REST first, SDK fallback
- Node registry: import and list custom nodes
AELF:https://aelf-public-node.aelf.iotDVV:https://tdvv-public-node.aelf.io
bun installbun run mcpbun run cli get-chain-status --chain-id AELFbun run build:openclaw
bun run build:openclaw:check# MCP server
bun run mcp
# CLI
bun run cli get-chain-status --chain-id AELF
# Unit tests
bun run test:unitThis repository includes a one-command setup CLI for Claude, Cursor, and OpenClaw.
bun run setup claude
bun run setup cursor
bun run setup cursor --global
bun run setup openclaw
bun run setup openclaw --config-path /path/to/openclaw-config.json
bun run setup list
bun run setup uninstall claude
bun run setup uninstall cursor --global
bun run setup uninstall openclaw --config-path /path/to/openclaw-config.jsonInstalled package users can also run:
aelf-node-setup claudeReference file: mcp-config.example.json
{
"mcpServers": {
"aelf-node-skill": {
"command": "bun",
"args": ["run", "/ABSOLUTE/PATH/TO/src/mcp/server.ts"],
"env": {
"AELF_PRIVATE_KEY": "your_private_key_here"
}
}
}
}Copy and edit:
cp .env.example .envAELF_PRIVATE_KEY: required for write operationsAELF_PRIVATE_KEYis read from environment only in MCP mode (no private key tool input)AELF_NODE_AELF_RPC_URL: optional override for AELF nodeAELF_NODE_TDVV_RPC_URL: optional override for tDVV nodeAELF_NODE_REGISTRY_PATH: optional custom registry pathAELF_SDK_INSTANCE_CACHE_MAX: optional max SDK instance cache size (default32)AELF_SDK_CONTRACT_CACHE_MAX: optional max SDK contract cache size (default256)AELF_REST_CLIENT_CACHE_MAX: optional max REST client cache size (default64)
MCP tool names:
aelf_get_chain_statusaelf_get_block_heightaelf_get_blockaelf_get_transaction_resultaelf_get_contract_view_methodsaelf_get_system_contract_addressaelf_call_contract_viewaelf_send_contract_transactionaelf_estimate_transaction_feeaelf_import_nodeaelf_list_nodes
src/core/: business orchestrationlib/sdk-client.ts:aelf-sdkwrapperlib/rest-client.ts: REST adapter with normalized errorslib/node-router.ts: node resolution and fallbacksrc/mcp/server.ts: MCP adapteraelf_node_skill.ts: CLI adapterindex.ts: SDK exports
bun run test
bun run test:coverage:ci- Never put
AELF_PRIVATE_KEYin prompts or channel outputs. - Use environment variables for all secrets.
MIT