eForest Agent Skills
This MCP server enables aelf blockchain interactions for token creation and NFT trading, including symbol market operations and comprehensive NFT workflows.
README
eForest Agent Skills
AI Agent Kit for aelf + eForest capabilities, exposed via CLI, MCP Server, and SDK.
Business Capability Overview
Symbol-Market Domain
- Check name availability and estimate costs before action
- Purchase symbol creation entitlement (SEED)
- Create NFT / FT assets
- Issue assets to target addresses
- Provide dry-run preview, risk prompts, and structured failure feedback
Forest Domain (key NFT capabilities)
- Create NFT collections and items (single or batch)
- NFT trading workflows: list, buy, offer, deal, cancel
- NFT asset operations: transfer and price lookup
- Optional extensions: drop, whitelist, AI, miniapp, profile, discovery, realtime
What's New (Forest Skillization v1)
- Expanded from token-only flows to a broader capability set for symbol creation plus NFT operations.
- Unified skill input/output style so integrations and collaboration are easier across teams.
- Improved failure feedback and maintenance-state handling, reducing disruption to main user flows.
- Organized Forest capabilities into P0/P1/P2 tiers for phased rollout and acceptance.
- Kept legacy tools available so migration can happen step by step without breaking existing usage.
Forest Skills (P0 / P1 / P2)
P0 (Core Trading Loop)
Workflow:
aelf-forest-create-collectionaelf-forest-create-itemaelf-forest-batch-create-itemsaelf-forest-list-itemaelf-forest-buy-nowaelf-forest-make-offeraelf-forest-deal-offeraelf-forest-cancel-offeraelf-forest-cancel-listingaelf-forest-transfer-itemaelf-forest-get-price-quote
Method (Contract):
aelf-forest-contract-marketaelf-forest-contract-multitokenaelf-forest-contract-token-adapteraelf-forest-contract-proxy
Method (API):
aelf-forest-api-marketaelf-forest-api-nftaelf-forest-api-collectionaelf-forest-api-syncaelf-forest-api-seed-auction
P1 (Growth)
Workflow:
aelf-forest-issue-itemaelf-forest-place-bidaelf-forest-claim-dropaelf-forest-query-dropaelf-forest-whitelist-readaelf-forest-whitelist-manage
Method (Contract):
aelf-forest-contract-auctionaelf-forest-contract-dropaelf-forest-contract-whitelist
Method (API):
aelf-forest-api-dropaelf-forest-api-whitelist
P2 (Extensions)
Workflow:
aelf-forest-ai-generateaelf-forest-ai-retryaelf-forest-create-platform-nftaelf-forest-miniapp-actionaelf-forest-update-profileaelf-forest-query-collectionsaelf-forest-watch-market-signals
Method (Contract):
aelf-forest-contract-miniapp
Method (API):
aelf-forest-api-aiaelf-forest-api-platformaelf-forest-api-miniappaelf-forest-api-useraelf-forest-api-systemaelf-forest-api-realtime
Quick Start
Prerequisites
- Bun >= 1.0
- An aelf wallet private key (EOA) or Portkey CA wallet credentials
Install
git clone https://github.com/eforest-finance/eforest-agent-skills.git
cd eforest-agent-skills
bun install
Configure
cp .env.example .env
# Edit .env and set network + signer fallback credentials
CLI Usage (Legacy)
# Check SEED price (dry-run)
bun run cli buy-seed --symbol MYTOKEN --issuer <your-address> --dry-run
# Buy SEED (max 2 ELF)
bun run cli buy-seed --symbol MYTOKEN --issuer <your-address> --force 2
# Create token on tDVV side chain
bun run cli create-token \
--symbol MYTOKEN --token-name "My Token" \
--seed-symbol SEED-321 \
--total-supply 100000000 --decimals 8 \
--issue-chain tDVV
# Issue tokens
bun run cli issue-token \
--symbol MYTOKEN --amount 10000000000000000 \
--to <recipient-address> --chain tDVV
MCP Server (Claude Desktop / Cursor)
One-command setup:
# Claude Desktop
bun run setup claude
# Cursor IDE (project-level)
bun run setup cursor
# Cursor IDE (global)
bun run setup cursor --global
# IronClaw (install trusted skill + stdio MCP server)
bun run setup ironclaw
# Check status
bun run setup list
# Remove IronClaw integration
bun run setup uninstall ironclaw
The MCP server auto-registers both legacy tools and all aelf-forest-* tools from the skill registry.
IronClaw
# Install trusted skill + stdio MCP server
bun run setup ironclaw
# Remove IronClaw integration
bun run setup uninstall ironclaw
The IronClaw setup does two things by default:
- Writes a stdio MCP server entry to
~/.ironclaw/mcp-servers.json - Copies this repo's
SKILL.mdto~/.ironclaw/skills/eforest-agent-skills/SKILL.md
Important trust model note:
- Use the trusted skill path above for SEED/token/NFT creation, listing, offer, trade, and other write-capable flows.
- Do not rely on
~/.ironclaw/installed_skills/for this package if you need on-chain or marketplace write actions. - IronClaw attenuates installed skills to read-only tools, which can make the agent appear to "query only" even though the MCP server is available.
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.
Remote activation contract:
- GitHub repo/tree URLs are discovery sources only, not the final IronClaw install payload.
- Preferred IronClaw activation from npm:
bunx -p @eforest-finance/agent-skills eforest-setup ironclaw - Prefer ClawHub / managed install for OpenClaw when available; otherwise use
bunx -p @eforest-finance/agent-skills eforest-setup openclaw - Local repo checkout remains a development smoke-test path only.
Manual MCP Config
EOA mode:
{
"mcpServers": {
"eforest-token": {
"command": "bun",
"args": ["run", "/path/to/eforest-agent-skills/src/mcp/server.ts"],
"env": {
"AELF_PRIVATE_KEY": "your_private_key",
"EFOREST_NETWORK": "mainnet"
}
}
}
}
CA mode:
{
"mcpServers": {
"eforest-token": {
"command": "bun",
"args": ["run", "/path/to/eforest-agent-skills/src/mcp/server.ts"],
"env": {
"PORTKEY_PRIVATE_KEY": "your_manager_private_key",
"PORTKEY_CA_HASH": "your_ca_hash",
"PORTKEY_CA_ADDRESS": "your_ca_address",
"EFOREST_NETWORK": "mainnet"
}
}
}
}
Cross-Skill signer context (recommended)
Write operations can resolve signer from shared wallet context first. Resolution order:
- explicit signer input (
privateKeyor CA tuple) - active context (
~/.portkey/skill-wallet/context.v1.json) - env fallback (
AELF_PRIVATE_KEYorPORTKEY_*)
When context points to encrypted wallet/keystore, pass password in tool input or use:
PORTKEY_WALLET_PASSWORDfor EOA wallet filesPORTKEY_CA_KEYSTORE_PASSWORDfor CA keystore files
Forest API Route Map (Config-first)
Method API skills use route mapping from environment variables by default:
EFOREST_FOREST_API_ACTION_MAP_JSON(preferred)FOREST_API_ACTION_MAP_JSON(fallback)
Example:
{
"aelf-forest-api-market": {
"fetchTokens": {
"method": "GET",
"path": "/app/market/tokens",
"auth": true
}
},
"aelf-forest-api-system": {
"fetchMyToken": {
"method": "GET",
"url": "https://www.eforest.finance/symbolmarket/api/app/token/my-token",
"auth": false,
"queryArrayFormat": "repeat"
}
},
"aelf-forest-api-sync": {
"fetchSyncCollection": {
"method": "POST",
"path": "/app/nft/sync",
"auth": true
}
}
}
fetchMyToken ships with a built-in default route to
https://www.eforest.finance/symbolmarket/api/app/token/my-token.
Environment route maps still override built-in defaults.
For endpoints like fetchMyToken that expect repeated query keys such as
AddressList=a&AddressList=b, set "queryArrayFormat": "repeat" in the route map.
SDK Usage
import {
getNetworkConfig,
dispatchForestSkill,
listForestSkills,
} from '@eforest-finance/agent-skills';
const config = await getNetworkConfig({ env: 'mainnet' });
console.log('registered forest skills:', listForestSkills().length);
const quote = await dispatchForestSkill(
'aelf-forest-get-price-quote',
{
env: 'mainnet',
payload: {
symbol: 'MY-NFT',
include: ['tokenData', 'txFee'],
},
},
{ config },
);
if (!quote.success) {
console.error(quote.code, quote.message);
} else {
console.log(quote.data);
}
Envelope & Error Contract
Successful response shape:
{
"success": true,
"code": "OK",
"data": {},
"warnings": [],
"traceId": "..."
}
Failure response shape:
{
"success": false,
"code": "SERVICE_DISABLED",
"message": "...",
"maintenance": true,
"retryable": false,
"traceId": "...",
"details": {}
}
Service Gating & Graceful Degradation
Key env vars
EFOREST_ENABLED_SERVICESEFOREST_DISABLED_SERVICESEFOREST_MAINTENANCE_SERVICESEFOREST_DISABLE_ALL_SERVICESEFOREST_SERVICE_<SERVICE_KEY_IN_UPPERCASE>
Examples:
# Disable AI and miniapp domains
export EFOREST_DISABLED_SERVICES="forest.ai.*,forest.miniapp.*"
# Put market skills into maintenance mode
export EFOREST_MAINTENANCE_SERVICES="forest.market.*"
# Disable a specific service key
export EFOREST_SERVICE_FOREST_MARKET_WORKFLOW=false
OpenClaw
Initialize
# 1) Regenerate catalog from Forest registry (3 legacy + 45 Forest skills)
bun run generate:openclaw
# 2) Generate standalone OpenClaw config
bun run setup openclaw
# 3) Or merge into an existing OpenClaw config
bun run setup openclaw --config-path /path/to/openclaw.json
Call Modes
structuredmode (12 high-frequency NFT skills): use direct parameters (symbol/price/chain/etc.).inputJsonmode (33 long-tail Forest skills): pass one JSON object string for full input.
Structured example (aelf-forest-list-item):
{
"symbol": "NFT-1",
"quantity": 1,
"priceSymbol": "ELF",
"priceAmount": 1.2,
"durationJson": "{\"hours\":24}",
"chain": "AELF",
"env": "mainnet"
}
inputJson example (aelf-forest-api-market):
{
"inputJson": "{\"action\":\"fetchTokens\",\"params\":{\"chainId\":\"AELF\",\"page\":1}}",
"env": "mainnet"
}
Common Failure Codes
INVALID_PARAMS: input mismatch with skill schema (missing fields/invalid enum/type).SERVICE_DISABLED: service key is disabled by environment switches.MAINTENANCE: service is under maintenance or route/config is unavailable.
Quick checks:
- verify parameters or
inputJsonshape - verify
EFOREST_DISABLED_SERVICES/EFOREST_MAINTENANCE_SERVICES - verify
EFOREST_FOREST_API_ACTION_MAP_JSONfor method-api routes
Architecture
Core forest dispatcher is modularized under src/core/forest/ (with src/core/forest.ts kept as a compatibility facade).
eforest-agent-skills/
├── lib/
│ ├── types.ts
│ ├── config.ts
│ ├── aelf-client.ts
│ ├── api-client.ts
│ ├── forest-envelope.ts
│ ├── forest-service.ts
│ ├── forest-skill-registry.ts
│ ├── forest-schemas.ts
│ └── forest-validator.ts
├── src/
│ ├── cli/
│ │ └── forest_skill.ts
│ ├── core/
│ │ ├── seed.ts
│ │ ├── token.ts
│ │ ├── issue.ts
│ │ ├── forest.ts
│ │ └── forest/
│ │ ├── index.ts
│ │ ├── dispatcher.ts
│ │ ├── executors/
│ │ └── workflow/
│ └── mcp/
│ └── server.ts
├── bin/
│ ├── setup.ts
│ ├── generate-openclaw.ts
│ └── platforms/
├── create_token_skill.ts
├── index.ts
├── openclaw.json
└── __tests__/
Configuration Priority
Settings are resolved in this order (highest priority first):
- Function params (SDK callers)
- CLI args (
--env,--rpc-url) EFOREST_*/AELF_*environment variables.envfile- CMS remote config
- Code defaults (
ENV_PRESETS)
Testing
bun test # All tests
bun test:unit # Unit tests only
bun test:integration # Integration tests only
bun test:e2e:smoke # Dry-run smoke e2e (PR gate)
bun test:e2e:full # Full dry-run e2e
bun test:e2e # Alias to test:e2e:full
Notes:
- e2e suite is dry-run deterministic and does not require on-chain write operations.
- CI e2e defaults do not depend on external test secrets.
IronClaw Smoke Test
- Run
bun run setup ironclaw - Ask a read prompt like
get a price quote for this eForest NFT listing - Ask a write prompt like
create a new eForest NFT collection - Ask a marketplace write prompt like
list this NFT on eForest - Confirm forest prompts stay on this skill and guardian, DAO, or DEX prompts do not
Branch Test Matrix
| Git Event | Branch/Ref | Suite | Gate Level |
|---|---|---|---|
pull_request |
main |
unit + integration + e2e:smoke |
Required |
push |
main |
unit + integration + e2e:full |
Required |
push |
v* tag |
publish.yml (includes bun test) |
Release Gate |
Environment Variables
| Variable | Description | Default |
|---|---|---|
AELF_PRIVATE_KEY |
aelf wallet private key (EOA mode) | — |
PORTKEY_PRIVATE_KEY |
Portkey Manager private key (CA mode) | — |
PORTKEY_CA_HASH |
Portkey CA hash (CA mode) | — |
PORTKEY_CA_ADDRESS |
Portkey CA address (CA mode) | — |
PORTKEY_WALLET_PASSWORD |
Optional password cache for EOA wallet context decryption | — |
PORTKEY_CA_KEYSTORE_PASSWORD |
Optional password cache for CA keystore context decryption | — |
PORTKEY_SKILL_WALLET_CONTEXT_PATH |
Override active wallet context path | ~/.portkey/skill-wallet/context.v1.json |
EFOREST_NETWORK / AELF_ENV |
mainnet or testnet |
mainnet |
EFOREST_API_URL / AELF_API_URL |
Backend API URL | auto |
EFOREST_RPC_URL / AELF_RPC_URL |
AELF MainChain RPC | auto |
EFOREST_RPC_URL_TDVV |
tDVV RPC URL | auto |
EFOREST_RPC_URL_TDVW |
tDVW RPC URL | auto |
EFOREST_ENABLED_SERVICES |
Comma-separated service whitelist patterns | empty (allow all) |
EFOREST_DISABLED_SERVICES |
Comma-separated service disable patterns | empty |
EFOREST_MAINTENANCE_SERVICES |
Comma-separated maintenance patterns | empty |
EFOREST_DISABLE_ALL_SERVICES |
Disable all forest services (true/false) |
false |
EFOREST_FOREST_API_ACTION_MAP_JSON |
Method-API action to route mapping JSON | empty |
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。