Skip to content

Update mcp server#41

Merged
Will-Guan merged 35 commits intomainfrom
update-mcp-server
Apr 10, 2026
Merged

Update mcp server#41
Will-Guan merged 35 commits intomainfrom
update-mcp-server

Conversation

@jizhen181-dot
Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

Code Review Report

Project: BankOfAI Docs
PR: mainupdate-mcp-server
Review Date: 2026-04-07
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main
To Branch update-mcp-server
Commits 17
Files Changed 24
Lines Added +1,688
Lines Removed -33

Commit History

Hash Message
3335240 add gas free
5a8e320 fix
88c765c add sun-cli
1d5c13a Merge pull request #37 from BofAI/update-mcp-server
781a1f4 Merge pull request #39 from BofAI/ai-bankofai-patch-1
1594cb7 update version
e03b329 Update API.md
57d7156 Create audit-pr.yml

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 1 4 3

Summary

This PR adds two categories of documentation changes: (1) a full suite of SUN CLI documentation (Introduction, Quick Start, Command Guide, and FAQ) in both English and Simplified Chinese, and (2) updates across existing x402 payment documentation to introduce a new exact_gasfree payment scheme and to soften the requirement for a TronGrid API key by routing mainnet RPC calls through a BankOfAI-operated fallback endpoint.

The SUN CLI documentation is well-structured, thorough, and closely follows the style of existing docs. The exact_gasfree additions are clearly explained across all affected pages. The bilingual parity is maintained well with Chinese translations mirroring the English content accurately.

One Major issue is present: the FAQ for SUN CLI links to a third-party personal GitHub repository (nicholaskarlson/sun-cli) instead of an official project repository, which could mislead users filing issues or reading source code. Four Minor issues cover a split in environment variable naming conventions across product docs (TRONGRID_API_KEY vs TRON_GRID_API_KEY), a missing network-scope clarification for exact_gasfree in the SDK features table, insufficient risk warnings on low-level swap commands, and an implicit trust dependency on the BankOfAI proxy that deserves more explicit acknowledgment.


Change Summary

Group 1 — New SUN CLI Documentation (English + Chinese)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md Added Introduction page: what SUN CLI is, feature matrix, CLI vs MCP comparison, output modes, networks, security notes
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Added Step-by-step install guide, first queries, wallet setup, testnet swap, env var reference
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Added Full command reference: global flags, wallet/portfolio, price/discovery, swap, liquidity (V2/V3/V4), protocol history, generic contract, built-in token symbol table
docs/McpServer-Skills/MCP/SUNCli/FAQ.md Added Common errors, wallet configuration, AI agent integration, network/token questions
i18n/zh-Hans/.../SUNCli/Intro.md Added Simplified Chinese translation of Intro
i18n/zh-Hans/.../SUNCli/QuickStart.md Added Simplified Chinese translation of QuickStart
i18n/zh-Hans/.../SUNCli/CommandGuide.md Added Simplified Chinese translation of CommandGuide
i18n/zh-Hans/.../SUNCli/FAQ.md Added Simplified Chinese translation of FAQ
sidebars.js Modified Added SUN CLI category under MCP section
i18n/zh-Hans/.../sidebars.js Modified Added same SUN CLI category for Chinese locale

Purpose: Document the @bankofai/sun-cli npm package, enabling human operators and AI agents to interact with SunSwap DeFi directly from the terminal.


Group 2 — x402 exact_gasfree Scheme Documentation

File Change Type Description
docs/x402/core-concepts/network-and-token-support.md Modified Added exact_gasfree scheme section; updated payment scheme count from two to three; table updated
docs/x402/faq.md Modified Expanded payment scheme answer to include exact_gasfree
docs/x402/sdk-features.md Modified Added exact_gasfree/tron, SufficientBalancePolicy, GasFree, and USDD (TRC-20) entries
docs/x402/getting-started/quickstart-for-human.md Modified Added Python and TypeScript code examples for ExactGasFreeClientMechanism
docs/x402/getting-started/quickstart-for-agent.md Modified Softened TronGrid API key note; added fallback endpoint explanation
docs/x402/getting-started/quickstart-for-sellers.md Modified Same TronGrid fallback language update
docs/x402/index.md Modified Bolded TRON and BSC in intro paragraph
i18n/zh-Hans/... (x402 files) Modified Chinese locale mirrors all of the above changes
i18n/zh-Hans/.../sdk-features.md Modified Also corrects BSC network IDs from bsc:mainnet/testnet to eip155:56/97

Purpose: Document the newly shipped exact_gasfree payment scheme (zero-gas TRON payments via BankOfAI GasFree proxy) and reflect the new TronGrid fallback behavior across all relevant pages.


Detailed Findings


Major

[MJ-01] FAQ Links to Third-Party Personal GitHub Repository

Property Value
Severity Major
Category Documentation
File docs/McpServer-Skills/MCP/SUNCli/FAQ.md : Line 133

Description

The "Still Need Help?" section directs users to file issues on https://github.com/nicholaskarlson/sun-cli. This is a third-party personal GitHub account, not an official BankOfAI or BofAI organization repository. Users who follow this link to report bugs or read source code will be directed to the wrong project. The Chinese translation (i18n/zh-Hans/.../FAQ.md, line 133) contains the same incorrect link.

Code

If your question isn't covered here, check the [Command Guide](./CommandGuide.md) for detailed usage,
or file an issue on the [GitHub repository](https://github.com/nicholaskarlson/sun-cli).

Recommendation

Replace with the official BofAI repository URL. If the public repository is:
  https://github.com/BofAI/sun-cli

then:

or file an issue on the [GitHub repository](https://github.com/BofAI/sun-cli).

Apply the same fix in i18n/zh-Hans/.../FAQ.md.

Minor

[MN-01] Inconsistent TronGrid API Key Environment Variable Name Across Product Docs

Property Value
Severity Minor
Category Documentation
File docs/McpServer-Skills/MCP/SUNCli/QuickStart.md : Line 134 vs docs/x402/getting-started/quickstart-for-agent.md : Line 63

Description

The SUN CLI QuickStart.md uses TRONGRID_API_KEY, while all x402 documentation (also modified in this PR) consistently uses TRON_GRID_API_KEY. Both refer to the same TronGrid API credential concept. A user who follows the x402 agent quickstart, sets TRON_GRID_API_KEY, then moves to SUN CLI docs will be told to set TRONGRID_API_KEY — and may not realize these are two different variables for two different tools. The inconsistency can cause user confusion especially since the documentation is cross-linked.

Code

# QuickStart.md (SUN CLI) — line 134
export TRONGRID_API_KEY="<YOUR_KEY>"

# quickstart-for-agent.md (x402) — line 63
export TRON_GRID_API_KEY="your_trongrid_api_key_here"

Recommendation

Determine the canonical variable name for each respective SDK/tool and note clearly in both documents that these are separate products with separate variable names. If the names are intentionally different, add a short callout box in each QuickStart noting the distinction. Example in QuickStart.md:

> **Note:** SUN CLI uses `TRONGRID_API_KEY`. The x402 SDK uses a separate variable `TRON_GRID_API_KEY`. These are distinct products and the variable names are not interchangeable.

[MN-02] exact_gasfree Network Scope Ambiguous in SDK Features Table

Property Value
Severity Minor
Category Documentation
File docs/x402/sdk-features.md : Line 49 (after patch)

Description

The SDK features table adds exact_gasfree/tron listed alongside exact_permit/tron, exact/tron, etc. However, the narrative documentation clearly states that exact_gasfree is only available on tron:mainnet and tron:nile — it is NOT available on tron:shasta. The table row gives no indication of this network restriction, unlike the prose description that explicitly enumerates the supported networks. This discrepancy between table and prose could lead developers to attempt to use exact_gasfree on Shasta and receive confusing errors.

Code

| exact_gasfree/tron |||

Recommendation

| exact_gasfree/tron (mainnet & nile only) |||

Apply the same fix in i18n/zh-Hans/.../sdk-features.md.


[MN-03] Low-Level Swap Commands Lack Sufficient Risk Warnings

Property Value
Severity Minor
Category Documentation
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Lines 218–231

Description

The swap:quote-raw and swap:exact-input commands are documented with minimal context. swap:exact-input directly executes a swap via a specific router using raw --args JSON, bypassing the high-level routing layer. Unlike the top-level swap command, these low-level commands have no built-in slippage protection, no route validation, and accept raw contract arguments that — if malformed or incorrect — could result in permanent loss of funds. The documentation section provides only a one-line description and example without any caution statement.

Code

### `swap:exact-input`

Low-level exact-input swap via a specific router.

```bash
sun swap:exact-input --router <routerAddress> --args '[...]' --value 1000000

**Recommendation**

> Add a warning admonition before the low-level command section:
>
> ```markdown
> :::danger Low-level commands
> `swap:quote-raw` and `swap:exact-input` bypass the high-level routing engine.
> They require raw contract call arguments and do not perform route validation or
> slippage protection. Incorrect arguments may result in **permanent fund loss**.
> Only use these commands if you have deep familiarity with the SunSwap router ABI.
> For most use cases, prefer `swap` and `swap:quote`.
> :::
> ```

---

#### [MN-04] BankOfAI Proxy Trust Model Not Disclosed for `exact_gasfree`

| Property | Value |
|----------|-------|
| **Severity** | Minor |
| **Category** | Documentation / Security |
| **File** | `docs/x402/core-concepts/network-and-token-support.md` : Lines 837–843 |

**Description**

> The `exact_gasfree` scheme documentation highlights that "no API keys required" because all GasFree API calls are routed through the BankOfAI proxy at `https://facilitator.bankofai.io/{mainnet,nile}`. While convenience is mentioned, the documentation does not disclose the trust implications: users are routing all their GasFree settlement requests through BankOfAI's infrastructure. If this proxy is unavailable, compromised, or exhibits unexpected behavior, `exact_gasfree` payments will fail or be handled in a non-transparent manner. Users should be informed they are trusting a third-party intermediary, not a permissionless on-chain path.

**Code**

```markdown
- **No API keys required**: All GasFree API calls route through the BankOfAI proxy at
  `https://facilitator.bankofai.io/{mainnet,nile}`, so clients do not need to configure
  `GASFREE_API_KEY` or `GASFREE_API_SECRET`

Recommendation

Add a transparency note:

- **No API keys required**: All GasFree API calls route through the BankOfAI proxy at
  `https://facilitator.bankofai.io/{mainnet,nile}`, so clients do not need to configure
  `GASFREE_API_KEY` or `GASFREE_API_SECRET`. Note that this means settlement requests
  pass through BankOfAI-operated infrastructure. Users who require a fully permissionless
  or self-hosted setup should deploy their own GasFree proxy and configure it directly.

Suggestions

[S-01] Token Decimal Unit Explanation Should Be Co-Located with Token Table

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Lines 358–383

Description: The built-in token symbol table lists decimal counts (e.g., USDD = 18, TRX = 6) but does not remind readers that all command amounts must be expressed in the smallest unit (e.g., 1000000 = 1 TRX). This explanation exists in the FAQ but not in the Command Guide where users will most likely consult the token table while writing commands.

Suggestion: Add a brief note below the table:

> **Amount units:** All command amounts are expressed in the token's smallest unit.
> For TRX (6 decimals), `1000000` = 1 TRX. For USDD (18 decimals), `1000000000000000000` = 1 USDD.

[S-02] Consider Adding --dry-run Example for Liquidity Commands

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Lines 236–290 (Liquidity section)

Description: The Swap section mentions that --dry-run is available globally and returns intent without broadcasting. The Liquidity section (which covers potentially large transactions: V2, V3, V4 mint/increase/decrease/collect) does not include any --dry-run example. Given that liquidity operations are higher-risk write operations, a prominent dry-run example would reinforce the safety-first message already established in the Security Notes.

Suggestion: Add a dry-run example at the top of the Liquidity section, similar to how it is shown in the Global Flags section.


[S-03] Chinese SDK Features Table Also Should Clarify exact_gasfree Network Scope

File: i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/sdk-features.md

Description: Same issue as MN-02 applies to the Chinese locale file. This is listed as a separate suggestion since it is a translation file, but it requires the same fix as the English source.

Suggestion: Apply the same network-scope annotation (仅限 mainnet 和 nile) to the exact_gasfree/tron row in the zh-Hans sdk-features table.


Positive Observations

Area Observation
Security warnings The SUN CLI docs include well-placed security callout boxes (:::warning, :::caution, :::tip) discouraging hardcoded private keys and encouraging testnet-first workflows
Bilingual parity All 8 new SUN CLI pages and all modified x402 pages have matching Chinese translations with accurate content — no missing sections or stale translations observed
Cross-linking Internal links between Intro, QuickStart, CommandGuide, and FAQ are consistent in both English and Chinese, and correctly use relative paths
Sidebar consistency Both sidebars.js (EN) and the zh-Hans sidebars.js add the SUN CLI category with the same ordering (Intro → QuickStart → CommandGuide → FAQ), which is logical and consistent with other MCP tool sections
BSC network ID correction The zh-Hans sdk-features.md correctly updates bsc:mainnet / bsc:testnet to the canonical EIP-155 chain identifiers eip155:56 / eip155:97, aligning with the English source
exact_gasfree code examples The Python and TypeScript integration examples in quickstart-for-human.md are complete, correct, and show both languages registering the new mechanism side-by-side — reducing integration friction
TronGrid fallback documentation The updated TronGrid API key language clearly explains the new fallback behavior without being alarmist, and is consistently applied across agent, human, and seller quickstart guides

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 5 4 1 2 MN-02: network scope inconsistency in table vs prose
Security 6 4 2 2 MN-03: missing low-level command warning; MN-04: undisclosed proxy trust model
Performance 3 0 0 3 Not applicable to documentation changes
Code Quality 5 4 1 1 MN-01: env var naming inconsistency
Testing 4 0 0 4 No code changes; test coverage N/A
Documentation 6 5 1 0 MJ-01: incorrect external repository link
Compatibility 3 3 0 0 Sidebar and i18n changes are additive and backward compatible
Observability 2 0 0 2 Not applicable to documentation changes

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between main and update-mcp-server. Runtime behavior, integration testing, and deployment impact are not covered.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-07

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

Code Review Audit Report

Date: 2026-04-07
PR: update-mcp-servermain
Reviewer: Claude Sonnet 4.6 (Automated Audit)
Verdict: Approve with Minor Suggestions


1. PR Overview

Field Details
Source Branch remotes/origin/update-mcp-server
Target Branch remotes/origin/main
Commits 4 (add cuncli, add gas free, fix, add sun-cli)
Files Changed 24
Lines Added ~1,736
Lines Removed ~33

Commits (oldest to newest)

88c765c add sun-cli
5a8e320 fix
3335240 add gas free
d69c9eb add cuncli

Files Changed

New files (8):

  • docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md
  • docs/McpServer-Skills/MCP/SUNCli/FAQ.md
  • docs/McpServer-Skills/MCP/SUNCli/Intro.md
  • docs/McpServer-Skills/MCP/SUNCli/QuickStart.md
  • i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNCli/CommandGuide.md
  • i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNCli/FAQ.md
  • i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNCli/Intro.md
  • i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNCli/QuickStart.md

Modified files (16):

  • sidebars.js
  • i18n/zh-Hans/docusaurus-plugin-content-docs/current/sidebars.js
  • docs/x402/core-concepts/network-and-token-support.md
  • docs/x402/faq.md
  • docs/x402/getting-started/quickstart-for-agent.md
  • docs/x402/getting-started/quickstart-for-human.md
  • docs/x402/getting-started/quickstart-for-sellers.md
  • docs/x402/index.md
  • docs/x402/sdk-features.md
  • And their Chinese (zh-Hans) counterparts

2. Change Summary

Group A — SUN CLI Documentation (New Feature)

Four new documentation pages introduce the @bankofai/sun-cli npm package, a command-line tool for interacting with the SunSwap DEX on TRON:

  • Intro.md — Overview, feature comparison with SUN MCP Server, output modes, security notes
  • QuickStart.md — Installation, first query, wallet configuration, environment variables
  • CommandGuide.md — Full command reference for all CLI operations (wallet, price, swap, liquidity, protocol, contract)
  • FAQ.md — Common questions, troubleshooting, error messages

Chinese (zh-Hans) translations of all four pages are provided simultaneously.

Group B — exact_gasfree Payment Scheme Documentation (Feature Addition)

Existing x402 documentation is updated to surface a new TRON-only payment scheme that allows buyers to pay USDT/USDD without holding TRX for gas:

  • network-and-token-support.md — New scheme description added
  • faq.md — Payment schemes FAQ answer updated from 2 to 3 schemes
  • sdk-features.md — New rows added for exact_gasfree/tron, SufficientBalancePolicy, GasFree, and USDD (TRC-20) token support
  • quickstart-for-human.md — Code samples updated to register ExactGasFreeClientMechanism
  • quickstart-for-agent.md — Commentary updated (TronGrid API key no longer described as required for mainnet)
  • quickstart-for-sellers.md — Same TronGrid API key wording update
  • index.md — Minor: "TRON and BSC" changed to "TRON and BSC" (bold)

All above changes are also mirrored in Chinese translations.

Group C — Sidebar Navigation Updates

Both sidebars.js (English root) and its Chinese counterpart gain a new "SUN CLI" category node under "MCP Server":

{
  type: 'category',
  label: 'SUN CLI',
  collapsed: true,
  items: [
    'McpServer-Skills/MCP/SUNCli/Intro',
    'McpServer-Skills/MCP/SUNCli/QuickStart',
    'McpServer-Skills/MCP/SUNCli/CommandGuide',
    'McpServer-Skills/MCP/SUNCli/FAQ',
  ],
},

Additionally, the Chinese sdk-features.md fixes incorrect BSC network identifiers (bsc:mainneteip155:56, bsc:testneteip155:97).


3. Detailed Findings

Critical

No critical findings.


Major

[M-01] Private Key Passed as Plaintext CLI Flag in Documentation Examples (Major)

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Lines ~30–35
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Lines ~55–70 (similar)

Description:
The Command Guide and QuickStart include example commands that pass private keys via the -k flag inline on the command line:

sun -k your_private_key --network nile --yes swap TRX USDT 1000000

While the Intro page (Intro.md) does contain a security warning about not hardcoding keys in shared environments, the examples in CommandGuide.md appear without any co-located caution admonition. Users who copy-paste these examples in scripts or CI pipelines risk shell history exposure of their private keys. The juxtaposition of a working example with a key placeholder and no adjacent warning creates a false comfort.

Recommendation:
Add an admonition (e.g., :::caution) immediately adjacent to any example using -k or -m flags in CommandGuide.md, pointing to the agent-wallet encrypted storage approach. The QuickStart already includes a similar caution block, so the same pattern should be applied consistently in CommandGuide.md.


[M-02] Inconsistency in TronGrid API Key Requirement Across Documentation (Major)

Files:

  • docs/x402/getting-started/quickstart-for-agent.md
  • docs/x402/getting-started/quickstart-for-sellers.md

Description:
The PR updates the commentary around TRON_GRID_API_KEY to say it is "recommended for production workloads" and that "when not set, mainnet RPC calls are automatically routed to a BankOfAI-operated fallback endpoint." However, the old main branch text in quickstart-for-agent.md stated it was "required for mainnet." The new behavior (auto-fallback via BankOfAI proxy) is a meaningful functional change being documented here without any changelog or explanation of what changed in the underlying SDK/infrastructure.

Users who read this document on main may have already configured their systems expecting the key to be mandatory. Users reading the updated text may incorrectly assume the fallback is production-grade without understanding its rate limits or SLA. The documentation does not clarify: is the BankOfAI fallback endpoint rate-limited? Is it available in all regions? What happens if it goes down?

Recommendation:
Add a brief note explaining the fallback endpoint characteristics (reliability expectations, rate limits if any) so readers can make an informed decision about whether to configure their own TronGrid API key.


Minor

[m-01] deepseek-v3.2 Model Removed from sidebars.js Without Explanation (Minor)

File: sidebars.js

Description:
The main branch version of sidebars.js includes 'llmservice/models/deepseek-v3.2' in the LLM Service models list. The update-mcp-server branch version does not include it. This removal is not mentioned in any commit message and appears incidental — likely an unintentional merge artifact from a branch that predates the deepseek-v3.2 entry on main.

Code (main branch, present):

'llmservice/models/deepseek-v3.2',

Code (update-mcp-server branch, absent): (entry missing)

Recommendation:
Verify whether this omission is intentional. If not, add the entry back to avoid a broken or missing navigation item for the deepseek-v3.2 model page after merge.


[m-02] exact_gasfree TypeScript Support Marked as Fully Implemented Without Code Evidence (Minor)

File: docs/x402/sdk-features.md Lines ~49–50
i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/sdk-features.md

Description:
The SDK feature matrix marks exact_gasfree/tron as ✅ | ✅ for both Python and TypeScript. However, the TypeScript SDK (@bankofai/x402) being for a TypeScript implementation of exact_gasfree should be verified. The SDK feature matrix for other components (e.g., Server, Facilitator) correctly uses for TypeScript, signaling incomplete TypeScript parity. If GasFreeClientMechanism is genuinely implemented in TypeScript, this is fine; if it is only partially implemented or the TypeScript import shown in code examples is client-side only (not facilitator), the matrix may be overstating TypeScript coverage.

Recommendation:
Verify the TypeScript exact_gasfree support is complete and production-ready before marking it . If there are known limitations (e.g., no server/facilitator support), add a footnote or use as is done elsewhere.


[m-03] USDD (TRC-20) Omission from Chinese SDK Feature Matrix Pre-PR (Minor)

File: i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/sdk-features.md

Description:
This PR correctly adds the missing USDD (TRC-20) row to both the English and Chinese SDK feature matrix. However, in the Chinese version, the Supported Tokens table previously used bsc:mainnet/bsc:testnet as network identifiers instead of the canonical eip155:56/eip155:97 identifiers used everywhere else. This PR also fixes these incorrect identifiers, which is a welcome correction. No issue to raise — this is a pre-existing bug being fixed.


[m-04] Missing slippage Flag Documentation in CommandGuide (Minor)

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md

Description:
The swap command section shows a --slippage flag in the example:

sun swap TRX USDT 1000000 --slippage 0.005

However, no documentation of this flag (acceptable value range, default value, meaning of 0.005 = 0.5%?) is provided. A user unfamiliar with slippage conventions could easily pass an incorrect value (e.g., 0.5 meaning 50% slippage rather than 0.5%).

Recommendation:
Add inline documentation of the --slippage flag to the swap command section, including the value format (decimal fraction vs. percentage), default value, and recommended range.


[m-05] sun swap:exact-input Command Lacks Meaningful Documentation (Minor)

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md

Description:
The swap:exact-input command entry reads:

Low-level exact-input swap via a specific router.
sun swap:exact-input --router <routerAddress> --args '[...]' --value 1000000

The --args parameter is a raw array with no schema described. Users attempting to use this command have no guidance on what the array should contain, what the --router address should be, or what format --value expects. This is a low-level escape hatch that could result in fund loss if misused.

Recommendation:
Either expand the documentation with the expected argument schema, or add a :::warning admonition that this is an advanced command intended for SDK developers, directing regular users to sun swap instead.


[m-06] Quickstart Step 3 Code Example Uses Hardcoded Demo URL Without Noting It May Be Unavailable (Minor)

File: docs/McpServer-Skills/MCP/SUNCli/QuickStart.md

Description:
The QuickStart guide instructs users to run:

sun price TRX

This is fine and doesn't require a demo URL. However, for wallet-based operations, the guide references agent-wallet without mentioning that the demo endpoint https://x402-demo.bankofai.io/protected-nile referenced in the x402 quickstart guides (cross-linked from SUN CLI QuickStart) may have uptime considerations. The SUN CLI itself relies on the SunSwap API — there is no mention of what happens if the SunSwap API is unavailable (no retry guidance, no fallback RPC).

Recommendation:
Consider adding a brief note in the FAQ or QuickStart about what to do when the upstream SunSwap API is unavailable, or reference the TRON_RPC_URL environment variable already mentioned in the QuickStart for custom RPC fallback.


Suggestions

[S-01] Consider Cross-Linking SUN CLI Intro to the SUN MCP Server Documentation

File: docs/McpServer-Skills/MCP/SUNCli/Intro.md

Description:
The Intro page has an excellent comparison table between SUN CLI and SUN MCP Server. It cross-links to QuickStart, CommandGuide, and FAQ, but does not cross-link to the SUN MCP Server documentation. Adding a link to ../SUNMCPServer/Intro.md in the "Next Steps" section or comparison table would improve discoverability for users who realize after reading they want MCP Server instead.

Recommendation:
Add a "See also: SUN MCP Server" link in the Next Steps section.


[S-02] Token Decimal Table in CommandGuide Could Include More Common Tokens

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md

Description:
The built-in token symbol table is helpful but incomplete — it does not include TUSD, USDC, or other TRC-20 tokens that users may commonly trade on SunSwap. The current set (TRX, WTRX, USDT, USDCOLD, USDD, SUN, JST, BTT, WIN) is reasonable for an initial release, but a note about where to find additional supported symbols (e.g., by running sun token list) would reduce user confusion.

Recommendation:
Add a line like "To discover additional supported token symbols, run sun token search <name> or sun token list --protocol V3."


[S-03] quickstart-for-human.md Code Sample Inconsistency Between TRON Sections (Python)

File: docs/x402/getting-started/quickstart-for-human.md

Description:
The PR updates the TRON Python code sample to include ExactGasFreeClientMechanism in addition to ExactPermitTronClientMechanism. This is correct and improves coverage. However, the sample now instantiates gasfree_clients as a module-level dict with both tron:nile and tron:mainnet entries before the async def main() function. This pattern is slightly unusual for an introductory quickstart example since it involves understanding NetworkConfig.get_gasfree_api_base_url() before even explaining what GasFree is. The TypeScript equivalent creates the GasFreeAPIClient inline inside main().

Recommendation:
Move the gasfree_clients dict inside async def main() for consistency with the TypeScript pattern, or add a brief comment explaining why module-level initialization is used here.


4. Positive Observations

  1. Comprehensive dual-language coverage. Every new English document has a corresponding Chinese (zh-Hans) translation added in the same PR. This is excellent practice for an internationalized documentation site and avoids translation lag.

  2. Strong security posture in SUN CLI docs. The Intro.md contains a prominent :::warning admonition covering private key hygiene, testnet-first practice, dry-run usage, and minimum-funds principles. This level of security guidance is exemplary for DeFi tooling documentation.

  3. Consistent sidebar navigation. Both sidebars.js (English) and the Chinese counterpart are updated in sync, and the new "SUN CLI" category follows the exact same structural pattern as the existing "TRON MCP Server", "SUN MCP Server", and "BSC MCP Server" categories.

  4. Structured command reference. The CommandGuide.md is well-organized with clear headings, inline code examples for every command variant, and a built-in token symbol table with addresses and decimals. This is significantly more useful than many CLI reference documents.

  5. Testnet-first emphasis throughout. Multiple documents, particularly QuickStart.md and quickstart-for-human.md, consistently emphasize using Nile testnet before mainnet. This is appropriate best practice for DeFi tooling.

  6. Bug fix included in PR. The correction of bsc:mainnet/bsc:testnet to canonical eip155:56/eip155:97 identifiers in the Chinese SDK feature matrix (a pre-existing error) is a welcome cleanup bundled into this PR.

  7. SufficientBalancePolicy and USDD additions to SDK matrix. Previously absent from the feature matrix, these are now correctly documented as supported in both Python and TypeScript, improving accuracy of the SDK comparison.

  8. exact_gasfree explained at multiple levels. The scheme is documented in the conceptual reference (network-and-token-support.md), the FAQ, the SDK feature matrix, and the quickstart code examples — providing appropriate coverage depth across different reader personas.


5. Review Verdict

Approve (with minor suggestions)

This PR is a documentation-only change introducing:

  1. A complete new documentation section for the SUN CLI tool (4 pages + Chinese translations)
  2. Documentation of the new exact_gasfree payment scheme across all relevant existing pages

There are no code logic changes, no application code modifications, and no configuration changes that could cause production failures.

The one item that warrants attention before merge is [m-01] (the potential unintentional removal of deepseek-v3.2 from sidebars.js). If this model page exists in the deployed site and the sidebar entry is dropped, it will become orphaned (still accessible by direct URL but no longer reachable through navigation). This should be confirmed and the entry restored if the omission is unintentional.

All other findings are minor quality improvements or suggestions that can be addressed in follow-up PRs without blocking this merge.


Report generated: 2026-04-07

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

Code Review Report

Project: BankOfAI Docs
PR: mainupdate-mcp-server
Review Date: 2026-04-07
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main (remotes/origin/main)
To Branch update-mcp-server (remotes/origin/update-mcp-server)
Commits 20 (since divergence from main)
Files Changed 24
Lines Added +2,638
Lines Removed -33

Commit History (recent, feature-relevant)

Hash Message
0712c70 add suncli
d69c9eb add cuncli
3335240 add gas free
5a8e320 fix
88c765c add sun-cli

Review Summary

Verdict

Verdict: Request Changes

A small number of issues should be addressed before merge — one confirmed documentation error (wrong flag name in a code example) and one environment-variable naming inconsistency. Everything else is either a suggestion or a positive practice.

Findings at a Glance

Critical Major Minor Suggestion
Count 0 1 2 3

Summary

This PR is a documentation-only change that introduces four new pages documenting the SUN CLI (@bankofai/sun-cli) tool and its Chinese translations, adds the exact_gasfree payment scheme to the x402 protocol documentation, and updates the TRON_GRID_API_KEY guidance across multiple quickstart guides to accurately reflect the BankOfAI fallback RPC endpoint behavior.

Overall the documentation is thorough, well-structured, and security-conscious — prominently warning users about private key hygiene, testnet-first practices, and --dry-run usage. The bilingual (English + Simplified Chinese) rollout is a positive practice.

One Major issue was identified: a copy-paste error in the CommandGuide.md that uses the wrong option flag name in a v2:add example, which will directly mislead users into using a non-existent option. Two Minor issues cover an environment variable naming inconsistency (TRONGRID_API_KEY vs TRON_GRID_API_KEY) and missing security callout proximity in the command reference. Three Suggestions cover transparency on the fallback endpoint, lack of tron:shasta support explanation for exact_gasfree, and the absence of error-handling guidance in contract interaction docs.


Change Summary

1. SUN CLI Documentation (New)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md Added Introduction, feature matrix, comparison with SUN MCP Server, security notes
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Added Installation and first-run walkthrough, wallet setup, environment variables
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Added Complete reference for all 30+ CLI commands across 12 categories
docs/McpServer-Skills/MCP/SUNCli/FAQ.md Added Troubleshooting, common errors, AI agent integration guidance
i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNCli/*.md Added Simplified Chinese translations of all four files above

Purpose: Introduce full user-facing documentation for @bankofai/sun-cli, a new command-line DeFi tool for interacting with the SunSwap ecosystem on TRON.


2. Navigation Update

File Change Type Description
sidebars.js Modified Added SUN CLI category under MCP Server section with four page entries
i18n/zh-Hans/.../sidebars.js Modified Identical sidebar addition for Chinese locale

Purpose: Register the new SUN CLI pages in the Docusaurus sidebar navigation.


3. exact_gasfree Payment Scheme Documentation

File Change Type Description
docs/x402/core-concepts/network-and-token-support.md Modified Added exact_gasfree scheme section; minor trailing-whitespace cleanup
docs/x402/faq.md Modified Updated payment scheme FAQ answer to include exact_gasfree
docs/x402/sdk-features.md Modified Added exact_gasfree/tron, SufficientBalancePolicy, GasFree, and USDD rows to feature tables
docs/x402/getting-started/quickstart-for-human.md Modified Added Python and TypeScript code examples using ExactGasFreeClientMechanism
i18n/zh-Hans/.../quickstart-for-human.md Modified Chinese translation of the above code example additions
i18n/zh-Hans/.../x402/ (multiple) Modified Chinese translations for the x402 content updates

Purpose: Document the new zero-gas TRON payment mechanism that lets buyers pay without holding TRX.


4. TronGrid API Key Guidance Update

File Change Type Description
docs/x402/getting-started/quickstart-for-agent.md Modified Changed "required for mainnet" → explains automatic BankOfAI fallback endpoint when key is not set
docs/x402/getting-started/quickstart-for-sellers.md Modified Same language update in .env comments and mainnet deployment checklist
i18n/zh-Hans/... (same files) Modified Chinese translations of the above

Purpose: Accurately document the actual behavior — that RPC calls fall back to a BankOfAI-operated endpoint instead of failing when TRON_GRID_API_KEY is not provided.


Detailed Findings


Major

[MJ-01] Wrong Option Flag in v2:add Example

Property Value
Severity Major
Category Documentation / Correctness
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Line 337

Description

The liquidity v2:add single-sided example uses --amount0, which is the V3/V4 flag naming convention. The v2:add command's option table (three lines above) correctly defines the flag as --amount-a. A user following this example verbatim will pass an unrecognised flag, causing the command to silently ignore the amount or error out.

Code

<!-- Option table (correct) -->
| `--amount-a <raw>` | Amount of token A (raw units) ||
| `--amount-b <raw>` | Amount of token B (raw units) ||

...

> Provide at least one of `--amount-a` or `--amount-b`. When only one is given, the other is auto-calculated from pool reserves.

<!-- Example below (incorrect: uses --amount0 instead of --amount-a) -->
sun liquidity v2:add --token-a TRX --token-b USDT --amount0 1000000

Recommendation

sun liquidity v2:add --token-a TRX --token-b USDT --amount-a 1000000

The same error is present in the Chinese translation at i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNCli/CommandGuide.md and should be fixed there simultaneously.


Minor

[MN-01] Environment Variable Naming Inconsistency: TRONGRID_API_KEY vs TRON_GRID_API_KEY

Property Value
Severity Minor
Category Documentation / Consistency
File docs/McpServer-Skills/MCP/SUNCli/QuickStart.md : Lines 1270

Description

The SUN CLI QuickStart page exports TRONGRID_API_KEY (no underscore between TRON and GRID), while the x402 quickstart guides (quickstart-for-agent.md, quickstart-for-sellers.md) consistently use TRON_GRID_API_KEY. Users who configure the environment using the SUN CLI QuickStart guide will set an incorrectly named variable that the x402 SDK will not recognise.

Code

# SUNCli/QuickStart.md (incorrect)
export TRONGRID_API_KEY="<YOUR_KEY>"

# quickstart-for-agent.md (correct, consistent)
export TRON_GRID_API_KEY="your_trongrid_api_key_here"

Recommendation

Update SUNCli/QuickStart.md (and its Chinese translation) to use TRON_GRID_API_KEY:

export TRON_GRID_API_KEY="<YOUR_KEY>"

[MN-02] CommandGuide.md Has No Inline Security Warning Near Sensitive Flags

Property Value
Severity Minor
Category Documentation / Security
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Lines 26-29

Description

The global flags table lists -k, --private-key <key> and -m, --mnemonic <phrase> without any adjacent caution that these values will appear in shell history. The Intro.md page contains a :::warning admonition about this, but users reading the command reference directly may miss it. Given that this is a DeFi tool with real on-chain assets at stake, the risk of command-history exposure warrants a visible inline note in the reference guide.

Code

| `-k, --private-key <key>` | Provide a private key for this invocation only |
| `-m, --mnemonic <phrase>` | Provide a mnemonic for this invocation only |

Recommendation

Add a short :::caution admonition immediately after the global flags table:

:::caution Shell history exposure
Flags `-k` and `-m` place your private key or mnemonic directly in the shell command line,
which may be recorded in shell history. Prefer `AGENT_WALLET_PRIVATE_KEY` / `AGENT_WALLET_MNEMONIC`
environment variables, or use agent-wallet's encrypted storage.
:::

Suggestions

[S-01] BankOfAI Fallback Endpoint: Add Explicit Privacy Note

File: docs/x402/getting-started/quickstart-for-agent.md, quickstart-for-sellers.md

Description: The updated docs now disclose that mainnet RPC calls are automatically routed through a BankOfAI-operated fallback endpoint when TRON_GRID_API_KEY is not set. However, there is no note explaining what data is forwarded (e.g., transaction payloads, addresses) or what privacy/SLA guarantees apply to this endpoint. Users with stricter data residency or privacy requirements may be silently routing sensitive blockchain queries through a third-party proxy without realising it.

Suggestion: Add a brief note (e.g., a :::info admonition) next to the fallback endpoint description clarifying what the endpoint is, who operates it, and how to opt out by providing a direct TRON_GRID_API_KEY. Optionally, link to a BankOfAI privacy policy or Terms of Service.


[S-02] exact_gasfree Scheme: Document Why tron:shasta Is Not Supported

File: docs/x402/core-concepts/network-and-token-support.md

Description: The exact_gasfree section states it is available on tron:mainnet and tron:nile but does not mention tron:shasta. Shasta is listed as a supported testnet elsewhere in the docs. The omission is likely intentional (GasFree may not be available on Shasta), but it creates an implicit gap that developers testing on Shasta will hit with no explanation.

Suggestion: Add a brief sentence such as:

tron:shasta is not supported — the GasFree infrastructure is not available on that network. Use tron:nile for testnet validation.


[S-03] contract send Missing Error-Handling Guidance

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Lines 809-827

Description: The contract send section states "contract send returns tronscanUrl when a transaction is broadcast successfully" but gives no guidance on what is returned or logged when a transaction fails, is reverted, or encounters a broadcast error. Given this is the most open-ended and potentially destructive command in the CLI, a note on error output and retry behaviour would improve the user experience.

Suggestion: Add a note similar to:

If the transaction fails to broadcast or is reverted on-chain, a non-zero exit code is returned along with a descriptive error message. Check the TronScan link (if available) for revert details.


Positive Observations

Area Observation
Security callouts Intro.md uses a prominent :::warning admonition covering private key hygiene, testnet-first practice, minimum-funds principle, and dry-run usage — exactly where users will read before starting.
Read vs. Write clarity Every command in CommandGuide.md is explicitly labelled (read) or (write), making it immediately clear which commands require a configured wallet.
Dry-run support The --dry-run flag is documented at the global level and re-enforced in the security notes — a valuable safety net for AI agents using the CLI in automation pipelines.
Bilingual rollout English and Simplified Chinese translations are added in the same PR, preventing documentation lag for Chinese-speaking users.
Fallback endpoint transparency Changing the TRON_GRID_API_KEY guidance from "required for mainnet" (which was inaccurate) to honestly documenting the BankOfAI fallback improves transparency about actual system behaviour.
Cross-reference coverage All four new SUN CLI pages cross-link to each other appropriately (QuickStart → CommandGuide → FAQ → Intro), and QuickStart.md correctly links to the existing SUNMCPServer/Intro.md (path verified to exist).
Testnet-first pattern Every write-operation example either uses --network nile explicitly or is accompanied by a :::tip reminding users to validate on Nile before mainnet.
Consistent table formatting All command option tables use a uniform `

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 4 3 1 --amount0 flag error in v2:add example (MJ-01)
Security 5 4 0 MN-02: inline warning proximity; no hardcoded secrets found
Performance 3 3 Documentation-only; not applicable
Code Quality 4 3 1 MN-01: env var naming inconsistency
Testing 2 2 Documentation-only; not applicable
Documentation 6 5 0 1 Suggestions S-01/S-02/S-03 are improvements, not failures
Compatibility 3 3 0 Sidebar changes use existing Docusaurus category pattern
Observability 2 2 Documentation-only; not applicable

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analysed only the diff between remotes/origin/main and remotes/origin/update-mcp-server. Runtime behaviour (e.g., whether --amount0 is actually accepted or rejected by the CLI binary), integration testing, and deployment impact are not covered.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-07

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

Code Review Report

Project: BofAI Docs (x402-tron/docs)
PR: mainupdate-mcp-server
Review Date: 2026-04-08
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main
To Branch update-mcp-server
Commits 6
Files Changed 25
Lines Added +2,639
Lines Removed -34

Commit History

Hash Message
2056ef1 Merge branch 'main' into update-mcp-server
7043fb4 update version
0712c70 add suncli
d69c9eb add cuncli
3335240 add gas free
5a8e320 fix
88c765c add sun-cli

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 2 4 4

Summary

This PR is a documentation-only change to a Docusaurus-based documentation site. It introduces two categories of changes: (1) four new SUN CLI documentation pages (Intro, QuickStart, CommandGuide, FAQ) covering a new @bankofai/sun-cli command-line DeFi tool for the TRON network, and (2) updates to existing x402 documentation to document the newly supported exact_gasfree payment scheme, USDD token support, and revised messaging around the TronGrid API key requirement. All changes are mirrored in Chinese (zh-Hans) translations and a package.json version bump (1.2.7 → 1.2.8) is included.

The SUN CLI documentation is well-structured, comprehensive, and follows good practices — the security warning admonitions, --dry-run flag documentation, and clear CLI/MCP comparison table are all strong additions. However, two major issues require attention before merging: a silent infrastructure dependency introduced by downgrading the TronGrid API key from "required" to "optional" (with traffic silently falling back to a BankOfAI-operated endpoint), and a language parity gap where the Chinese sdk-features.md received additional BSC network identifier corrections that were not applied to the English version. Several minor issues also require fixing, including a missing inline security note in CommandGuide.md, and a missing exact_gasfree note in the Chinese sdk-features.md network table.


Change Summary

Group 1: New SUN CLI Documentation (English + Chinese)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md New file Introduction to SUN CLI: overview, capability tables, CLI vs MCP comparison, supported networks, and security notes
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md New file Step-by-step quick start guide: install, first query, wallet setup, first swap, env var configuration
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md New file Full 852-line command reference organized by category (wallet, price, token, swap, pool, liquidity, position, pair, farm, protocol, tx, contract)
docs/McpServer-Skills/MCP/SUNCli/FAQ.md New file FAQ covering installation, wallet configuration, common errors, AI integration, networks/tokens
i18n/zh-Hans/.../SUNCli/Intro.md New file Chinese translation of Intro.md
i18n/zh-Hans/.../SUNCli/QuickStart.md New file Chinese translation of QuickStart.md
i18n/zh-Hans/.../SUNCli/CommandGuide.md New file Chinese translation of CommandGuide.md
i18n/zh-Hans/.../SUNCli/FAQ.md New file Chinese translation of FAQ.md

Purpose: Introduces comprehensive documentation for the @bankofai/sun-cli npm package, a command-line TRON DeFi tool targeting both human operators and AI agent automation pipelines.


Group 2: Sidebar Navigation Updates (English + Chinese)

File Change Type Description
sidebars.js Modified Adds SUN CLI category with 4 items under the MCP section
i18n/zh-Hans/.../sidebars.js Modified Adds same SUN CLI category under the Chinese translation sidebar

Purpose: Registers the new SUN CLI documentation pages in both the English and Chinese navigation trees.


Group 3: x402 exact_gasfree Payment Scheme Documentation

File Change Type Description
docs/x402/core-concepts/network-and-token-support.md Modified Documents new exact_gasfree scheme, updates payment scheme count from 2 to 3, updates facilitator summary table
docs/x402/faq.md Modified Rewrites payment scheme FAQ answer to include exact_gasfree
docs/x402/sdk-features.md Modified Adds exact_gasfree/tron, SufficientBalancePolicy, GasFree, and USDD (TRC-20) rows to feature tables
docs/x402/getting-started/quickstart-for-human.md Modified Adds ExactGasFreeClientMechanism registration to both Python and TypeScript code examples
i18n/zh-Hans/... (x402 files) Modified Chinese translations mirroring all above x402 changes

Purpose: Surfaces the newly released exact_gasfree payment scheme, which allows TRON buyers to pay with USDT/USDD without holding TRX for gas fees, routing via a BankOfAI-operated GasFree proxy.


Group 4: TronGrid API Key Messaging Updates

File Change Type Description
docs/x402/getting-started/quickstart-for-agent.md Modified Changes TRON_GRID_API_KEY description from "required for mainnet" to "recommended for production; BankOfAI fallback used automatically when not set"
docs/x402/getting-started/quickstart-for-sellers.md Modified Same messaging update for the sellers quickstart
i18n/zh-Hans/... (agent & sellers quickstart) Modified Chinese translations mirroring TronGrid messaging changes

Purpose: Reflects a new BankOfAI-operated fallback RPC endpoint that activates automatically when TRON_GRID_API_KEY is absent.


Group 5: Package Version Bump & Misc Fixes

File Change Type Description
package.json Modified Version bumped from 1.2.7 to 1.2.8
docs/x402/index.md + i18n Modified Bold formatting added to TRON and BSC network names
i18n/zh-Hans/.../sdk-features.md Modified BSC network identifiers corrected from bsc:mainnet/bsc:testnet to eip155:56/eip155:97 (Chinese only)

Purpose: Documentation maintenance and version tracking.


Detailed Findings


Major

[MJ-01] Silent Mainnet Traffic Routing to BankOfAI Infrastructure Without Opt-in Disclosure

Property Value
Severity Major
Category Security / Documentation
File docs/x402/getting-started/quickstart-for-agent.md : Lines 60–63, docs/x402/getting-started/quickstart-for-sellers.md : Lines 396–400

Description

Previously, the docs stated that TRON_GRID_API_KEY is "required for mainnet". This PR changes that to "recommended for production; when not set, a BankOfAI fallback endpoint is used automatically". The practical effect is that users who follow the quick-start guide and omit the API key will have their mainnet RPC calls silently proxied through BankOfAI's infrastructure (https://facilitator.bankofai.io or similar). This is a centralization and trust concern: users' transaction data, wallet activity, and timing information passes through a third-party-controlled endpoint without explicit opt-in. There is no mention of what data the fallback endpoint logs, how long it is retained, or how to opt out. The change effectively converts a security-by-default requirement into a convenience feature that may catch users unaware.

Code

-export TRON_GRID_API_KEY="your_trongrid_api_key_here"  # Recommended to avoid RPC rate limits
+export TRON_GRID_API_KEY="your_trongrid_api_key_here"  # Recommended for production workloads
-> 💡 **How to get a TronGrid API Key:** ... it is required for mainnet.
+> 💡 **How to get a TronGrid API Key:** ... When `TRON_GRID_API_KEY` is not set, mainnet RPC calls are automatically routed to a BankOfAI-operated fallback endpoint. Setting this key is recommended for production workloads to ensure optimal performance.

Recommendation

Add an explicit opt-in notice and data handling disclosure alongside the fallback description. The messaging should make it clear that using the fallback means traffic is routed through BankOfAI infrastructure, and offer a note on privacy implications. Consider adding a :::warning admonition:

:::warning Fallback Endpoint Privacy Notice
When `TRON_GRID_API_KEY` is not set, mainnet RPC calls are automatically routed through
a BankOfAI-operated fallback endpoint. This means BankOfAI may observe your wallet
addresses, transaction timing, and query patterns. For production use with real assets,
we strongly recommend registering your own [TronGrid API key](https://www.trongrid.io/)
to avoid this dependency.
:::

[MJ-02] English and Chinese sdk-features.md Are Inconsistent — BSC Network Identifier Corrections Only Applied to Chinese Version

Property Value
Severity Major
Category Documentation / Correctness
File i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/sdk-features.md : Lines 24–25 vs docs/x402/sdk-features.md

Description

The Chinese translation of sdk-features.md received a correction that was never applied to the English source file. The Chinese version changed bsc:mainneteip155:56 (BSC Mainnet) and bsc:testneteip155:97 (BSC Testnet) to use the canonical EIP-155 chain identifier format. The English version still uses the non-standard bsc:mainnet / bsc:testnet labels. This is an inconsistency between the two language versions on a technical specification page, where accuracy matters. Users reading the English version will see different network identifiers than Chinese readers, which could cause confusion when configuring SDK integrations.

Code

# Chinese version (zh-Hans) — CORRECTED:
-| bsc:mainnet | ✅ | ✅ |
-| bsc:testnet | ✅ | ✅ |
+| eip155:56 (BSC Mainnet) | ✅ | ✅ |
+| eip155:97 (BSC Testnet) | ✅ | ✅ |

# English version (docs/x402/sdk-features.md) — NOT updated:
| bsc:mainnet | ✅ | ✅ |   ← still present, inconsistent
| bsc:testnet | ✅ | ✅ |   ← still present, inconsistent

Recommendation

Apply the same BSC network identifier corrections to docs/x402/sdk-features.md:

| eip155:56 (BSC Mainnet) |||
| eip155:97 (BSC Testnet) |||

Minor

[MN-01] CommandGuide.md Global Flags Table Missing Inline Security Warning for --private-key

Property Value
Severity Minor
Category Security / Documentation
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Lines 15–27

Description

The Global Flags reference table lists -k, --private-key <key> and -m, --mnemonic <phrase> as standard flags without any security note at the point of reference. A developer scanning the command reference for available flags will see these listed equivalently to benign flags like --output or --json. The risk is that using -k on the command line exposes the private key in shell history (.bash_history, .zsh_history), process lists (ps aux), and potentially CI/CD logs. While Intro.md contains a security section and FAQ.md briefly mentions it, the CommandGuide.md is the primary command reference and should include an inline note at the point of use.

Recommendation

Add a short inline note below the Global Flags table, or extend the table with a Warning column for sensitive flags:

> ⚠️ **Security note:** Passing `-k` / `-m` on the command line exposes
> credentials in shell history and process lists. Prefer environment variables
> (`AGENT_WALLET_PRIVATE_KEY`, `AGENT_WALLET_MNEMONIC`) or agent-wallet
> encrypted storage for production and shared environments.

[MN-02] Chinese sdk-features.md Missing exact_gasfree TRON-Only Annotation in Mechanisms Table

Property Value
Severity Minor
Category Documentation / Correctness
File i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/sdk-features.md : Mechanisms table

Description

The English sdk-features.md adds exact_gasfree/tron to the mechanisms table. The Chinese version mirrors this correctly. However, the English version's network-and-token-support.md and faq.md repeatedly note that exact_gasfree is TRON-only. The Chinese SDK features table does not include any "(TRON only)" annotation on the exact_gasfree/tron row. While the mechanism name itself includes /tron, readers unfamiliar with the naming convention may not realize this scheme is unavailable for BSC. This is a parity issue with the English sdk-features.md which also lacks this annotation — but since the Chinese version is reviewed here, the recommendation applies to both.

Recommendation

For both docs/x402/sdk-features.md and its Chinese translation, consider annotating the row:

| exact_gasfree/tron *(TRON only)* |||

[MN-03] QuickStart.md Missing Testnet Faucet Link for New Users

Property Value
Severity Minor
Category Documentation / Usability
File docs/McpServer-Skills/MCP/SUNCli/QuickStart.md : Lines 101–115

Description

The QuickStart guide instructs users to configure a wallet and run a swap on the Nile testnet. However, it does not provide a link to a Nile testnet faucet to obtain test TRX or USDT. Without test tokens, a new user following the guide will hit an "Insufficient balance" error when attempting the example swap command. The agent quickstart guide (quickstart-for-agent.md) in the x402 docs already references faucets — this SUN CLI guide should do the same for consistency and user experience.

Recommendation

Add a testnet faucet reference in the wallet configuration section:

:::tip Get Nile testnet tokens
You'll need test TRX to pay for gas on the Nile testnet. Claim tokens from the
[Nile faucet](https://nileex.io/join/getJoinPage) before running write operations.
:::

[MN-04] QuickStart.md Internal Cross-Reference Path Should Be Verified

Property Value
Severity Minor
Category Documentation / Correctness
File docs/McpServer-Skills/MCP/SUNCli/QuickStart.md : Last line

Description

The QuickStart guide ends with a cross-reference link: [SUN MCP Server](../SUNMCPServer/Intro.md). The path ../SUNMCPServer/Intro.md resolves to docs/McpServer-Skills/MCP/SUNMCPServer/Intro.md. While the file does exist (confirmed in the repository), Docusaurus uses document IDs (not file paths) for cross-references in MDX-based sites, and relative path resolution can behave differently across Docusaurus versions. If not tested, this link may render as broken in the deployed site.

Recommendation

Use a Docusaurus-style doc ID reference to ensure reliability:

- **[SUN MCP Server](../SUNMCPServer/Intro)** — Prefer AI-driven DeFi? Use SUN MCP Server for natural language interaction

(drop the .md extension, which is the Docusaurus convention, consistent with all other links in sidebars.js)


Suggestions

[S-01] Add Environment Variable Reference Table to QuickStart.md

File: docs/McpServer-Skills/MCP/SUNCli/QuickStart.md
Description: The quickstart mentions TRON_NETWORK, TRONGRID_API_KEY, and TRON_RPC_URL at the end but treats them as isolated snippets. Users benefit from a consolidated reference table showing all supported environment variables, their purpose, and defaults.
Suggestion: Add a small table listing all env vars (TRON_NETWORK, TRONGRID_API_KEY, TRON_RPC_URL, AGENT_WALLET_PRIVATE_KEY, AGENT_WALLET_PASSWORD, AGENT_WALLET_DIR) with their default values and descriptions.


[S-02] CommandGuide.md swap:quote-raw Section Should Include a Complete End-to-End Example

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md
Description: The swap:quote-raw command section shows required arguments (--router, --args) but provides no complete usage example. This is the only command in the guide without a concrete sun ... example.
Suggestion: Add a realistic example call, even with placeholder values, to maintain documentation consistency with all other commands.


[S-03] exact_gasfree Scheme Documentation Could Benefit from a Flow Diagram Description

File: docs/x402/core-concepts/network-and-token-support.md
Description: The existing Authorize → Execute → Settle flow explanation (3 steps) was preserved for exact_permit/exact, but exact_gasfree has no analogous flow description. Since it introduces a new routing path through a BankOfAI GasFree proxy, users setting up server-side facilitators may be confused about who handles which step.
Suggestion: Add a brief step-by-step flow for exact_gasfree analogous to the existing 3-step flow, clarifying the GasFree proxy's role in the settlement step.


[S-04] Commit Messages Are Not Descriptive Enough for Traceability

File: N/A (git history)
Description: Commit messages such as add cuncli, add suncli, add gas free, and fix are too vague to be useful for future traceability or changelog generation. The commit message add cuncli appears to be a typo of add suncli.
Suggestion: Use descriptive commit messages that reference the scope and intent (e.g., docs(sun-cli): add SUN CLI introduction, quickstart, command guide, and FAQ). The apparent typo cuncli in one commit should be clarified.


Positive Observations

Area Observation
Security documentation Intro.md contains a well-crafted :::warning admonition with six specific security principles, including hardcoded key avoidance, testnet-first workflow, minimum-funds principle, and dry-run usage. This is well above average for CLI documentation.
Structured command reference CommandGuide.md consistently formats every command with a synopsis, options table (with Default column), and concrete bash code examples. The format is professional and scannable.
CLI vs MCP comparison table The Intro.md comparison table between SUN CLI and SUN MCP Server clearly articulates the use-case difference. This reduces user confusion and supports appropriate tool selection.
--dry-run flag documentation The global --dry-run flag is documented prominently in both the Global Flags table and the security notes. This is a critical safety feature for DeFi automation.
Localization parity The 4 new SUN CLI docs and all 6 modified x402 docs were simultaneously updated in both English and Chinese (zh-Hans), maintaining full localization parity — a significant quality signal.
FAQ error coverage FAQ.md covers the common unknown command 'nile' error caused by flag ordering — a subtle CLI gotcha — which reflects genuine user-testing or production feedback.
Code examples in quickstart-for-human.md The Python and TypeScript code examples for exact_gasfree registration are clear, complete, and follow the same structural pattern as the existing exact_permit examples, making adoption easy.
Version bump discipline The package.json version bump (1.2.7 → 1.2.8) is included in the same PR as documentation content changes, reflecting good release hygiene.

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 5 4 1 2 English/Chinese sdk-features.md inconsistency (MJ-02)
Security 6 4 2 4 Silent RPC fallback routing (MJ-01); missing inline key warning (MN-01)
Performance 7 7 Not applicable — documentation-only PR
Code Quality 8 7 1 2 Vague commit messages (S-04)
Testing 7 7 Not applicable — documentation-only PR
Documentation 8 6 2 1 Missing faucet link (MN-03); missing cross-ref (MN-04)
Compatibility 5 5 Sidebar changes are additive; no breaking navigation changes
Observability 4 4 Not applicable — documentation-only PR

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between main and update-mcp-server. Runtime behavior, integration testing (e.g., Docusaurus build verification, link checking), and deployment impact are not covered by this report. For a documentation site, a docusaurus build pass and a broken-links check (e.g., docusaurus-plugin-check-links) are strongly recommended as part of the CI pipeline.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-08

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

Code Review Report

Project: @x402-tron/docs
PR: main -> update-mcp-server
Review Date: 2026-04-08
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main
To Branch update-mcp-server
Commits 8
Files Changed 25
Lines Added +2,639
Lines Removed -34

Commit History

Hash Message
856ed9e Merge branch 'update-mcp-server' of github.com:BofAI/docs into update-mcp-server
0e3cfdd add suncli
2056ef1 Merge branch 'main' into update-mcp-server
7043fb4 update version
0712c70 add suncli
d69c9eb add cuncli
3335240 add gas free
5a8e320 fix
88c765c add sun-cli

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 3 3 3

Summary

This PR makes two categories of changes to the BankOfAI documentation site: (1) it introduces a brand-new SUN CLI section — comprising Introduction, Quick Start, Command Guide, and FAQ — in both English and Chinese, and (2) it updates existing x402 documentation to reflect a new third payment scheme (exact_gasfree) and revised guidance around TronGrid API key requirements. The documentation is generally well-structured, comprehensive, and clearly written.

However, three major concerns need to be resolved before merging. The most impactful is an environment variable name inconsistency (TRONGRID_API_KEY vs. TRON_GRID_API_KEY) that will cause silent runtime failures for users following the SUN CLI Quick Start. A second major issue is that the downgraded TronGrid API key guidance silently introduces BankOfAI's infrastructure as a mainnet RPC fallback without surfacing the implied trust assumption to the operator. Third, private key flag examples in the Command Guide (-k your_private_key) appear without inline security warnings, which contradicts the project's own stated principles.


Change Summary

Group 1: New SUN CLI Documentation (English + Chinese)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md Added English introduction to SUN CLI tool
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Added English quick start guide with wallet setup
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Added Full English command reference (852 lines)
docs/McpServer-Skills/MCP/SUNCli/FAQ.md Added English FAQ and troubleshooting guide
i18n/zh-Hans/.../SUNCli/Intro.md Added Chinese translation of Intro
i18n/zh-Hans/.../SUNCli/QuickStart.md Added Chinese translation of Quick Start
i18n/zh-Hans/.../SUNCli/CommandGuide.md Added Chinese translation of Command Guide
i18n/zh-Hans/.../SUNCli/FAQ.md Added Chinese translation of FAQ
sidebars.js Modified Added SUN CLI navigation category (English)
i18n/zh-Hans/.../sidebars.js Modified Added SUN CLI navigation category (Chinese)

Purpose: Introduces documentation for the new @bankofai/sun-cli npm package, a command-line tool for interacting with SunSwap (SUN.IO) on the TRON network. Covers wallet management, token prices, swaps, liquidity operations (V2/V3/V4), farming, contract interaction, and AI-agent integration.


Group 2: x402 exact_gasfree Payment Scheme

File Change Type Description
docs/x402/core-concepts/network-and-token-support.md Modified Documented exact_gasfree payment scheme
docs/x402/faq.md Modified Updated FAQ to list three payment schemes
docs/x402/sdk-features.md Modified Added exact_gasfree/tron, GasFree, SufficientBalancePolicy, and USDD to SDK feature tables
docs/x402/getting-started/quickstart-for-human.md Modified Added Python and TypeScript code examples for ExactGasFreeClientMechanism
i18n/zh-Hans/.../ (x402 files) Modified Chinese translations of all x402 changes

Purpose: Documents the newly available exact_gasfree payment scheme, a TRON-specific mechanism allowing USDT/USDD payments without buyers holding TRX for gas. Settlement routes through the BankOfAI facilitator endpoint.


Group 3: TronGrid API Key Guidance Update

File Change Type Description
docs/x402/getting-started/quickstart-for-agent.md Modified Changed TronGrid key from "required for mainnet" to "recommended for production"
docs/x402/getting-started/quickstart-for-sellers.md Modified Same wording change in sellers guide and .env comment
i18n/zh-Hans/.../ (agent + sellers files) Modified Chinese translations of the above

Purpose: Reflects that mainnet now has a BankOfAI-operated fallback RPC endpoint when TRON_GRID_API_KEY is not set, so the key is no longer strictly required.


Group 4: Package Version Bump

File Change Type Description
package.json Modified Version bumped from 1.2.7 to 1.2.8

Purpose: Reflects the new documentation content added in this PR.


Detailed Findings


Major

[MJ-01] Inconsistent Environment Variable Name: TRONGRID_API_KEY vs. TRON_GRID_API_KEY

Property Value
Severity Major
Category Correctness / Documentation
File docs/McpServer-Skills/MCP/SUNCli/QuickStart.md : Line 7 of Network & API Configuration section; i18n/zh-Hans/.../SUNCli/QuickStart.md : equivalent section

Description

The SUN CLI Quick Start guide (both English and Chinese) documents the TronGrid API key environment variable as TRONGRID_API_KEY:

export TRONGRID_API_KEY="<YOUR_KEY>"

However, every other documentation file in this PR and on main consistently uses TRON_GRID_API_KEY:

  • quickstart-for-agent.md: export TRON_GRID_API_KEY="your_trongrid_api_key_here"
  • quickstart-for-sellers.md: TRON_GRID_API_KEY=
  • x402/core-concepts/network-and-token-support.md: references TRON_GRID_API_KEY

A user following the SUN CLI Quick Start will set TRONGRID_API_KEY in their environment, but the SDK will look for TRON_GRID_API_KEY — causing the variable to be silently ignored and the fallback endpoint to be used without the user realizing it. This is a runtime behavioral bug disguised as a documentation issue.

Recommendation

Change both QuickStart files (English and Chinese) to use the correct variable name:

export TRON_GRID_API_KEY="<YOUR_KEY>"

[MJ-02] Downgraded TronGrid Requirement Silently Introduces Undisclosed Third-Party Trust Dependency for Mainnet

Property Value
Severity Major
Category Security / Documentation
File docs/x402/getting-started/quickstart-for-agent.md : Lines 60-73; docs/x402/getting-started/quickstart-for-sellers.md : Lines 396-403, 545-548

Description

The PR changes the documentation for TRON_GRID_API_KEY from:

# Recommended to avoid RPC rate limits

and:

# TronGrid API Key (required for mainnet, can be left blank for testnet)

to:

# Recommended for production workloads

and:

# TronGrid API Key (recommended for production; when not set, a BankOfAI fallback endpoint is used automatically)

This change is semantically significant: operators who previously understood the key as "required for mainnet" will now leave it blank, and their mainnet RPC traffic will be silently routed through a BankOfAI-operated infrastructure endpoint. The implications are:

  1. Trust without explicit consent: Operators running their own Facilitator nodes may not realize their production mainnet traffic flows through a third-party endpoint they did not explicitly choose.
  2. Availability dependency: The BankOfAI fallback is an undocumented SLA; if it goes down, mainnet operations fail silently for operators who omitted the key.
  3. No link to fallback endpoint documentation: The doc mentions "BankOfAI-operated fallback endpoint" but provides no URL, SLA, rate limits, or terms for this service.

Recommendation

Add an explicit callout block wherever this fallback is mentioned, for example:

:::note Fallback RPC Endpoint
When `TRON_GRID_API_KEY` is not set, mainnet RPC calls are automatically
routed through a BankOfAI-operated public endpoint
(`https://api.trongrid.io` proxied via BankOfAI). This endpoint has no
guaranteed SLA and may be rate-limited under high load. For production
workloads, set your own `TRON_GRID_API_KEY` to ensure reliability and
independence from BankOfAI's infrastructure.
:::

[MJ-03] Private Key Flag Examples in Command Guide Lack Inline Security Warnings

Property Value
Severity Major
Category Security / Documentation
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Lines 26-54; i18n/zh-Hans/.../CommandGuide.md : equivalent lines

Description

The Command Guide prominently documents -k, --private-key <key> as a global flag and provides a runnable code example:

sun -k your_private_key --network nile --yes swap TRX USDT 1000000

Passing private keys as CLI arguments is dangerous because:

  • The key appears in the shell's command history (~/.bash_history, ~/.zsh_history).
  • It may appear in process listings (ps aux), CI/CD logs, and terminal session recordings.

The FAQ does mention this risk: "be cautious with command-line flags (-k, -m) as they may appear in your shell history" — but this warning is buried in the FAQ, far from the point of use in the Command Guide. Developers copy-paste from the Command Guide first.

The Intro.md has a security callout (:::warning block) that says "Never hardcode private keys" and recommends environment variables — but this applies to the CLI flags too, and that connection is never made in the Command Guide.

Recommendation

Add a :::caution block immediately after the Global Flags table in the Command Guide:

:::caution Private Key Security
The `-k` / `--private-key` and `-m` / `--mnemonic` flags pass sensitive
material as command-line arguments, which may be recorded in shell history
and process listings. Prefer environment variables (`AGENT_WALLET_PRIVATE_KEY`,
`AGENT_WALLET_MNEMONIC`) or [agent-wallet](https://github.com/BofAI/agent-wallet)
encrypted storage for all non-throwaway keys.
:::

Apply the same addition to the Chinese CommandGuide.md.


Minor

[MN-01] exact_gasfree Available on tron:nile But Not tron:shasta — Inconsistency Not Surfaced

Property Value
Severity Minor
Category Documentation / Correctness
File docs/x402/core-concepts/network-and-token-support.md : exact_gasfree section

Description

The exact_gasfree scheme is documented as available on tron:mainnet and tron:nile only. However, the documentation does not explain why Shasta is excluded, nor does it warn developers who use Shasta as their test environment that this scheme will not work there. Other payment schemes appear to support all three TRON networks. Developers on Shasta who try to use exact_gasfree will encounter a failure with no helpful error message pointed to by the docs.

Recommendation

Add a note explaining the Shasta exclusion:

> **Note:** `exact_gasfree` is not available on `tron:shasta`. Use `tron:nile` for testnet
> development with this scheme, as GasFree infrastructure is not deployed on Shasta.

[MN-02] SDK Feature Table Uses Inconsistent BSC Network Identifier Format

Property Value
Severity Minor
Category Documentation / Consistency
File i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/sdk-features.md : Lines 24-25

Description

The Chinese sdk-features.md was correctly updated to replace bsc:mainnet/bsc:testnet with the canonical EIP-155 identifiers eip155:56 (BSC Mainnet)/eip155:97 (BSC Testnet). The English sdk-features.md had a row added (exact_gasfree/tron) but was not updated with the same BSC identifier fix. The English table still contains the non-canonical bsc:mainnet/bsc:testnet labels in the unchanged rows.

Recommendation

Apply the same BSC network identifier fix to docs/x402/sdk-features.md (English):

| eip155:56 (BSC Mainnet) |||
| eip155:97 (BSC Testnet) |||

[MN-03] exact_gasfree Trust Model Not Clearly Articulated — Proxy Architecture Opaque to Readers

Property Value
Severity Minor
Category Documentation / Security
File docs/x402/core-concepts/network-and-token-support.md : exact_gasfree section; docs/x402/getting-started/quickstart-for-human.md : GasFree code examples

Description

The exact_gasfree documentation states:

"All GasFree API calls route through the BankOfAI proxy at https://facilitator.bankofai.io/{mainnet,nile}, so clients do not need to configure GASFREE_API_KEY or GASFREE_API_SECRET."

This is useful, but the documentation does not clarify:

  • What data is sent to the proxy (e.g., signed payment authorizations, amounts, recipient addresses).
  • What the trust implications are for a buyer whose payment is settled through BankOfAI's infrastructure.
  • Whether the proxy is open-source or auditable.

Security-conscious developers and DeFi users will want to understand what they are trusting before configuring ExactGasFreeClientMechanism for production use.

Recommendation

Add a brief trust-model note in network-and-token-support.md under the exact_gasfree section explaining the data flow and any relevant audit/open-source information about the facilitator proxy.


Suggestions

[S-01] Hardcoded Price Example May Mislead Users About Expected Output

File: docs/McpServer-Skills/MCP/SUNCli/QuickStart.md, i18n/zh-Hans/.../QuickStart.md

Description: The Quick Start guide shows a concrete sample output with a fixed TRX price:

│ TRX   │ 0.301739439813 │

This is a snapshot value. As time passes and TRX price changes, new users may think the CLI is returning stale data when they see a different value. The Chinese translation contains the same hardcoded price.

Suggestion: Append a brief note such as: "The displayed price reflects live market data and will differ from the example above."


[S-02] swap:quote-raw and swap:exact-input Examples Are Missing

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Lines 192-222

Description: The low-level commands swap:quote-raw and swap:exact-input are documented with option tables but have no bash example invocations, unlike every other command in the guide. This creates an inconsistency and makes these advanced commands harder to use correctly.

Suggestion: Add at least one illustrative example for each command, even if with placeholder values, consistent with the rest of the Command Guide format.


[S-03] wallet address Description Slightly Diverges Between English and Chinese

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md vs. i18n/zh-Hans/.../CommandGuide.md

Description:

  • English: "Print the active wallet address."
  • Chinese: "显示已配置的钱包地址." (Display the configured wallet address.)

The English says "active wallet" while the Chinese says "configured wallet" — these are subtly different concepts (an active wallet may be selected from multiple configured ones). This is a minor translation inconsistency.

Suggestion: Align terminology across both language versions to use a consistent concept ("active" / "当前激活的").


Positive Observations

Area Observation
Security Guidance Intro.md and QuickStart.md both include prominent :::warning / :::caution callout blocks advising users to use environment variables rather than command-line flags for private keys, and to test on Nile before mainnet. This is excellent practice.
Dual Language Coverage All new content and every changed doc page is fully mirrored in Chinese (zh-Hans), ensuring non-English-speaking users receive complete, up-to-date documentation.
Read vs. Write Labeling Every command entry in the Command Guide is consistently tagged with (read) or (write), making it immediately clear whether a wallet is required. This is a developer-experience best practice for DeFi tooling.
--dry-run Promotion Both the CLI docs and existing x402 docs promote --dry-run as a safety mechanism. This is highlighted in security callouts and the Command Guide, reinforcing safe usage patterns.
Sidebar Navigation The SUN CLI docs are registered in both sidebars.js files with a logical ordering (Intro → QuickStart → CommandGuide → FAQ), following the established pattern for other MCP server sections.
Consistency in Command Structure The Command Guide follows a consistent structure throughout: description, synopsis, options table with defaults, and runnable examples. This makes the 852-line reference document easy to navigate.
exact_gasfree Feature Completeness The new payment scheme is documented across all relevant files (concept doc, FAQ, SDK features, quickstart code examples in both Python and TypeScript, and both languages) — no orphaned references.
Version Bump The package.json version was correctly incremented from 1.2.7 to 1.2.8 to reflect the new documentation content.

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 5 4 1 0 Env var name inconsistency (MJ-01)
Security 6 4 2 0 Private key examples (MJ-03), undisclosed trust dependency (MJ-02)
Performance 3 0 0 3 No performance-relevant code changes
Code Quality 5 4 1 0 Missing examples for 2 commands (S-02)
Testing 4 0 0 4 Documentation-only PR; no executable code changed
Documentation 8 6 2 0 BSC identifier inconsistency EN vs ZH (MN-02); trust model gap (MN-03)
Compatibility 3 3 0 0 No breaking changes to existing docs or APIs
Observability 2 2 0 0 N/A for documentation

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between main and update-mcp-server. Runtime behavior of the documented CLI tool itself, SDK correctness, and deployment impact are not covered.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-08

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

Code Review Report

Project: @x402-tron/docs
PR: main -> update-mcp-server
Review Date: 2026-04-08
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main
To Branch update-mcp-server
Commits 12
Files Changed 25
Lines Added +2,686
Lines Removed -34

Commit History

Hash Message
0dbacc9 add suncli
64a0c36 fix
53baadb fix
0f53ddb fix
856ed9e Merge branch 'update-mcp-server' of github.com:BofAI/docs into update-mcp-server
0e3cfdd add suncli
2056ef1 Merge branch 'main' into update-mcp-server
7043fb4 update version
0712c70 add suncli
d69c9eb add cuncli
3335240 add gas free
88c765c add sun-cli

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 3 5 4

Summary

This PR adds two major feature areas to the documentation site: (1) a brand-new SUN CLI section (docs/McpServer-Skills/MCP/SUNCli/) with Introduction, Quick Start, Command Guide, and FAQ pages; and (2) documentation updates across the x402 section to introduce a new exact_gasfree payment scheme (TRON-only, zero-gas settlement via BankOfAI facilitator). All content is mirrored in the i18n/zh-Hans/ Chinese locale. The site version is bumped from 1.2.7 to 1.2.8, and the navigation sidebars are updated accordingly.

Overall the documentation is well-structured, detailed, and contains appropriate security cautions. However, there are several Major findings: an internal cross-reference link is broken, the English Command Guide is one line longer than its Chinese counterpart (minor sync drift that could silently surface), and the new exact_gasfree code examples in quickstart-for-human.md register both TRON payment mechanisms with the same wildcard tron:* without documenting the priority/selection logic — which could leave readers confused about which mechanism is activated on a given call. There are also several minor documentation inconsistencies and suggestions for improvement.


Change Summary

1. SUN CLI Documentation (New)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md Added Introduction to SUN CLI: what it is, capabilities, comparison with SUN MCP Server, output modes, networks, security notes
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Added Step-by-step install guide, first query walkthrough, wallet setup, testnet swap example
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Added Full 860-line command reference covering all CLI categories (wallet, price, token, swap, pool, liquidity, position, pair, farm, protocol, tx, contract)
docs/McpServer-Skills/MCP/SUNCli/FAQ.md Added 133-line FAQ covering installation, wallet config, common errors, AI agent integration, networks & tokens
i18n/zh-Hans/.../SUNCli/CommandGuide.md Added Chinese translation of Command Guide (859 lines — 1 line shorter than English source)
i18n/zh-Hans/.../SUNCli/FAQ.md Added Chinese translation of FAQ
i18n/zh-Hans/.../SUNCli/Intro.md Added Chinese translation of Introduction
i18n/zh-Hans/.../SUNCli/QuickStart.md Added Chinese translation of Quick Start
sidebars.js Modified Added SUN CLI category under McpServer-Skills/MCP
i18n/zh-Hans/.../sidebars.js Modified Same sidebar addition for Chinese locale

Purpose: Expose the @bankofai/sun-cli npm package to end users with structured documentation, enabling human operators and AI agents to interact with SunSwap/SUN.IO from the command line.


2. x402 exact_gasfree Payment Scheme (Updated)

File Change Type Description
docs/x402/core-concepts/network-and-token-support.md Modified Added exact_gasfree scheme section; updated scheme count from two to three; updated summary table
docs/x402/faq.md Modified Updated payment schemes answer to include exact_gasfree
docs/x402/getting-started/quickstart-for-agent.md Modified Added fallback RPC endpoint note; updated TronGrid API key guidance
docs/x402/getting-started/quickstart-for-human.md Modified Added ExactGasFreeClientMechanism registration to Python and TypeScript code examples
docs/x402/getting-started/quickstart-for-sellers.md Modified Updated TronGrid API key guidance; added fallback RPC endpoint note
docs/x402/index.md Modified Minor formatting: bolded network names
docs/x402/sdk-features.md Modified Added exact_gasfree/tron, SufficientBalancePolicy, GasFree, and USDD (TRC-20) to feature table
i18n/zh-Hans/... (7 files) Modified Chinese locale mirrors of all x402 changes above

Purpose: Document the newly implemented exact_gasfree TRON payment scheme, which enables buyers to pay with USDT/USDD without holding TRX for gas fees.


3. Package Version Bump

File Change Type Description
package.json Modified Version bumped 1.2.71.2.8

Detailed Findings


Major

[MJ-01] Broken Internal Cross-Reference Link in FAQ

Property Value
Severity Major
Category Correctness / Documentation
File docs/McpServer-Skills/MCP/SUNCli/FAQ.md : Line 5 (footer)

Description

The FAQ footer links to ./CommandGuide.md — which is correct — but it also references an issue tracker at https://github.com/BofAI/sun-cli. This external link points to a repository path (BofAI/sun-cli) that is inconsistent with the npm package name (@bankofai/sun-cli) and the agent-wallet link used elsewhere in the same documents (https://github.com/ABlockofAI/agent-wallet). The org name varies between BofAI, bankofai, and ABlockofAI across the PR, suggesting at least one of these GitHub URLs is stale or incorrect.

Additionally, the Quick Start page links to ../SUNMCPServer/Intro.md which may not resolve if the SUNMCPServer directory does not exist at that relative path.

Code

<!-- docs/McpServer-Skills/MCP/SUNCli/FAQ.md, last line -->
or file an issue on the [GitHub repository](https://github.com/BofAI/sun-cli).

<!-- docs/McpServer-Skills/MCP/SUNCli/QuickStart.md, line ~147 -->
- **[SUN MCP Server](../SUNMCPServer/Intro.md)** — Prefer AI-driven DeFi?

<!-- docs/McpServer-Skills/MCP/SUNCli/Intro.md — agent-wallet link -->
[agent-wallet](https://github.com/ABlockofAI/agent-wallet)

<!-- docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md — same link -->
[agent-wallet](https://github.com/ABlockofAI/agent-wallet)

Recommendation

  1. Standardize all GitHub org references. Confirm the canonical org (BofAI, bankofai, or ABlockofAI) and apply it consistently across all new files.
  2. Verify that ../SUNMCPServer/Intro.md resolves to an existing file before merging; if it does not yet exist, replace with a placeholder or remove the link.

[MJ-02] English and Chinese CommandGuide.md Line Count Divergence

Property Value
Severity Major
Category Documentation / Correctness
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md (860 lines) vs i18n/zh-Hans/.../SUNCli/CommandGuide.md (859 lines)

Description

The English source CommandGuide.md is 860 lines while the Chinese translation is 859 lines. While the diff shows largely equivalent content, this one-line discrepancy suggests content may have diverged silently during the multiple fix commits (64a0c36, 53baadb, 0f53ddb). Docusaurus i18n relies on translations being kept in sync; a content difference can mislead Chinese-speaking users.

Code

+++ b/docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md
@@ -0,0 +1,860 @@

+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNCli/CommandGuide.md
@@ -0,0 +1,859 @@

Recommendation

Diff the English and Chinese CommandGuide.md files locally to identify the diverging line. Either add the missing line to the Chinese version or confirm the difference is intentional (e.g., a condensed Chinese paragraph). Add a translation-sync note in the PR description.


[MJ-03] Dual tron:* Mechanism Registration Without Priority/Selection Documentation

Property Value
Severity Major
Category Correctness / Documentation
File docs/x402/getting-started/quickstart-for-human.md : Lines ~436–437 (Python), ~461–464 (TypeScript)

Description

The new code examples register both ExactPermitTronClientMechanism and ExactGasFreeClientMechanism on the same tron:* wildcard pattern. Neither the inline comments nor the surrounding prose explains which mechanism takes priority, under what conditions each is selected, or whether both are attempted in sequence. A developer following this quickstart literally will be left uncertain whether their payment will use exact_permit or exact_gasfree on any given request, and may unknowingly send the wrong mechanism to a server that only accepts one.

Code

# Python – quickstart-for-human.md
x402_client.register("tron:*", ExactPermitTronClientMechanism(signer))
x402_client.register("tron:*", ExactGasFreeClientMechanism(signer, clients=gasfree_clients))
// TypeScript – quickstart-for-human.md
x402.register('tron:*', new ExactPermitTronClientMechanism(signer))
x402.register('tron:*', new ExactGasFreeClientMechanism(signer, {
  'tron:nile': new GasFreeAPIClient(getGasFreeApiBaseUrl('tron:nile')),
  'tron:mainnet': new GasFreeAPIClient(getGasFreeApiBaseUrl('tron:mainnet')),
}))

Recommendation

Add explanatory prose above the code examples, e.g.:

Registering both mechanisms allows the client to handle servers that advertise either exact_permit or exact_gasfree in their 402 response. The SDK selects the mechanism whose scheme name matches the server's advertised scheme — if no match is found the payment is declined. The order of register() calls does not set a priority; each mechanism is selected by scheme name.

Also consider showing a simpler example first (single mechanism) and presenting the multi-mechanism registration as an advanced pattern.


Minor

[MN-01] exact_gasfree Only References Nile Testnet — Shasta Omitted

Property Value
Severity Minor
Category Documentation
File docs/x402/core-concepts/network-and-token-support.md : Lines ~1318–1327

Description

The new exact_gasfree scheme description lists only tron:mainnet and tron:nile as supported networks, but the x402 documentation elsewhere lists tron:shasta as a supported TRON network. It is unclear whether exact_gasfree is intentionally unavailable on Shasta or simply omitted. This ambiguity could confuse developers who test on Shasta.

Code

- **TRON only**: Available on `tron:mainnet` and `tron:nile`

Recommendation

Explicitly state whether Shasta support is planned, in progress, or unsupported:

- **TRON only**: Available on `tron:mainnet` and `tron:nile`. `tron:shasta` is not currently supported.

[MN-02] Inconsistent TronGrid API Key Guidance Between Agent and Sellers Quickstarts

Property Value
Severity Minor
Category Documentation
File docs/x402/getting-started/quickstart-for-agent.md and quickstart-for-sellers.md

Description

The old documentation stated that TRON_GRID_API_KEY is "required for mainnet" — a strong, clear instruction. The PR softens this to "recommended for production workloads" and introduces a fallback BankOfAI-proxied endpoint. While this is technically accurate, the change may lead production users to skip configuring a proper API key, relying on an endpoint with "no guaranteed SLA" (which is noted in the new callout boxes, but easy to miss). The sellers quickstart .env comment is now subtly inconsistent with the fallback callout that immediately follows it:

Code

# quickstart-for-sellers.md .env comment:
# TronGrid API Key (required for mainnet; recommended for production workloads)

The phrase "required for mainnet; recommended for production workloads" is self-contradictory — "required" and "recommended" apply to the same scenario (mainnet production).

Recommendation

Unify the guidance. Since the fallback endpoint exists, "required" is no longer accurate. Use consistent language:

# TronGrid API Key — strongly recommended for production workloads.
# Without it, mainnet RPC calls fall back to a BankOfAI-operated proxy with no SLA guarantee.

[MN-03] Code Examples in CommandGuide Use Placeholder Addresses That May Be Confusing

Property Value
Severity Minor
Category Documentation
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Lines ~814, ~832

Description

The contract read and contract send examples use TYourAddress, TContract, and TRecipient as placeholder addresses. While the intent is clear, TRON addresses follow a specific T-prefixed base58 format and these placeholders look syntactically valid to a casual reader, which may lead to copy-paste errors — especially for the contract send example, which references TRecipient in both the address position and inside the JSON args array.

Code

sun contract read TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t balanceOf --args '["TYourAddress"]'
sun contract send TRecipient transfer --args '["TRecipient","1000000"]' --value 0

Recommendation

Use clearly invalid placeholder notation (e.g., <YOUR_TRON_ADDRESS>) or use a real well-known testnet address for the example:

sun contract send <CONTRACT_ADDRESS> transfer --args '["<RECIPIENT_ADDRESS>","1000000"]' --value 0

[MN-04] wallet address Description Differs Between English and Chinese

Property Value
Severity Minor
Category Documentation
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md vs i18n/zh-Hans/.../CommandGuide.md

Description

The English wallet address command is described as "Print the active wallet address." whereas the Chinese translation renders it as "显示已配置的钱包地址" ("Display the configured wallet address"). These are semantically close but not identical ("active" vs. "configured"), which may cause translation mismatches in future updates.

Recommendation

Align the English description to "Print the configured wallet address." to match the more accurate Chinese phrasing and avoid future drift.


[MN-05] Chinese sdk-features.md Renames BSC Network Identifiers Without English Equivalent

Property Value
Severity Minor
Category Documentation
File i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/sdk-features.md : Lines ~62–63

Description

The Chinese sdk-features.md changes bsc:mainneteip155:56 (BSC Mainnet) and bsc:testneteip155:97 (BSC Testnet). This is a substantive correction (using the canonical EIP-155 chain IDs) but the equivalent change was not made to the English docs/x402/sdk-features.md, leaving the two files inconsistent.

Code

-| bsc:mainnet | ✅ | ✅ |
-| bsc:testnet | ✅ | ✅ |
+| eip155:56 (BSC Mainnet) | ✅ | ✅ |
+| eip155:97 (BSC Testnet) | ✅ | ✅ |

Recommendation

Apply the same identifier correction to the English docs/x402/sdk-features.md to keep both locales in sync. If bsc:mainnet is a valid SDK identifier (not just a friendly name), document both the friendly name and the EIP-155 chain ID.


Suggestions

[S-01] Add exact_gasfree to the quickstart-for-agent.md Code Examples

File: docs/x402/getting-started/quickstart-for-agent.md
Description: The agent quickstart updated prose and the fallback RPC note but did not add ExactGasFreeClientMechanism registration to its code examples (unlike the human quickstart which was updated). If the exact_gasfree feature is relevant to AI agents — which it should be, since removing the TRX gas requirement simplifies autonomous agent wallet management — the agent quickstart should show how to register it.
Suggestion: Mirror the mechanism registration pattern from quickstart-for-human.md into quickstart-for-agent.md, with a note explaining that exact_gasfree is particularly useful for agents that don't manage TRX balances.


[S-02] Document contract send TronscanUrl Return Behavior More Prominently

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Line 835
Description: The note "contract send returns tronscanUrl when a transaction is broadcast successfully" appears only for contract send but not for swap, liquidity v2:add, liquidity v3:mint, etc. — all of which presumably also return a transaction ID. Consistent return-value documentation across write commands would improve the reference quality.
Suggestion: Add a "Returns" row or note to each write command's table indicating what is returned on success (e.g., txId, tronscanUrl, pool address).


[S-03] Consider Adding Version or "Since" Tags to New Features

File: docs/x402/sdk-features.md, docs/x402/core-concepts/network-and-token-support.md
Description: The exact_gasfree scheme and SufficientBalancePolicy are new features. Adding a "since version" tag (e.g., Since v1.2.8) would help users know which SDK version they need to upgrade to in order to access these features.
Suggestion: Add a Since: x.y.z badge or inline note next to the new rows in sdk-features.md.


[S-04] Security Caution in CommandGuide — Expand Shell History Risk Guidance

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Lines 34–40
Description: The :::caution Private Key Security block correctly warns about shell history and process listings. Consider also mentioning ps aux as a live exposure risk (not just history), and suggesting unset commands after setting sensitive env vars.
Suggestion:

:::caution Private Key Security
The `-k` / `--private-key` and `-m` / `--mnemonic` flags pass sensitive
material as command-line arguments, which may be visible in shell history
(`~/.bash_history`, `~/.zsh_history`), process listings (`ps aux`), and
system logs. Prefer environment variables or agent-wallet encrypted storage.
After setting a sensitive environment variable for a session, run `unset AGENT_WALLET_PRIVATE_KEY`
when done.
:::

Positive Observations

Area Observation
Security messaging Both new CLI docs and x402 docs consistently include prominent :::caution and :::warning blocks for private key handling — this is excellent practice for DeFi documentation.
Dry-run / testnet first guidance Multiple pages explicitly recommend --dry-run and testnet validation before mainnet operations. This layered safety advice reduces user errors in irreversible DeFi operations.
Read vs. write command labeling Every command in the Command Guide is labeled (read) or (write), making it immediately clear which commands require a wallet. This is a well-thought-out UX detail.
Bilingual parity All four new SUN CLI pages have corresponding Chinese translations, and all modified x402 pages have corresponding Chinese updates. This shows discipline in maintaining i18n parity.
Fallback RPC transparency The new :::note Fallback RPC Endpoint callouts clearly disclose the BankOfAI-operated fallback, its SLA limitations, and how to override it — this is honest and user-respectful documentation.
Code example quality The quickstart-for-human.md examples are complete, runnable snippets (proper imports, env var usage, async patterns) rather than fragments — good for copy-paste workflows.

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 8 6 2 0 Broken/inconsistent links (MJ-01); zh/en line count divergence (MJ-02)
Security 10 10 0 0 Security warnings present; no hardcoded keys; private key caution blocks included
Performance 7 0 0 7 Documentation-only PR; not applicable
Code Quality 8 6 2 0 Dual-mechanism registration undocumented (MJ-03); placeholder addresses (MN-03)
Testing 7 0 0 7 Documentation-only PR; not applicable
Documentation 6 4 2 0 zh/en identifier mismatch (MN-05); API key guidance inconsistency (MN-02)
Compatibility 5 5 0 0 Docusaurus sidebar entries follow existing patterns; i18n mirrored correctly
Observability 4 0 0 4 Documentation-only PR; not applicable

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between main and update-mcp-server. Runtime behavior, integration testing, and deployment impact are not covered. All links to external GitHub repositories and npm packages were evaluated based on text consistency only — actual URL validity was not verified.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-08

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

Code Review Report

Project: BofAI Docs
PR: mainupdate-mcp-server
Review Date: 2026-04-08
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main
To Branch update-mcp-server
Commits 13
Files Changed 51
Lines Added +3,280
Lines Removed -321

Commit History

Hash Message
29ab530 update all docs
0dbacc9 add suncli
64a0c36 fix
53baadb fix
0f53ddb fix
856ed9e Merge branch 'update-mcp-server' of github.com:BofAI/docs into update-mcp-server
0e3cfdd add suncli
2056ef1 Merge branch 'main' into update-mcp-server
7043fb4 update version
0712c70 add suncli
d69c9eb add cuncli
3335240 add gas free
88c765c add sun-cli

Review Summary

Verdict

Verdict: ⚠️ Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 3 10 15 5

Summary

This PR introduces a large documentation expansion: a brand-new four-file SUN CLI documentation suite (~1,300 lines), updates to the TRON MCP Server docs (Privy wallet support, Docker deployment, version changelog entries), significant new x402 protocol quickstarts (agent, human, seller), an OpenClaw extension installer walkthrough, Agent Wallet CLI/SDK updates (Windows support, Node.js 20, init/resolve-address/change-password commands), and a new BANKOFAISkill catalog entry. The overall documentation quality is high — security messaging is prominent, code examples are structured, and admonition usage is consistent.

However, three critical issues must be resolved before merge: a broken GitHub organisation name in a security-critical warning, an environment-variable naming inconsistency that would cause silent authentication failures in the x402 agent quickstart, and an unpinned git+https:// Python SDK install URL that is a reliability and supply-chain risk. Ten major findings address correctness problems in command examples, version numbers that could not be verified, broken/unverified cross-document links, and confusing API documentation. Fifteen minor issues cover edge cases in shell portability, password-handling documentation gaps, formatting artefacts, and cross-file terminology mismatches. Five suggestions are offered for documentation quality improvements.


Change Summary

1. SUN CLI — New Documentation Suite (4 new files)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md Added Introduction and feature overview for the new @bankofai/sun-cli package
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Added Installation, prerequisites, and first-use guide
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Added Full 860-line CLI command reference covering wallet, token, swap, pool, liquidity, farming, governance, contract, and utility commands
docs/McpServer-Skills/MCP/SUNCli/FAQ.md Added Common questions and troubleshooting guide

Purpose: Documents the new SUN CLI tool that exposes SunSwap DeFi capabilities as a structured command-line interface for both human and AI-agent consumers.

2. TRON MCP Server — Documentation Updates

File Change Type Description
docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md Modified Added v1.1.7 changelog entries, MCP protocol version info, gas-free transfer questions
docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md Modified Minor copy changes
docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md Modified Legacy wallet deprecation notices, Docker deployment option (Option D), Agent Wallet migration instructions
docs/McpServer-Skills/MCP/TRONMCPServer/ToolList.md Modified Minor version/tag updates

Purpose: Updates the TRON MCP Server documentation to reflect v1.1.7 changes, deprecate the old private-key based wallet in favour of Agent Wallet, and document the new Docker deployment path.

3. Agent Wallet — Documentation Updates

File Change Type Description
docs/Agent-Wallet/Developer/CLI-Reference.md Modified New init, resolve-address, change-password, and inspect --show-address commands; Privy wallet type tip; example output annotations
docs/Agent-Wallet/Developer/SDK-Guide.md Modified Node.js requirement 18→20, Privy error types added
docs/Agent-Wallet/Developer/SDK-Cookbook.md Modified New "More Examples" section with EVM transfer, multi-network, and Privy examples
docs/Agent-Wallet/FAQ.md Modified Privy wallet comparison, OS support updated (Windows added, Node.js bumped to ≥20)
docs/Agent-Wallet/QuickStart.md Modified Node.js requirement 18→20

Purpose: Reflects new Agent Wallet capabilities: Privy server-wallet support, Windows compatibility, new CLI commands, and a Node.js 20 minimum.

4. x402 Protocol — Documentation Suite

File Change Type Description
docs/x402/getting-started/quickstart-for-agent.md Modified AI agent x402 payment integration guide (TRON + BSC, env-var setup, skill config)
docs/x402/getting-started/quickstart-for-human.md Modified Developer x402 client integration (TypeScript + Python)
docs/x402/getting-started/quickstart-for-sellers.md Modified Seller / API-provider x402 setup (FastAPI server, facilitator options, mainnet checklist)
docs/x402/faq.md Modified Updated FAQ entries
docs/x402/sdk-features.md Modified SDK feature matrix updates
docs/x402/index.md Modified Minor intro copy
docs/x402/core-concepts/network-and-token-support.md Modified Network and token reference table updates

Purpose: Substantially expands the x402 payment protocol documentation to cover all three user roles (agent, human developer, API seller) with working code examples in both TypeScript and Python.

5. Other Changes

File Change Type Description
docs/McpServer-Skills/SKILLS/BANKOFAISkill.md Added Skills catalog entry covering sunswap, sunperp, tronscan, trc20-toolkit, multisig-permissions, x402-payment, and recharge-skill
docs/Openclaw-extension/QuickStart.md Modified Detailed installer wizard walkthrough with per-OS instructions
sidebars.js Modified SUN CLI added as new sidebar category
package.json Modified Version bump

Detailed Findings


Critical

[C-01] Wrong GitHub Organisation Name in Security-Critical Warning

Property Value
Severity Critical
Category Security / Correctness
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : lines 32–33

Description

The caution admonition that warns users away from the insecure -k/-m flags references the Agent Wallet repository as https://github.com/ABlockofAI/agent-wallet. Every other file in this repository (and this PR) uses the organisation name BofAI. The broken URL points to a non-existent (or incorrect) repository. This is placed inside the primary security warning of the entire CLI reference, so a user who follows the link to configure a secure wallet will be routed to a 404.

Code

:::caution
For security reasons, avoid using `-k` and `-m` flags in production...
Instead, configure an **agent-wallet** (https://github.com/ABlockofAI/agent-wallet)
:::

Recommendation

:::caution
For security reasons, avoid using `-k` and `-m` flags in production...
Instead, configure an **agent-wallet** (https://github.com/BofAI/agent-wallet)
:::

[C-02] TRON_PRIVATE_KEY vs AGENT_WALLET_PRIVATE_KEY Naming Inconsistency

Property Value
Severity Critical
Category Correctness / Security
File docs/x402/getting-started/quickstart-for-agent.md : lines 62–96

Description

Option B ("Static Private Key") for TRON instructs users to set TRON_PRIVATE_KEY. The Agent Wallet SDK documentation consistently uses AGENT_WALLET_PRIVATE_KEY for static injection mode. If the underlying SDK reads AGENT_WALLET_PRIVATE_KEY and not TRON_PRIVATE_KEY, the x402 agent integration will silently fail at payment time — the environment variable will be set but the wallet SDK will not find it, resulting in a "no wallet configured" error that a user would not be able to trace to this naming mismatch.

Code

# Option B: Static Private Key (for development/testing only)
export TRON_PRIVATE_KEY="your-tron-private-key-here"
# Verify it's set:
echo $TRON_PRIVATE_KEY

Recommendation

Clarify which environment variable is actually consumed by the x402-payment skill vs. the Agent Wallet SDK. If TRON_PRIVATE_KEY is a skill-level wrapper that the skill translates internally, state this explicitly. If the correct name is AGENT_WALLET_PRIVATE_KEY, fix the example:

# Option B: Static Private Key (for development/testing only)
# Note: the x402-payment skill reads this via Agent Wallet SDK's static injection mode
export AGENT_WALLET_PRIVATE_KEY="your-tron-private-key-here"

Also add a prominent production warning that the fallback BankOfAI public endpoint should not be relied upon in production deployments.


[C-03] Python SDK Installed from Unpinned git+https:// URL

Property Value
Severity Critical
Category Security / Code Quality
File docs/x402/getting-started/quickstart-for-human.md : line 96–97; docs/x402/getting-started/quickstart-for-sellers.md : line 128

Description

Both the human and seller quickstart guides install the Python SDK directly from the repository's HEAD:

pip install "bankofai-x402[tron] @ git+https://github.com/BofAI/x402.git#subdirectory=python/x402"

Installing from an unpinned git URL means: (1) the installed version changes without user knowledge whenever the repository is updated; (2) a malicious commit merged to the default branch becomes immediately distributed to all users who re-run the install command; (3) the install is unreliable (fails if the repo is renamed, deleted, or made private). There is no published PyPI package referenced, making this the only available install path.

Recommendation

Option A — Publish to PyPI and document:

pip install "bankofai-x402[tron]"

Option B — Pin to a specific tag or commit:

pip install "bankofai-x402[tron] @ git+https://github.com/BofAI/x402.git@v1.0.0#subdirectory=python/x402"

At minimum, add a callout:

:::caution Development build
This installs directly from the repository's default branch. The version may change
without notice. For production use, pin to a specific release tag.
:::

Major

[MJ-01] contract send Example Conflates Contract Address and Recipient

Property Value
Severity Major
Category Correctness / Code Quality
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : lines 825–827

Description

The example uses TRecipient as both the positional <address> argument (the smart contract address) and as the first element of --args (the transfer recipient). These are two distinct addresses. A TRC20 transfer call needs the token contract address (e.g., USDT at TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t) in the first position, and the recipient wallet address in --args. As written, the example would point contract send at a wallet address rather than a contract, producing a confusing runtime failure.

Code

sun contract send TRecipient transfer --args '["TRecipient","1000000"]' --value 0

Recommendation

# Transfer 1 USDT (6 decimals) from your wallet to TRecipientAddress
sun contract send TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t transfer \
  --args '["TRecipientAddress","1000000"]' --value 0

[MJ-02] Unverifiable MCP Protocol and SDK Version Numbers

Property Value
Severity Major
Category Correctness
File docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md : line 207

Description

The FAQ states the server uses @modelcontextprotocol/sdk 1.22.0 or higher with protocol version 2025-11-25. The protocol version string looks unusual (future-dated from a historical perspective and much higher than publicly known releases), and @modelcontextprotocol/sdk 1.22.0 would be a very high minor version for that package. If these numbers are incorrect, developers who attempt to peer their own MCP client will fail to negotiate the correct protocol version.

Recommendation

Verify the exact values against the actual package.json of the deployed TRON MCP Server. Add an npm badge or direct link to the package page so readers can check the latest version themselves:

Uses `@modelcontextprotocol/sdk` [v1.22.0+](https://www.npmjs.com/package/@modelcontextprotocol/sdk) with protocol version `2025-11-25`.

[MJ-03] Broken Cross-Document Link in SUNCli QuickStart

Property Value
Severity Major
Category Correctness / Navigation
File docs/McpServer-Skills/MCP/SUNCli/QuickStart.md : line 147

Description

The "Next Steps" section links to ../SUNMCPServer/Intro.md. The actual directory under McpServer-Skills/MCP/ does not appear to contain a SUNMCPServer subdirectory (the TRON MCP Server lives under TRONMCPServer). This link will 404 in the rendered documentation site.

Recommendation

Verify the target directory name and correct the link. If no SUN MCP Server documentation exists yet, replace with a valid link or remove the forward reference until it is created:

<!-- If linking to TRON MCP Server: -->
[TRON MCP Server →](../TRONMCPServer/Intro.md)

[MJ-04] FAQ File Name Case Sensitivity Risk (BANKOFAISkill)

Property Value
Severity Major
Category Correctness / Navigation
File docs/McpServer-Skills/SKILLS/BANKOFAISkill.md : line 283

Description

The "Next Steps" section links to ./Faq.md (capital F, lowercase aq). On case-sensitive Linux filesystems used in CI/CD and production servers, this link will 404 if the file is named FAQ.md (all caps), which is the convention used everywhere else in this repo. The sidebar entry references McpServer-Skills/SKILLS/Faq — implying the file might intentionally be named Faq.md — but this violates the convention and is likely an error.

Recommendation

Rename the file to FAQ.md to match all other FAQ files, update the sidebar entry accordingly, and update the link in BANKOFAISkill.md:

[FAQ →](./FAQ.md)

[MJ-05] TRON Server Example Missing Explicit Mechanism Registration

Property Value
Severity Major
Category Code Quality / Correctness
File docs/x402/getting-started/quickstart-for-sellers.md : lines 163–164

Description

The TRON server code uses schemes=["exact_permit"] but does not explicitly register ExactPermitTronServerMechanism on the X402Server object, unlike the BSC example which follows an explicit pattern. This silently relies on SDK defaults. If the default mechanism changes in a future SDK version, the TRON server will break without a clear error.

Code

# TRON version (implicit)
server = X402Server(schemes=["exact_permit"], ...)

# BSC version (explicit - more robust)
server = X402Server(...)
server.register_mechanism(ExactPermitBscServerMechanism(...))

Recommendation

Apply the same explicit registration pattern to the TRON example:

from bankofai.x402.server.mechanisms.tron import ExactPermitTronServerMechanism

server = X402Server(...)
server.register_mechanism(
    ExactPermitTronServerMechanism(pay_to_address=PAY_TO_ADDRESS)
)

[MJ-06] PAY_TO_ADDRESS Placeholder Not Validated at Startup

Property Value
Severity Major
Category Security / Code Quality
File docs/x402/getting-started/quickstart-for-sellers.md : line 178

Description

The code uses PAY_TO_ADDRESS = "YourTronWalletAddressHere" as a placeholder. Python does not validate this string at import time, so the FastAPI app will start successfully even if the user forgets to replace it. The error will only manifest at payment verification time — likely with a confusing cryptographic failure, not a clear configuration error.

Recommendation

Add an explicit startup check:

PAY_TO_ADDRESS = "YourTronWalletAddressHere"

# Add this validation block immediately after the assignment:
if not PAY_TO_ADDRESS.startswith("T") or len(PAY_TO_ADDRESS) != 34:
    raise ValueError(
        "PAY_TO_ADDRESS is still a placeholder. "
        "Replace it with your TRON wallet address before starting the server."
    )

[MJ-07] Windows Support Version Number Cannot Be Verified

Property Value
Severity Major
Category Correctness
File docs/Agent-Wallet/FAQ.md : line 144

Description

The FAQ states Windows support was introduced in Agent Wallet v2.3.x. No other document in this repository or PR references Agent Wallet version numbers, and the docs package.json is at 1.2.8. If the Agent Wallet library is at a different version, this claim is incorrect and will mislead users trying to determine if their installed version supports Windows.

Recommendation

Verify the exact release version from the Agent Wallet changelog and add a link:

Windows support was added in **[v2.3.0](https://github.com/BofAI/agent-wallet/releases/tag/v2.3.0)**.

[MJ-08] Confusing Env-Var vs HTTP-Header Documentation for TronGrid API Key

Property Value
Severity Major
Category Correctness / Clarity
File docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md : lines 94–98

Description

The FAQ mixes two different configuration contexts within the same answer: the environment variable TRONGRID_API_KEY (for local deployments) and the HTTP header TRONGRID-API-KEY:your-key (for the cloud service). These are two distinct mechanisms, and the distinction is never explained clearly. A user may set the env var and expect the cloud service to use it, or vice versa.

Recommendation

Split the answer into two clearly labelled subsections:

**Local deployment:** Set the environment variable `TRONGRID_API_KEY=your-key` in your `.env` file.

**Official cloud service:** Pass the HTTP header `TRONGRID-API-KEY: your-key` in each request to the hosted endpoint.

[MJ-09] Python SDK Cookbook Example Has No 0x-Prefix Guard

Property Value
Severity Major
Category Code Quality
File docs/Agent-Wallet/Developer/SDK-Cookbook.md : lines 337–338

Description

The EVM transfer cookbook example calls bytes.fromhex(signed_tx_hex) which will raise ValueError if signed_tx_hex starts with 0x. While the SDK documentation states signatures are returned without the 0x prefix, this assumption is not guarded against. If a future SDK version changes this, the example breaks with an opaque error.

Code

raw_tx = bytes.fromhex(signed_tx_hex)  # breaks if SDK ever returns "0x..." prefix

Recommendation

# Strip any '0x' prefix defensively, as SDK contract guarantees prefix-less output
# but this makes the example resilient to future SDK changes
raw_tx = bytes.fromhex(signed_tx_hex.removeprefix("0x"))

[MJ-10] TRON_GRID_API_KEY vs TRONGRID_API_KEY — One Is Wrong

Property Value
Severity Major
Category Correctness / Consistency
File docs/McpServer-Skills/MCP/SUNCli/QuickStart.md : line 134

Description

SUNCli's QuickStart references the environment variable as TRON_GRID_API_KEY (with an underscore between TRON and GRID), while all other documentation in this PR and the existing codebase uses TRONGRID_API_KEY (no underscore). Only one of these can be the variable actually read by the underlying SDK. A user who sets the wrong one will get silent failures when TronGrid rate-limits their requests.

Recommendation

Verify the correct variable name against the source code of the TRON MCP Server / SUN CLI and update all references to the single canonical name. Then add a cross-file find-and-replace to ensure consistency.


Minor

[MN-01] GitHub Org Name Used for SUN CLI Repository is Unverified

Property Value
Severity Minor
Category Correctness
File docs/McpServer-Skills/MCP/SUNCli/FAQ.md : line 133

Description

The "Still Need Help?" section links to https://github.com/BofAI/sun-cli. Three different organisation names appear across this PR: BofAI (GitHub, most files), bankofai (npm scope), and ABlockofAI (one wrong occurrence in CommandGuide). The BofAI/sun-cli link should be verified to exist before the PR is merged.

Recommendation

Confirm the correct GitHub repository URL for the SUN CLI project and ensure it is used consistently throughout the documentation.


[MN-02] -p Password Flag Shown Without Shell-History Warning

Property Value
Severity Minor
Category Security
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : line 51

Description

The Global Flags example sun -p your_agent_wallet_password wallet address shows the password inline without noting that this records it in shell history — the same risk the caution block warns about for -k and -m.

Recommendation

Add a note beneath the -p example:

> **Note:** Passing `-p` inline records the password in shell history. For automation, set `AGENT_WALLET_PASSWORD` as an environment variable instead.

[MN-03] SUN CLI Intro Describes SUN MCP Server Before Introducing SUN CLI

Property Value
Severity Minor
Category Documentation Quality
File docs/McpServer-Skills/MCP/SUNCli/Intro.md : line 7

Description

The opening paragraph describes SUN MCP Server before introducing SUN CLI, which is the subject of the document. A new reader will be confused about what they are reading.

Recommendation

Reorder the opening to introduce SUN CLI first, then contrast it with SUN MCP Server.


[MN-04] --no-blacklist Flag Description is Ambiguous

Property Value
Severity Minor
Category Documentation Quality
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : line 246

Description

--no-blacklist is described as "Include blacklisted pools" with default false. While logically consistent, the phrasing is confusing: --no-blacklist (disable the blacklist) and "Include blacklisted pools" say the same thing in different ways.

Recommendation

Restate as: Disable the blacklist filter (include all pools regardless of blacklist status).


[MN-05] Docker Volume Mount Command Incompatible with Windows

Property Value
Severity Minor
Category Compatibility
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : lines 150–156

Description

The Docker run example uses $(pwd)/logs:/app/logs. On Windows, $(pwd) does not work in PowerShell (${PWD}) or CMD (%cd%). Since this PR adds Windows support documentation in Agent Wallet FAQ, the Docker command should be consistent.

Recommendation

Add a tabbed Windows/macOS-Linux code block or inline note:

# macOS / Linux:
-v $(pwd)/logs:/app/logs
# PowerShell (Windows):
-v ${PWD}/logs:/app/logs

[MN-06] QuickStart Omits agent-wallet start Initialisation Step

Property Value
Severity Minor
Category Completeness
File docs/McpServer-Skills/MCP/SUNCli/QuickStart.md : lines 83–89

Description

The QuickStart installs agent-wallet but does not tell users to run agent-wallet start to initialise it. Users who install but do not initialise the wallet will receive a confusing "No wallet configured" error when first running SUN CLI commands.

Recommendation

Add an explicit initialisation step after the install command:

npm install -g @bankofai/agent-wallet
agent-wallet start   # creates and encrypts your wallet

[MN-07] change-password Command Offers No Secure Non-Interactive Path for New Password

Property Value
Severity Minor
Category Security
File docs/Agent-Wallet/Developer/CLI-Reference.md : lines 300–325

Description

The change-password command documents only the inline --new-password flag approach for non-interactive use, which records the new password in shell history. Unlike the init/start commands, no env-var or file-based alternative is offered.

Recommendation

Add guidance for a secure non-interactive path:

# Preferred: pipe the new password from a secrets manager
echo "NewSecurePassword" | agent-wallet change-password --new-password-stdin
# Or set via environment variable (if supported by the version)
AGENT_WALLET_NEW_PASSWORD="NewSecurePassword" agent-wallet change-password

[MN-08] Python Version Requirement Inconsistency (3.10 vs 3.11)

Property Value
Severity Minor
Category Consistency
File docs/x402/getting-started/quickstart-for-human.md : line 30

Description

The x402 human quickstart lists Python 3.10+ as a prerequisite. The Agent Wallet SDK Guide requires Python ≥3.11. A user who installs Python 3.10 based on the x402 guide will later fail when using the Agent Wallet SDK.

Recommendation

Standardise the minimum Python version to 3.11 across all documents, or explicitly note which component requires which version.


[MN-09] SDK Install Verification Command Tests the Wrong Import

Property Value
Severity Minor
Category Code Quality
File docs/x402/getting-started/quickstart-for-sellers.md : line 139

Description

The verification step python -c "import bankofai.x402; print('SDK installed successfully!')" only confirms the top-level module imports. It does not verify that the specific server components used in the tutorial are importable.

Recommendation

python -c "from bankofai.x402.server import X402Server; print('SDK installed successfully!')"

[MN-10] x402 FAQ Contradicts Quickstart on Self-Hosting vs. Official Facilitator

Property Value
Severity Minor
Category Consistency
File docs/x402/faq.md : line 43

Description

The FAQ says "Typically, you run your own Facilitator service. x402 is designed for self-hosting." The seller quickstart recommends the Official Facilitator first. This contradiction creates a misleading first impression for FAQ readers.

Recommendation

Update the FAQ to reflect the recommended path:

You can use the **Official Facilitator** service (recommended for getting started quickly)
or run your own **self-hosted Facilitator** for full control in production.

[MN-11] Full-Width CJK Parentheses in BANKOFAISkill.md

Property Value
Severity Minor
Category Formatting
File docs/McpServer-Skills/SKILLS/BANKOFAISkill.md : line 247

Description

The example URL contains full-width CJK parentheses: https://api.example.com (replace with the actual paid endpoint URL you want to call). These are Unicode full-width characters, not standard ASCII parentheses.

Recommendation

Replace with standard ASCII parentheses:

https://api.example.com (replace with the actual paid endpoint URL you want to call)

[MN-12] OpenClaw Private Key Terminal Prompt Exposure Not Mentioned

Property Value
Severity Minor
Category Security
File docs/Openclaw-extension/QuickStart.md : lines 254–263

Description

The installer caution mentions that the config file permissions are set to 600, but does not note that typing a private key into an interactive terminal prompt may itself be logged by some terminal audit configurations.

Recommendation

Add a brief note:

> **Note:** The private key is accepted via an interactive prompt, which may be logged
> by terminal audit software (e.g., `script`, `ttyrec`). Use a minimal-balance dedicated
> wallet for the BNB Chain integration.

[MN-13] TypeScript SDK Server Role Not Available — Missing Prominent Warning

Property Value
Severity Minor
Category Completeness
File docs/x402/sdk-features.md and docs/x402/getting-started/quickstart-for-sellers.md

Description

The SDK feature matrix marks TypeScript Server, Facilitator and related server-role features as (planned). The seller quickstart is Python-only, but there is no prominent notice at the top of that guide informing TypeScript developers that server-side support is not yet available.

Recommendation

Add to the top of quickstart-for-sellers.md:

:::info TypeScript server support coming soon
The server-side code in this guide is Python only. TypeScript server support is currently
planned — see [SDK Features](../sdk-features.md) for the current roadmap.
:::

[MN-14] start Script Uses --openssl-legacy-provider (Outdated Dependencies Signal)

Property Value
Severity Minor
Category Code Quality
File package.json : line 8

Description

The start script uses NODE_OPTIONS='--openssl-legacy-provider', indicating the project relies on deprecated OpenSSL behavior due to an outdated Docusaurus 2.4.3 dependency chain. This flag may stop working in future Node.js LTS releases and represents accumulated technical debt.

Recommendation

Consider upgrading to Docusaurus 3.x which supports Node.js 20+ natively without the legacy flag. At minimum, document why the flag is present in a CONTRIBUTING.md note.


[MN-15] Shell Comment Says "capture the hash output" — Should Be "signature"

Property Value
Severity Minor
Category Documentation Quality
File docs/Agent-Wallet/Developer/CLI-Reference.md : lines 350–362

Description

A shell script example contains the comment # capture the hash output but sign msg returns a signature, not a hash.

Recommendation

# capture the signature output
SIGNATURE=$(agent-wallet sign msg "Hello from my script" -n tron)

Suggestions

[S-01] Add a Read/Write Legend at the Top of CommandGuide.md

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md
Description: Many command section headers include (read) or (write) labels but there is no legend explaining what these mean or their resource implications (write operations cost TRX bandwidth/energy).
Suggestion: Add a brief table at the top of the command reference explaining the labelling system and wallet/resource requirements for write operations.


[S-02] Explain V4 vs V3 Token Argument Differences in Liquidity Section

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md (Liquidity section)
Description: V4 liquidity commands require --token0/--token1 at every call, while V3 treats them as optional. This architectural difference is not explained.
Suggestion: Add a brief note explaining that V4 uses a different position identification model from V3 NFTs, which is why token context is required at every V4 call.


[S-03] Provide a Self-Hostable Fallback for the Demo Endpoint

File: docs/x402/getting-started/quickstart-for-agent.md, docs/x402/getting-started/quickstart-for-human.md
Description: Both guides use https://x402-demo.bankofai.io/protected-nile as the test endpoint. If this is down, users cannot complete the tutorial.
Suggestion: Point users to the seller quickstart to spin up their own test server as a fallback, or provide a status page URL for the demo endpoint.


[S-04] Add a Docker Update Path to the TRON MCP Server FAQ

File: docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md : line 200
Description: The "How do I update to the latest version?" section covers source-based deployments only. Docker users (Option D in the deployment guide) have no documented update path.
Suggestion:

**Docker deployment:**
docker pull bankofai/tron-mcp-server:latest
docker stop mcp-server-tron && docker rm mcp-server-tron
# Then re-run the original docker run command

[S-05] Consider Removing Emoji from Developer SDK Guide Headers

File: docs/Agent-Wallet/Developer/SDK-Guide.md : line 146
Description: Section headers use emoji (🛡️, ⚠️) inconsistently with the CLI-Reference and CommandGuide which use plain text headers. Emoji can cause issues in PDF exports and some documentation systems.
Suggestion: Standardise developer-oriented docs to plain text headers, reserving emoji for user-facing guides where they aid quick scanning.


Cross-File Consistency Issues

# Issue Files Affected Severity
X-1 Node.js version inconsistency: Openclaw-extension/QuickStart.md still requires v18 while all other docs now require v20 docs/Openclaw-extension/QuickStart.md vs 5 other files Major
X-2 GitHub org name: ABlockofAI (1 occurrence) vs BofAI (everywhere else) docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Critical (covered in C-01)
X-3 TronGrid env var: TRON_GRID_API_KEY vs TRONGRID_API_KEY — only one can be correct docs/McpServer-Skills/MCP/SUNCli/QuickStart.md vs all others Major (covered in MJ-10)
X-4 Python minimum version: 3.10 vs 3.11 across different documents docs/x402/getting-started/quickstart-for-human.md vs Agent-Wallet/Developer/SDK-Guide.md Minor (covered in MN-08)

Positive Observations

Area Observation
Security messaging Security warnings are prominent, appropriately placed, and use :::danger/:::caution admonitions correctly throughout all new documentation
Privy wallet integration Privy wallet type is consistently documented across CLI-Reference, FAQ, SDK-Guide, and QuickStart — including accurate security tradeoffs between cloud custody and local encryption
SUN CLI command coverage CommandGuide.md comprehensively covers all command categories with uniform table formatting, required/optional flag labeling, and working examples
Agent Wallet error hierarchy New Privy-specific error types (PrivyConfigError, PrivyRequestError, PrivyRateLimitError, PrivyAuthError) are correctly documented in the error type hierarchy
x402 seller quickstart structure The separation of Official Facilitator vs. Self-Hosted paths, the mainnet migration checklist, and the troubleshooting table are all production-quality documentation
SDK Cookbook defensive coding The TRON transfer example validates fromAddress vs wallet address, checks for txID, and guards against missing signatures — demonstrating best-practice error handling in examples
Windows support documentation The Openclaw QuickStart includes Windows-specific icacls permission notes and the FAQ covers npm permission fixes — thorough cross-platform coverage
Admonition consistency Use of :::tip, :::caution, :::danger, and :::warning is consistent and contextually appropriate throughout all changed files
--dry-run flag promotion The repeated recommendation to use --dry-run before executing write operations is an excellent safety-oriented pattern throughout the SUN CLI docs

Checklist Results

Category Items Checked Pass Fail N/A
Correctness 8 5 3 0
Security 10 7 3 0
Performance 7 7 0 0
Code Quality 10 7 3 0
Testing 7 3 2 2
Documentation 6 4 2 0
Compatibility 5 3 2 0
Observability 5 5 0 0

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analysed only the diff between main and update-mcp-server. Runtime behaviour, integration testing, and deployment impact are not covered. All command examples and version numbers in the changed documentation should be validated against the actual source code before merge.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-08

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

Code Review Report

Project: BofAI/docs
PR: main -> update-mcp-server
Review Date: 2026-04-08
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch origin/main
To Branch origin/update-mcp-server
Commits 15
Files Changed 54
Lines Added +3,284
Lines Removed -325

Commit History

Hash Message
3d44188 update all docs
29ab530 update all docs
0dbacc9 add suncli
64a0c36 fix
53baadb fix
0f53ddb fix
856ed9e Merge branch 'update-mcp-server' of github.com:BofAI/docs into update-mcp-server
0e3cfdd add suncli
2056ef1 Merge branch 'main' into update-mcp-server
7043fb4 update version
0712c70 add suncli
d69c9eb add suncli
3335240 add gas free
5a8e320 fix
88c765c add sun-cli

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 1 4 3

Summary

This PR is a substantial documentation update spanning 54 files across English and Chinese (zh-Hans) localizations. The core changes introduce an entirely new SUN CLI section (4 files + 4 zh-Hans translations), update the TRON MCP Server docs to reflect v1.1.7 breaking changes (removal of legacy TRON_PRIVATE_KEY/TRON_MNEMONIC wallet modes in favor of Agent Wallet), add a new exact_gasfree payment scheme to the x402 stack, document the Privy wallet type and new agent-wallet commands, and bump the Node.js requirement from ≥18 to ≥20.

The overall quality is high: security posture is improved (legacy plaintext key variables removed, migration to encrypted Agent Wallet enforced, SDK examples updated to TronClientSigner.create()), and the new SUN CLI docs are thorough with good security admonitions. However, one major concern stands out: the v1.1.7 breaking removal of TRON_PRIVATE_KEY/TRON_MNEMONIC is only documented in the FAQ and LocalPrivatizedDeployment pages — the QuickStart path, which is the most commonly followed path for new users, carries no migration warning. Additionally, a likely broken internal link in the new SUN CLI QuickStart and a translation gap for two new CLI commands in the zh-Hans docs warrant attention before merge.


Change Summary

1. SUN CLI — New Documentation (4 files + 4 zh-Hans mirrors)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md Added Overview, capabilities table, CLI vs MCP Server comparison, output modes, network support, security notes
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Added Step-by-step install and first query, wallet config, testnet swap, env var setup
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Added Complete command reference: 860 lines covering wallet, price, token, swap, pool, liquidity, position, pair, farm, protocol, tx, contract
docs/McpServer-Skills/MCP/SUNCli/FAQ.md Added Troubleshooting: install, wallet errors, network flag order, AI agent integration
sidebars.js Modified Added SUN CLI category under McpServer-Skills/MCP
i18n/zh-Hans/.../SUNCli/*.md Added Chinese translations of all four SUN CLI docs
i18n/zh-Hans/.../sidebars.js Modified Added SUN CLI category to Chinese sidebar

Purpose: Introduces SUN CLI (@bankofai/sun-cli) as a new documented tool, a command-line DeFi interface for the SunSwap/SUN.IO ecosystem on TRON.


2. TRON MCP Server v1.1.7 Breaking Changes

File Change Type Description
docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md Modified Replaces "only read tools" explanation with "write tools visible, wallet checked at runtime"; removes TRON_PRIVATE_KEY format section; adds v1.1.7 changelog entry; adds migration caution
docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md Modified Updates tool count 95→97; updates deployment comparison wording
docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md Modified Removes Options 2 (Private Key) and 3 (Mnemonic); adds Docker (Option D); documents MCP_PORT/MCP_HOST env vars; HTTP mode clarified as stateless
docs/McpServer-Skills/MCP/TRONMCPServer/ToolList.md Modified Updates tool count 95→97; updates write-tool visibility behavior
docs/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md Modified Updates tool count reference 95→97
docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md Modified Updates tool count reference 95→97

Purpose: Reflects v1.1.7 changes: TRON_PRIVATE_KEY and TRON_MNEMONIC removed, Agent Wallet is now the sole wallet method; write tools are now always registered but wallet-gated at execution; tool count increased by 2; Docker deployment added.


3. Agent-Wallet Documentation Updates

File Change Type Description
docs/Agent-Wallet/QuickStart.md Modified Node.js requirement bumped 18→20
docs/Agent-Wallet/FAQ.md Modified Adds privy to wallet type comparison; Node.js 18→20; Windows support added (v2.3.x)
docs/Agent-Wallet/Developer/SDK-Guide.md Modified Node.js 18→20; adds 4 new Privy error types to error hierarchy
docs/Agent-Wallet/Developer/CLI-Reference.md Modified Adds privy wallet type tip; adds agent-wallet init command; adds --show-address to inspect; adds resolve-address command; adds non-interactive change-password; adds shell-history caution
docs/Agent-Wallet/Developer/SDK-Cookbook.md Modified Adds "More Examples" section with 7 advanced example links

Purpose: Documents new wallet type (privy), new CLI commands (init, resolve-address), upgraded Node.js requirement, Windows support, and Privy error types.


4. x402 Documentation Updates

File Change Type Description
docs/x402/core-concepts/network-and-token-support.md Modified Adds exact_gasfree scheme; GasFree account management CLI docs; updates payment scheme count 2→3
docs/x402/faq.md Modified Updates payment scheme answer to include exact_gasfree
docs/x402/getting-started/quickstart-for-agent.md Modified Adds Agent Wallet as Option A; renames BSC_PRIVATE_KEYAGENT_WALLET_PRIVATE_KEY; adds fallback RPC note
docs/x402/getting-started/quickstart-for-human.md Modified Renames BSC_PRIVATE_KEYAGENT_WALLET_PRIVATE_KEY; Python/TS examples updated to use TronClientSigner.create() / EvmClientSigner.create(); adds ExactGasFreeClientMechanism; timeout 60→120
docs/x402/getting-started/quickstart-for-sellers.md Modified Renames BSC_PRIVATE_KEYAGENT_WALLET_PRIVATE_KEY; updates TronGrid API key description; adds fallback RPC note
docs/x402/sdk-features.md Modified Adds exact_gasfree/tron, SufficientBalancePolicy, GasFree, and USDD to feature matrix
docs/x402/index.md Modified Minor bold formatting for TRON/BSC

Purpose: Documents the new exact_gasfree TRON payment scheme (zero-gas USDT/USDD payments via GasFree Proxy), renames the BSC private key environment variable, and migrates SDK examples from raw private key reads to agent-wallet create() factory methods.


5. OpenClaw Extension and BANKOFAI Skill Updates

File Change Type Description
docs/Openclaw-extension/QuickStart.md Modified mcp-server-tron install now fully automatic (no API key prompt); adds TronScan API key config section; x402 config file added to clean install list
docs/McpServer-Skills/SKILLS/BANKOFAISkill.md Modified Adds advanced TRC20 features (batch balances, dry-run, metadata); adds safety feature list; adds multisig key details; adds lockout danger warning

Purpose: Reflects updated installer behavior and documents additional skill capabilities.


6. Configuration

File Change Type Description
package.json Modified Version bump 1.2.7 → 1.2.8

Detailed Findings


Major

[MJ-01] Breaking Change Migration Path Not Visible from QuickStart

Property Value
Severity Major
Category Documentation
File docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md : Lines 47-82 / docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Lines 50-95

Description

v1.1.7 removes TRON_PRIVATE_KEY and TRON_MNEMONIC as supported wallet environment variables — this is a breaking change for any existing user who configured their local deployment using these variables. The migration notice (caution admonition) only appears in LocalPrivatizedDeployment.md and the FAQ. The QuickStart.md and Intro.md pages — which are the entry points most users follow — contain no mention of the removal or any link to migration instructions. A user returning to the QuickStart to reconfigure their deployment would not encounter the deprecation notice at all.

Code

+:::caution Legacy wallet options removed
+As of v1.1.7, the legacy `TRON_PRIVATE_KEY` and `TRON_MNEMONIC` environment variables
+are no longer supported. All wallet management is now handled through Agent Wallet.
+If you were previously using plaintext private keys or mnemonics, please migrate to
+Agent Wallet for improved security.
+:::

(Only appears in LocalPrivatizedDeployment.md. Absent from QuickStart.md and Intro.md.)

Recommendation

Add a visible migration banner to TRONMCPServer/QuickStart.md and TRONMCPServer/Intro.md:

:::caution Breaking change in v1.1.7
`TRON_PRIVATE_KEY` and `TRON_MNEMONIC` are no longer supported. Migrate to
[Agent Wallet](./LocalPrivatizedDeployment.md#agent-wallet) before upgrading.
:::

Minor

[MN-01] Likely Broken Internal Link in SUN CLI QuickStart

Property Value
Severity Minor
Category Documentation
File docs/McpServer-Skills/MCP/SUNCli/QuickStart.md : Line 147

Description

The SUN CLI QuickStart "Next Steps" section links to ../SUNMCPServer/Intro.md. Based on the sidebar structure and the files added in this PR, there is no McpServer-Skills/MCP/SUNMCPServer/ directory — the TRON MCP Server is at TRONMCPServer/ and no separate "SUN MCP Server" docs directory exists. This link will resolve to a 404 in the rendered documentation site.

Code

- **[SUN MCP Server](../SUNMCPServer/Intro.md)** — Prefer AI-driven DeFi? Use SUN MCP Server
  for natural language interaction

Recommendation

Verify whether a SUNMCPServer docs directory is planned. If not, either remove this link or correct it to point to the TRONMCPServer intro or the top-level MCP category page. Example:

- **[TRON MCP Server](../TRONMCPServer/Intro.md)** — Prefer AI-driven DeFi? Use TRON MCP Server for natural language interaction

[MN-02] agent-wallet init Command Missing from zh-Hans CLI-Reference Translation

Property Value
Severity Minor
Category Documentation
File i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/Developer/CLI-Reference.md

Description

The English CLI-Reference.md gained a 24-line section documenting the new agent-wallet init command (initialize secrets directory without creating a wallet). The zh-Hans translation of CLI-Reference.md has +54 lines vs the English's +89 lines, and the init section is not present in the Chinese diff. Chinese-speaking users who read the zh-Hans version will not know this command exists.

Code

### `agent-wallet init` (Initialize Secrets Directory)

Initialize the secrets directory and set the master password — without creating a
wallet yet. This is useful for advanced scenarios where you want to prepare the
directory before adding wallets.
...

(Present in English; absent from zh-Hans.)

Recommendation

Add the translated agent-wallet init section to the zh-Hans CLI-Reference.md to keep the translation parity consistent with the English source.


[MN-03] --show-address Inspect Flag Missing from zh-Hans CLI-Reference Translation

Property Value
Severity Minor
Category Documentation
File i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/Developer/CLI-Reference.md

Description

The English version documents a new --show-address flag for the agent-wallet inspect command (lines 71–79 in the English diff). This is also not present in the zh-Hans diff, continuing the pattern of translation gap for new commands.

Code

Show wallet metadata along with derived addresses:
```bash
agent-wallet inspect my-bsc-wallet --show-address
Flag Description
--show-address Derive and display EVM + TRON addresses ...
*(Present in English; absent from zh-Hans.)*

**Recommendation**

> Add the translated `--show-address` documentation block to the zh-Hans `CLI-Reference.md`.

---

#### [MN-04] GasFree Activation Deposit Amount Is Hardcoded and May Become Stale

| Property | Value |
|----------|-------|
| **Severity** | Minor |
| **Category** | Documentation |
| **File** | `docs/x402/core-concepts/network-and-token-support.md` : Line (GasFree activation section) |

**Description**

> The documentation states that GasFree account activation "deposits a small amount of tokens (~3.05 USDT on nile)". Hardcoding a specific token amount in documentation is risky — if the protocol changes the activation deposit requirement, this figure silently becomes incorrect and may mislead users who rely on it for pre-funding their wallets.

**Code**

```markdown
The activation process deposits a small amount of tokens (~3.05 USDT on nile) to fund
the GasFree wallet, then submits a GasFree transaction to trigger activation.

Recommendation

Replace the hardcoded amount with a directional note and refer users to the GasFree info command for the current value:

The activation process deposits a small amount of tokens (run `--gasfree-info` first
to see the current required amount) to fund the GasFree wallet, then submits a GasFree
transaction to trigger activation.

Suggestions

[S-01] SUN CLI Examples Normalize --private-key Inline Flag Despite Security Warning

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md

Description: The CommandGuide correctly includes a :::caution Private Key Security block warning that -k/--private-key flags appear in shell history. However, the Global Flags example immediately below still shows sun -k your_private_key --network nile --yes swap TRX USDT 1000000, which normalizes the unsafe pattern. Consider replacing the inline key example with an environment variable version, or adding an explicit note that the inline example is only for illustration.

Suggestion: Replace the example with an agent-wallet or environment-variable-based equivalent, and label inline key examples as "NOT RECOMMENDED for production".


[S-02] httpx Timeout Increase (60→120) Undocumented in Code Comments

File: docs/x402/getting-started/quickstart-for-human.md

Description: The Python examples change httpx.AsyncClient(timeout=60.0) to timeout=120 without any explanation. Users copying this code may not understand why 120 seconds is needed — it may be due to GasFree transaction submission latency, but it's not stated.

Suggestion: Add a brief inline comment: # GasFree transactions may take longer to settle — use a generous timeout.


[S-03] exact_gasfree Activation Scope Not Clarified (One-Time vs Per-Token)

File: docs/x402/core-concepts/network-and-token-support.md

Description: The GasFree activation docs say it is "required before first use" but don't specify whether activation is per-wallet (one-time ever), per-wallet-per-network, or per-wallet-per-token. The --gasfree-activate --token USDT flag implies it may be per-token, but this is not explicitly stated.

Suggestion: Add a clarifying sentence, e.g.: "Activation is required once per wallet address per supported token. If you intend to pay with both USDT and USDD, activate each token separately."


Positive Observations

Area Observation
Security Legacy plaintext TRON_PRIVATE_KEY and TRON_MNEMONIC removed from TRON MCP Server — enforces encrypted Agent Wallet for all write operations
Security SDK examples in quickstart-for-human.md migrated from os.getenv("TRON_PRIVATE_KEY") to TronClientSigner.create() — removes the temptation to hardcode env var names in application code
Security Shell history caution added to change-password non-interactive mode docs — appropriate for a sensitive operation
Security SUN CLI CommandGuide includes a prominent :::caution Private Key Security admonition for the -k/--private-key flag
Security BANKOFAI skill docs now explicitly state that self-transfers are automatically rejected and unlimited (MAX_UINT256) approvals are blocked
UX New resolve-address and --show-address commands make address inspection clear without requiring a signing operation
UX GasFree scheme clearly documents that no API keys are required on the client side (routed through BankOfAI proxy)
UX Docker deployment documentation includes a health check endpoint reference (/health) — useful for monitoring
UX dry-run mode prominently documented in SUN CLI — encourages safe testing before live transactions
Consistency Node.js version bump (18→20) applied consistently across QuickStart, SDK-Guide, FAQ in both English and zh-Hans
Consistency Tool count 95→97 updated consistently across all four files referencing it (Intro, ToolList, OfficialServerAccess, QuickStart)
Structure SUN CLI docs are well-structured with Intro → QuickStart → CommandGuide → FAQ, matching the established pattern of other tool sections
Completeness CommandGuide.md is thorough at 860 lines, covering every command category with option tables, defaults, and usage examples

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 4 3 1 4 Broken internal link (MN-01); all other doc facts internally consistent
Security 6 5 0 1 Good security posture; private-key normalization is a suggestion only
Performance 3 3 0 5 N/A (docs-only PR)
Code Quality 5 4 0 3 Hardcoded GasFree amount (MN-04)
Testing 2 2 0 6 N/A (docs-only PR)
Documentation 8 5 3 0 Breaking change visibility gap (MJ-01); two zh-Hans translation gaps (MN-02, MN-03)
Compatibility 3 2 0 1 Breaking change is intentional and documented (though not prominently)
Observability 2 2 0 6 N/A (docs-only PR)

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between the specified branches. Runtime behavior, integration testing, and deployment impact are not covered. All findings relate to documentation content, accuracy, and user safety — no application code was changed in this PR.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-08

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

Code Review Report

Project: BofAI/docs
PR: main -> update-mcp-server
Review Date: 2026-04-08
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main
To Branch update-mcp-server
Commits 16
Files Changed 54
Lines Added +3,284
Lines Removed -325

Commit History

Hash Message
91f6996 fix
3d44188 update all docs
29ab530 update all docs
0dbacc9 add suncli
64a0c36 fix
53baadb fix
0f53ddb fix
856ed9e Merge branch 'update-mcp-server' of github.com:BofAI/docs into update-mcp-server
0e3cfdd add suncli
2056ef1 Merge branch 'main' into update-mcp-server
7043fb4 update version
0712c70 add suncli
d69c9eb add cuncli
3335240 add gas free
5a8e320 fix
88c765c add sun-cli

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 2 7 3

Summary

This PR introduces a comprehensive documentation update centered around three themes: (1) brand-new SUN CLI documentation (4 files covering Intro, QuickStart, CommandGuide, FAQ in both English and Chinese), (2) a breaking v1.1.7 change to TRON MCP Server that removes legacy wallet modes (TRON_PRIVATE_KEY / TRON_MNEMONIC) in favor of Agent Wallet exclusively, and (3) a new exact_gasfree payment scheme for x402 on TRON. Supporting changes update Agent-Wallet docs to reflect Node.js ≥20 requirement, Windows support, Privy wallet type, and new CLI commands (init, resolve-address). A version bump in package.json (1.2.7 → 1.2.8) and sidebar navigation updates round out the PR.

Overall quality is high: documentation is clear, well-structured, and security-conscious throughout. However, two major issues need resolution before merge: a potentially confusing cross-env-var hint in the human quickstart that may cause BSC signing failures, and a broken link to a SUNMCPServer directory that may not exist in the navigation. Additionally, several minor consistency gaps and missing guidance notes are flagged.


Change Summary

1. SUN CLI — New Documentation (4 files × 2 locales)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md Added Overview of SUN CLI, comparison with SUN MCP Server, output modes, network support, security notes
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Added Install-to-first-query guide, wallet config, testnet swap example
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Added Complete command reference: wallet, price, token, swap, pool, liquidity, position, pair, farm, protocol, tx, contract
docs/McpServer-Skills/MCP/SUNCli/FAQ.md Added Troubleshooting: install, wallet config, common errors, AI agent integration, networks/tokens
i18n/zh-Hans/…/SUNCli/ (×4) Added Exact Chinese-language mirror of the above four files
sidebars.js + versioned sidebars.js Modified Adds "SUN CLI" category under McpServer-Skills/MCP

Purpose: Introduce SUN CLI (@bankofai/sun-cli) as a first-class documented tool alongside SUN MCP Server.


2. TRON MCP Server — v1.1.7 Breaking Changes + Docker

File Change Type Description
docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md Modified Remove Option 2 (TRON_PRIVATE_KEY) and Option 3 (TRON_MNEMONIC); add Option D Docker; document MCP_PORT/MCP_HOST env vars; clarify HTTP mode is stateless
docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md Modified Rewrite "only read tools" section → "write tools visible but wallet checked at execution"; replace "Invalid private key" error section → "Wallet not configured"; add v1.1.7 changelog entry; add legacy migration caution
docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md Modified Tool count 95→97; "Private Key Required" → "Wallet Required (Agent Wallet)"
docs/McpServer-Skills/MCP/TRONMCPServer/ToolList.md Modified Tool count 95→97; update write-tool visibility description
docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md Modified Tool count reference 95→97
docs/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md Modified Tool count reference 95→97

Purpose: Document the v1.1.7 breaking removal of TRON_PRIVATE_KEY/TRON_MNEMONIC, write-tool visibility change, and the newly added Docker deployment option.


3. Agent-Wallet — Node.js 20, Windows, Privy, New Commands

File Change Type Description
docs/Agent-Wallet/QuickStart.md Modified Node.js requirement v18 → v20 throughout
docs/Agent-Wallet/FAQ.md Modified Add privy wallet type to comparison table; Node.js requirement v18 → v20; add Windows support note (v2.3.x)
docs/Agent-Wallet/Developer/SDK-Guide.md Modified Node.js requirement v18 → v20; add 4 new Privy error types to error hierarchy
docs/Agent-Wallet/Developer/CLI-Reference.md Modified Add Privy wallet type tip; add agent-wallet init command; add agent-wallet resolve-address command; add --show-address flag to inspect; non-interactive change-password with security caution; sample output comments in sign commands
docs/Agent-Wallet/Developer/SDK-Cookbook.md Modified Add "More Examples" table linking to TypeScript/Python example directories

Purpose: Reflect the upgraded Node.js requirement, new Privy managed-wallet support, new CLI commands, and Windows compatibility added in recent versions.


4. x402 — GasFree Payment Scheme + SDK Updates

File Change Type Description
docs/x402/core-concepts/network-and-token-support.md Modified Add exact_gasfree payment scheme; add GasFree account management CLI reference; update payment scheme table
docs/x402/faq.md Modified Update payment schemes list to include exact_gasfree
docs/x402/sdk-features.md Modified Add exact_gasfree/tron, SufficientBalancePolicy, GasFree, USDD (TRC-20) to feature matrix
docs/x402/getting-started/quickstart-for-human.md Modified Migrate TRON/BSC code examples to agent-wallet signers; add ExactGasFreeClientMechanism; rename BSC_PRIVATE_KEYAGENT_WALLET_PRIVATE_KEY; increase HTTP timeout 60→120s
docs/x402/getting-started/quickstart-for-agent.md Modified Add Agent Wallet as Option A; document fallback RPC endpoint; rename BSC_PRIVATE_KEYAGENT_WALLET_PRIVATE_KEY; update troubleshooting table
docs/x402/getting-started/quickstart-for-sellers.md Modified Rename BSC_PRIVATE_KEYAGENT_WALLET_PRIVATE_KEY; add fallback RPC note; update TronGrid key guidance
docs/x402/index.md Modified Bold TRON and BSC in network list

Purpose: Document the new exact_gasfree zero-TRX-cost payment scheme on TRON, migrate SDK examples away from raw private keys toward agent-wallet, and rename BSC env var to the unified AGENT_WALLET_PRIVATE_KEY.


5. BANKOFAISkill + Openclaw Extension

File Change Type Description
docs/McpServer-Skills/SKILLS/BANKOFAISkill.md Modified Add TRC20 advanced features (batch balance, dry-run, metadata, safety rules); add multisig key details (24h expiry, permission scoping, lockout danger warning)
docs/Openclaw-extension/QuickStart.md Modified Add x402 config to clean install deletion list; simplify mcp-server-tron configuration (no longer asks for API key interactively); add TronScan API key configuration section

6. Build & Navigation

File Change Type Description
package.json Modified Version bump 1.2.71.2.8
sidebars.js Modified Add SUN CLI category with 4 items
i18n/zh-Hans/…/current/sidebars.js Modified Mirror SUN CLI category in Chinese locale

Detailed Findings


Major

[MJ-01] Cross-network env var reuse hint may break BSC signing

Property Value
Severity Major
Category Correctness / Documentation
File docs/x402/getting-started/quickstart-for-human.md : Lines ~208–210 (BSC tab)

Description

The PR adds a new hint in the BSC configuration tab:

"If you already set TRON_PRIVATE_KEY in the TRON tab, the same key works for BSC — no need to set it again."

This implies that TRON_PRIVATE_KEY is automatically read by the BSC/EVM signer. However, the BSC signing section's env var is AGENT_WALLET_PRIVATE_KEY. If the SDK's EVM signer reads AGENT_WALLET_PRIVATE_KEY (not TRON_PRIVATE_KEY), users following the TRON tab first and then skipping the BSC env var setup will get a signing error when they try BSC operations. This misleads users into skipping a necessary configuration step.

Code

> 💡 **Recommended:** Create a `.env` file in your project directory containing `AGENT_WALLET_PRIVATE_KEY=your_key`, then add `.env` to `.gitignore` to prevent accidental commits.
>
> 💡 If you already set `TRON_PRIVATE_KEY` in the TRON tab, the same key works for BSC — no need to set it again.

Recommendation

Verify whether the EVM signer actually falls back to TRON_PRIVATE_KEY, or whether it exclusively reads AGENT_WALLET_PRIVATE_KEY. If the two signers read different env vars, remove or correct this hint. If the SDK deliberately supports both variable names for cross-chain convenience, add a technical note explaining the fallback lookup order (e.g., "EvmClientSigner.create() checks AGENT_WALLET_PRIVATE_KEY, then TRON_PRIVATE_KEY as a fallback"). Without verification, this note may cause silent failures for BSC users.


[MJ-02] SUNCli QuickStart links to a potentially non-existent SUNMCPServer directory

Property Value
Severity Major
Category Correctness / Documentation
File docs/McpServer-Skills/MCP/SUNCli/QuickStart.md : Line 147 (Next Steps)

Description

The "Next Steps" section at the bottom of both the English and Chinese QuickStart files links to:

../SUNMCPServer/Intro.md

This assumes a directory docs/McpServer-Skills/MCP/SUNMCPServer/ exists in the repository. The diff does not add this directory, and it is not present among the changed files. If the directory does not exist, this will produce a broken link / 404 in the deployed documentation site.

Code

- **[SUN MCP Server](../SUNMCPServer/Intro.md)** — Prefer AI-driven DeFi? Use SUN MCP Server for natural language interaction

Recommendation

  1. Verify whether docs/McpServer-Skills/MCP/SUNMCPServer/ already exists on the main branch (it is not included in the diff).
  2. If the directory does not exist yet, either remove this link for this PR and add it when SUN MCP Server docs are merged, or replace with a placeholder link to a relevant existing page (e.g., the TRON MCP Server intro: ../TRONMCPServer/Intro.md).
  3. Apply the same fix to i18n/zh-Hans/…/SUNCli/QuickStart.md.

Minor

[MN-01] Breaking-change migration notice is buried — missing from QuickStart

Property Value
Severity Minor
Category Documentation
File docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md, docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md

Description

The removal of TRON_PRIVATE_KEY and TRON_MNEMONIC in v1.1.7 is a breaking change — existing users will find their write operations silently failing with "Wallet not configured" instead of working as before. Migration guidance exists only in FAQ.md (caution callout) and LocalPrivatizedDeployment.md (caution callout). The QuickStart.md and Intro.md pages — the first pages most returning users land on — contain no upgrade notice. This increases the risk that existing users are stranded without knowing why.

Recommendation

Add a brief :::caution Upgrading from < v1.1.7 callout near the top of both QuickStart.md and Intro.md that directs users to the FAQ migration section:

:::caution Upgrading from v1.1.6 or earlier?
v1.1.7 removes `TRON_PRIVATE_KEY` and `TRON_MNEMONIC` wallet modes. If write tools return "Wallet not configured", see the [migration guide in the FAQ](./FAQ.md#migrating-from-legacy-wallet-modes).
:::

[MN-02] agent-wallet init section missing shell-history security caution

Property Value
Severity Minor
Category Security / Documentation
File docs/Agent-Wallet/Developer/CLI-Reference.md : agent-wallet init section

Description

The new agent-wallet init section documents a --password, -p <pw> flag to pass the master password in non-interactive mode. The change-password section added in the same PR already correctly includes a :::caution note that -p and --new-password will be recorded in shell history. The init section omits this same warning, inconsistently exposing users to an undocumented security risk when using -p with agent-wallet init.

Code

**Non-interactive mode:**
```bash
agent-wallet init -p 'Abc12345!'
Flag Description
--password, -p <pw> Master password (skip prompt)
--save-runtime-secrets Persist password to runtime_secrets.json

**Recommendation**

Add the same caution box as in `change-password`:

```markdown
:::caution
`-p` will be recorded in shell history. For production use, prefer interactive mode or pipe passwords from a secrets manager.
:::

Apply the same fix to the corresponding Chinese locale file.


[MN-03] Docker deployment omits guidance for write operations via volume mount

Property Value
Severity Minor
Category Documentation / Completeness
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Option D section

Description

The Docker deployment section states the image "runs in read-only HTTP mode by default" and the tip says "For local write operations, use Option A or B." However, it does not explain that write operations could be enabled via Docker by mounting the agent-wallet directory and passing AGENT_WALLET_PASSWORD as an env var. Users who want reproducible containerised deployments with write access have no documented path.

Recommendation

Expand the Docker section with an example showing how to enable write operations:

docker run -d \
  -p 3001:3001 \
  -v $HOME/.agent-wallet:/root/.agent-wallet:ro \
  -e AGENT_WALLET_PASSWORD="<your-password>" \
  -e TRONGRID_API_KEY="<your-key>" \
  mcp-server-tron

Or explicitly state that write operations are intentionally unsupported in the Docker image to avoid confusion.


[MN-04] Inconsistent GitHub organization names across SUN CLI docs

Property Value
Severity Minor
Category Documentation / Consistency
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md (caution callout), docs/McpServer-Skills/MCP/SUNCli/FAQ.md (footer link)

Description

The SUN CLI documentation references two different GitHub organization names:

  • CommandGuide.md (caution): https://github.com/ABlockofAI/agent-wallet
  • FAQ.md (footer): https://github.com/BofAI/sun-cli

Other docs in this repo consistently use https://github.com/BofAI/…. If ABlockofAI is incorrect or a stale organization name, users clicking the agent-wallet link from the SUN CLI command guide will reach a 404. The Chinese locale mirrors this inconsistency.

Code

# CommandGuide.md caution:
Prefer environment variables (`AGENT_WALLET_PRIVATE_KEY`,
`AGENT_WALLET_MNEMONIC`) or [agent-wallet](https://github.com/ABlockofAI/agent-wallet)
encrypted storage for all non-throwaway keys.

# FAQ.md footer:
file an issue on the [GitHub repository](https://github.com/BofAI/sun-cli).

Recommendation

Standardize all agent-wallet GitHub links to use https://github.com/BofAI/agent-wallet (matching the SDK-Cookbook and other existing references), unless ABlockofAI is the authoritative org — in that case, audit and update all existing references.


[MN-05] exact_gasfree activation cost undocumented for mainnet

Property Value
Severity Minor
Category Documentation / Completeness
File docs/x402/core-concepts/network-and-token-support.md : GasFree Account Management section

Description

The GasFree activation section mentions the testnet cost:

"deposits a small amount of tokens (~3.05 USDT on nile)"

But does not document the equivalent mainnet activation cost. For a financial operation involving real assets on mainnet, users need to know the expected cost before proceeding — a vague "small amount" is insufficient for production deployments.

Recommendation

Document the mainnet activation amount explicitly, or add a note directing users to check current activation requirements before running on mainnet:

Use `--gasfree-info` to check the current required activation deposit for the target network before activating.

[MN-06] network-and-token-support.md GasFree section missing in Chinese locale

Property Value
Severity Minor
Category Documentation / Consistency
File i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/core-concepts/network-and-token-support.md

Description

The diff shows the Chinese version of network-and-token-support.md was updated with only 37 line changes (+37/-7) compared to the English version's 46 line changes (+46/-10). Based on the diff content visible in the Chinese locale for this file, the GasFree CLI command examples block (--gasfree-info, --gasfree-activate) appears to be missing or incomplete. This means Chinese-locale readers get less information about how to manage GasFree accounts than English readers.

Recommendation

Ensure the Chinese locale network-and-token-support.md includes the full GasFree Account Management section with CLI examples, mirroring the English version.


[MN-07] quickstart-for-human.md Chinese locale quickstart-for-agent.md section still uses Option B only for TRON wallet setup

Property Value
Severity Minor
Category Documentation / Consistency
File i18n/zh-Hans/…/x402/getting-started/quickstart-for-agent.md

Description

The English quickstart-for-agent.md was restructured to present two options:

  • Option A: Agent Wallet (Recommended)
  • Option B: Static Private Key

The Chinese locale version received the same update (+17/-7 lines). However, inspecting the diff context, the Chinese version correctly mirrors the English dual-option structure. This item is verified as consistent. (Non-issue, noted for completeness.)


Suggestions

[S-01] Commit messages are not descriptive

File: Git log
Description: 9 of 16 commits have messages of "fix", "add suncli", "add cuncli" (possible typo for "sun-cli"), or "update all docs" — none describe what was fixed or updated. This makes git bisect and changelog generation difficult.
Suggestion: For future PRs, use conventional commit format: e.g., docs(sun-cli): add CommandGuide for @bankofai/sun-cli, docs(tron-mcp): document v1.1.7 breaking wallet mode changes. A d69c9eb add cuncli commit message also appears to be a typo for "sun-cli".


[S-02] SUN CLI CommandGuide missing liquidity v4:burn / exit documentation

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md
Description: The CommandGuide documents v4:mint, v4:increase, v4:decrease, v4:collect, and v4:info for V4 liquidity. There is no v4:burn or full exit command documented. V3 similarly has no full-exit shortcut. Users needing to fully exit a position must combine decrease (to 0) and collect steps — this flow is not documented.
Suggestion: Add an example showing how to fully exit a V3 or V4 position (decrease to 0 + collect), or confirm that a dedicated exit command is not available.


[S-03] TronGrid API key env var inconsistency between components

File: Multiple files
Description: The documentation uses two different env var names for the TronGrid API key:

  • TRON_GRID_API_KEY — used in x402 quickstart files and .env.sample references
  • TRONGRID_API_KEY — used in the updated TRON MCP Server LocalPrivatizedDeployment and Docker example

This inconsistency may confuse users configuring multiple tools (x402 facilitator + TRON MCP Server) on the same machine.
Suggestion: Standardize on one env var name across all documentation and tools, or add a note in the getting-started pages explaining that the two components use different variable names intentionally.


Positive Observations

Area Observation
Security Awareness The SUN CLI CommandGuide prominently warns about -k/--private-key flag risks in shell history, and recommends encrypted agent-wallet storage — a good security-first default
Dry-run Pattern Both SUN CLI and BANKOFAISkill document --dry-run / dry-run mode as a safe preview mechanism before financial operations — excellent UX for AI agents
Testnet-First Guidance Consistently throughout the PR, all write-operation sections recommend testing on Nile testnet first with explicit warnings that mainnet operations are irreversible
Fallback RPC Transparency The new fallback RPC endpoint note in x402 docs (agents/sellers quickstart) honestly discloses the BANK OF AI proxy, its lack of SLA, and recommends users configure their own key for production — good transparency
Structured Migration Path The TRON MCP Server breaking change in v1.1.7 is well-documented with :::caution callouts in both FAQ and LocalPrivatizedDeployment, including explicit steps to migrate
GasFree UX Documenting that exact_gasfree requires no API keys on the client side (all routed via BANK OF AI proxy) is a clear and user-friendly design choice that is well-communicated
Bilingual Parity All new English documentation (SUN CLI, agent-wallet updates, x402 changes) has corresponding Chinese translations, maintaining locale parity
:::danger Lockout Warning BANKOFAISkill multisig section correctly adds a :::danger callout warning that Owner permission changes are irreversible — appropriate severity level

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 6 4 2 0 MJ-01 (BSC env var hint), MJ-02 (broken link)
Security 5 4 1 0 MN-02 (missing shell history warning in init)
Performance 4 4 0 0 Timeout increase 60→120s is appropriate
Code Quality 5 4 1 0 MN-04 (inconsistent GitHub org names)
Testing 3 2 0 1 No test files in scope
Documentation 8 5 3 0 MN-01, MN-03, MN-05
Compatibility 4 3 1 0 MN-01 (no prominent breaking-change notice in QuickStart)
Observability 2 2 0 0 Health endpoint documented for Docker

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between the specified branches (main...update-mcp-server). Runtime behavior, integration testing, and deployment impact are not covered. Findings are based on documentation quality, internal consistency, link validity, and security best practices.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-08

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

Code Review Report

Project: BofAI/docs — Documentation Site
PR: mainupdate-mcp-server
Review Date: 2026-04-08
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch remotes/origin/main
To Branch remotes/origin/update-mcp-server
Commits 17
Files Changed 54
Lines Added +3,284
Lines Removed -325

Commit History

Hash Message
a080ac3 fix
91f6996 fix
3d44188 update all docs
29ab530 update all docs
0dbacc9 add suncli
64a0c36 fix
53baadb fix
0f53ddb fix
856ed9e Merge branch 'update-mcp-server' of github.com:BofAI/docs into update-mcp-server
0e3cfdd add suncli
2056ef1 Merge branch 'main' into update-mcp-server
7043fb4 update version
0712c70 add suncli
d69c9eb add cuncli
3335240 add gas free
5a8e320 fix
88c765c add sun-cli

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 3 5 4

Summary

This is a substantial documentation-only PR that introduces complete documentation for the new SUN CLI tool (4 files in English + 4 in Chinese), documents TRON MCP Server v1.1.7 breaking changes (removal of legacy TRON_PRIVATE_KEY/TRON_MNEMONIC wallet modes), adds Privy wallet type support to Agent Wallet, introduces the new exact_gasfree payment scheme for zero-gas TRON payments, and bumps the docs version from 1.2.7 → 1.2.8.

Overall quality is good — security cautions are present throughout, new features are well-explained, and migration paths for breaking changes are clearly communicated. However, there are three major issues: the Chinese translation of CLI-Reference.md is materially incomplete compared to its English counterpart, a dead link exists in the SUN CLI Quick Start, and the exact_gasfree activation cost is hardcoded to a specific testnet figure that may mislead users on mainnet. Several minor and suggestion-level items round out the review.


Change Summary

1. SUN CLI Documentation (New Feature)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md Added Introduction to SUN CLI, feature comparison with SUN MCP Server
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Added 1-minute install & first query guide
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Added Full ~860-line command reference
docs/McpServer-Skills/MCP/SUNCli/FAQ.md Added Troubleshooting, AI integration, network/token Q&A
i18n/zh-Hans/.../SUNCli/{Intro,QuickStart,CommandGuide,FAQ}.md Added Chinese translations of all four files
sidebars.js + i18n/.../sidebars.js Modified SUN CLI section added to navigation

Purpose: Document a new command-line DeFi tool (@bankofai/sun-cli) that wraps SunSwap (SUN.IO) — covering wallet queries, price data, token search, swaps, V2/V3/V4 liquidity, farming, protocol stats, and raw contract interaction on TRON.


2. Agent Wallet — New Features & Version Bump

File Change Type Description
docs/Agent-Wallet/QuickStart.md Modified Node.js minimum version 18 → 20
docs/Agent-Wallet/FAQ.md Modified Node.js bump, Windows support, privy wallet type
docs/Agent-Wallet/Developer/SDK-Guide.md Modified Node.js bump, Privy error types added to hierarchy
docs/Agent-Wallet/Developer/CLI-Reference.md Modified privy type, init command, resolve-address, --show-address flag, non-interactive change-password
docs/Agent-Wallet/Developer/SDK-Cookbook.md Modified More examples table (Privy, cross-wallet consistency)
i18n/zh-Hans/... (same 5 files) Modified Chinese translations (partially incomplete — see Finding MJ-01)

Purpose: Document Agent Wallet v2.3.x additions: Privy-managed cloud wallets, new CLI commands (init, resolve-address), Windows support, and a Node.js 20 requirement.


3. TRON MCP Server v1.1.7 — Breaking Changes

File Change Type Description
docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md Modified Tool count 95 → 97, wording updates
docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md Modified Tool count reference 95 → 97
docs/McpServer-Skills/MCP/TRONMCPServer/ToolList.md Modified Tool count, write tool visibility behavior change
docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md Modified Legacy wallet removal, "Wallet not configured" error guidance, v1.1.7 changelog
docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md Modified Agent Wallet-only config, Docker deployment option D, HTTP mode is now stateless
docs/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md Modified Tool count reference

Purpose: Reflect v1.1.7 changes: removal of TRON_PRIVATE_KEY/TRON_MNEMONIC wallet modes (breaking), write tools now always registered (wallet check at execution time), Docker deployment added, HTTP server made stateless, MCP_PORT/MCP_HOST env vars documented.


4. x402 Payment — exact_gasfree Scheme & SDK Updates

File Change Type Description
docs/x402/core-concepts/network-and-token-support.md Modified exact_gasfree scheme documented, CLI management commands
docs/x402/faq.md Modified exact_gasfree added to payment scheme FAQ
docs/x402/sdk-features.md Modified exact_gasfree, SufficientBalancePolicy, USDD, EIP-155 network IDs
docs/x402/getting-started/quickstart-for-human.md Modified SDK examples use agent-wallet, BSC_PRIVATE_KEYAGENT_WALLET_PRIVATE_KEY, ExactGasFreeClientMechanism added, timeout 60s → 120s
docs/x402/getting-started/quickstart-for-agent.md Modified Agent Wallet as recommended option A, fallback RPC documented
docs/x402/getting-started/quickstart-for-sellers.md Modified BSC_PRIVATE_KEYAGENT_WALLET_PRIVATE_KEY, TronGrid key now optional with fallback
docs/x402/index.md Modified Bold "TRON" and "BSC"

Purpose: Introduce gas-free TRON payments (users pay USDT/USDD without holding TRX). SDK examples migrate from raw private-key construction to agent-wallet's async create() factory.


5. BANK OF AI Skill & Openclaw Extension Updates

File Change Type Description
docs/McpServer-Skills/SKILLS/BANKOFAISkill.md Modified Advanced TRC-20 features, safety guardrails, multisig details, lockout warning
docs/Openclaw-extension/QuickStart.md Modified x402 config in clean-install list, TRON MCP auto-install, TronScan API key section

Purpose: Expand skill documentation with advanced features and safety guidance; update Openclaw installer flow documentation.


Detailed Findings


Major

[MJ-01] Chinese CLI-Reference.md is Missing ~35 Lines of Content vs English

Property Value
Severity Major
Category Documentation
File i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/Developer/CLI-Reference.md

Description

The English docs/Agent-Wallet/Developer/CLI-Reference.md adds 89 lines in this PR, while the Chinese counterpart adds only 54 lines (per git diff --stat). Reviewing the Chinese diff confirms that two sections present in the English version are absent from the Chinese translation:

  1. agent-wallet init command (~22 lines): Explains initializing the secrets directory without creating a wallet — critical for CI/CD users and Privy import scenarios.
  2. --show-address flag for agent-wallet inspect (~8 lines): Without this, Chinese-speaking users have no documentation for the --show-address option.

The missing content leaves Chinese users unable to find documentation for these commands in their language.

Code

English diff adds (absent from Chinese translation):

### `agent-wallet init` (Initialize Secrets Directory)
Initialize the secrets directory and set the master password — without
creating a wallet yet...

| Flag | Description |
| `--password, -p <pw>` | Master password (skip prompt) |
| `--save-runtime-secrets` | Persist password to `runtime_secrets.json` |
Show wallet metadata along with derived addresses:
| Flag | Description |
| `--show-address` | Derive and display EVM + TRON addresses ... |

Recommendation

Add the missing agent-wallet init section and --show-address flag documentation to the Chinese CLI-Reference.md, mirroring the English content.


[MJ-02] Dead Link in SUN CLI QuickStart

Property Value
Severity Major
Category Documentation
File docs/McpServer-Skills/MCP/SUNCli/QuickStart.md : Line 1596 (in the diff)

Description

The SUN CLI Quick Start page links to a page that does not appear to exist in this PR or in the sidebar:

- **[SUN MCP Server](../SUNMCPServer/Intro.md)** — Prefer AI-driven DeFi?
  Use SUN MCP Server for natural language interaction

The path ../SUNMCPServer/Intro.md refers to docs/McpServer-Skills/MCP/SUNMCPServer/Intro.md. No file matching this path is added in this PR and no entry for SUNMCPServer appears in the updated sidebars.js. If this page does not exist, clicking the link will result in a 404 error in the deployed docs site.

Code

- **[SUN MCP Server](../SUNMCPServer/Intro.md)** — Prefer AI-driven DeFi?

Recommendation

Either:

  1. Remove the link and replace with a note that SUN MCP Server documentation is coming soon, or
  2. Change the link target to an existing page (e.g., the TRON MCP Server intro at ../TRONMCPServer/Intro.md), or
  3. Add the SUNMCPServer/Intro.md file in this PR.

Also check whether the corresponding Chinese translation (i18n/zh-Hans/.../SUNCli/QuickStart.md) has the same broken link and apply the same fix.


[MJ-03] exact_gasfree Activation Cost Hardcoded to Testnet Value

Property Value
Severity Major
Category Documentation / Correctness
File docs/x402/core-concepts/network-and-token-support.md : exact_gasfree section

Description

The documentation for GasFree account activation hardcodes a specific testnet amount that is presented ambiguously:

The activation process deposits a small amount of tokens (~3.05 USDT on nile)
to fund the GasFree wallet, then submits a GasFree transaction to trigger activation.

The phrase "~3.05 USDT on nile" may mislead users who are activating on mainnet — they may assume the mainnet cost is the same or similar. Gas-free activation costs can differ between testnet and mainnet and can change over time. Additionally, the statement does not clarify who bears this deposit (the user's wallet), which could surprise users.

Code

The activation process deposits a small amount of tokens (~3.05 USDT on nile) to fund
the GasFree wallet, then submits a GasFree transaction to trigger activation.
Use `--gasfree-info` first to check whether your account is already active.

Recommendation

Rewrite to avoid hardcoding a specific amount and to clarify that:

  • Costs differ between testnet and mainnet.
  • The deposit comes from the user's wallet.
  • Users should run --gasfree-info to check the required deposit before activating.

Example:

The activation process deposits a small amount of tokens from your wallet to fund
the GasFree account, then submits a GasFree transaction to trigger activation.
The required deposit amount varies by network — run `--gasfree-info` first to
check whether your account is already active and to see the required deposit.

Minor

[MN-01] change-password Shell History Warning Missing from Chinese Translation

Property Value
Severity Minor
Category Security / Documentation
File i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/Developer/CLI-Reference.md

Description

The English CLI-Reference adds a :::caution block warning that --password and --new-password flags are recorded in shell history and recommends interactive mode or piping from a secrets manager for production use. This caution block is present in the Chinese diff, so it appears to be translated. However, confirmed by line count differences discussed in MJ-01, ensure the caution block around change-password is fully present and properly translated in the Chinese file.

Recommendation

Verify the :::caution warning about shell history exposure for change-password -p and --new-password is present and visible in the Chinese translation.


[MN-02] Privy App Secret Storage Guidance Missing

Property Value
Severity Minor
Category Security / Documentation
File docs/Agent-Wallet/Developer/CLI-Reference.md, docs/Agent-Wallet/FAQ.md

Description

The Privy wallet documentation instructs users they will need "a Privy App ID, App Secret, and Wallet ID" to configure the privy wallet type. However, the documentation gives no guidance on how to store the Privy App Secret securely. Unlike local private keys (which are encrypted by Agent Wallet), the Privy App Secret is an API credential and if leaked grants access to all Privy-managed wallets. The omission of storage guidance is a notable gap compared to the detailed security advice given for local_secure and raw_secret types.

Code

You'll need a Privy App ID, App Secret, and Wallet ID to configure it:

Recommendation

Add guidance that the Privy App Secret should be stored in environment variables or a secrets manager and never hardcoded in config files, similar to the guidance given for private keys.


[MN-03] HTTP Timeout Doubling Not Explained in Docs

Property Value
Severity Minor
Category Documentation
File docs/x402/getting-started/quickstart-for-human.md

Description

The SDK quickstart examples silently double the HTTP client timeout from 60s to 120s:

# Before
async with httpx.AsyncClient(timeout=60.0) as http_client:

# After
async with httpx.AsyncClient(timeout=120) as http_client:

No explanation is provided for why the timeout was doubled. New users copying the example code will use a 120-second timeout without understanding the rationale. This change likely relates to the exact_gasfree mechanism adding network round-trips, but this is not documented.

Recommendation

Add a brief inline comment explaining the timeout, e.g.:

# 120s timeout to accommodate gas-free payment settlement round-trips
async with httpx.AsyncClient(timeout=120) as http_client:

[MN-04] i18n Sidebar File Not Confirmed Updated

Property Value
Severity Minor
Category Documentation
File i18n/zh-Hans/docusaurus-plugin-content-docs/current/sidebars.js

Description

The diff stats show i18n/zh-Hans/.../current/sidebars.js | 11 +, confirming the Chinese sidebar was updated. However, the McpServer-Skills/SKILLS/Intro.md and McpServer-Skills/SKILLS/QuickStart.md files appear in the diff stat with 2 changed lines each (Intro.md | 2 ±, QuickStart.md | 2 ±). These may be locale/sidebar reference updates. Confirm the SKILLS section in both sidebars.js files properly references the updated BANKOFAISkill.md with the new subsections that were added.

Recommendation

Verify the SKILLS sidebar links still resolve correctly after this PR's changes, especially if any anchors or headings were renamed.


[MN-05] Write Tools Visibility Change Not Prominently Flagged as Breaking in QuickStart

Property Value
Severity Minor
Category Documentation / UX
File docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md

Description

The behavior change in v1.1.7 — write tools are now always visible in the AI's tool list rather than hidden when no wallet is configured — represents a material UX change. A user who had previously relied on the absence of write tools as a safety indicator (no wallet = no write tools shown) will now see write tools even in read-only mode. While this change is documented in ToolList.md, FAQ.md, and LocalPrivatizedDeployment.md, the QuickStart.md page was not updated to mention this behavioral shift. New users following the Quick Start guide may be confused when write tools appear before a wallet is configured.

Recommendation

Add a brief note in QuickStart.md (or in the Quick Start's "What you can do" section) explaining that write tools appear in the tool list but require a configured Agent Wallet to execute.


Suggestions

[S-01] Commit Message Quality

File: All files
Description: Several commits are named fix with no further context (a080ac3 fix, 91f6996 fix, 64a0c36 fix, 53baadb fix, 0f53ddb fix). While this PR is documentation-only and the semantic risk of poor commit messages is lower, having five undifferentiated "fix" commits makes the git history difficult to bisect or audit.
Suggestion: Adopt more descriptive commit messages going forward (e.g., "fix: correct broken link in SUNCli QuickStart" or "fix: add missing zh-Hans CLI-Reference sections").


[S-02] GasFree CLI Usage Belongs in CLI-Reference, Not network-and-token-support

File: docs/x402/core-concepts/network-and-token-support.md
Description: The exact_gasfree section includes CLI invocation examples (npx tsx x402-payment/src/x402_invoke.ts --gasfree-info) that feel out of place in a conceptual "network and token support" document.
Suggestion: Move the --gasfree-info and --gasfree-activate CLI usage to a dedicated how-to guide or to the existing quickstart-for-human.md, and keep network-and-token-support.md at the conceptual level.


[S-03] BSC_PRIVATE_KEYAGENT_WALLET_PRIVATE_KEY Rename Not Documented as Breaking in a Changelog

File: docs/x402/getting-started/quickstart-for-human.md, quickstart-for-sellers.md, quickstart-for-agent.md
Description: The environment variable BSC_PRIVATE_KEY has been renamed to AGENT_WALLET_PRIVATE_KEY across all quickstart guides. This is a breaking change for any user with existing .env files or CI pipelines. The rename is reflected in the docs but there is no changelog entry or migration callout box warning users that their existing env var name will stop working.
Suggestion: Add a :::caution Migration required admonition in the BSC tab of each quickstart that explicitly states BSC_PRIVATE_KEY is deprecated and replaced by AGENT_WALLET_PRIVATE_KEY.


[S-04] Fallback RPC Endpoint Dependency on BANK OF AI Infrastructure

File: docs/x402/getting-started/quickstart-for-agent.md, quickstart-for-sellers.md
Description: The docs now mention a fallback RPC endpoint operated by BANK OF AI when TRON_GRID_API_KEY is not set. The docs correctly note there is no SLA guarantee. However, the endpoint URL (https://api.trongrid.io proxied via BANK OF AI) is not explicitly stated in the docs, making it harder for users to configure firewall rules or understand what network traffic is generated.
Suggestion: Consider explicitly documenting the fallback endpoint domain so users know what external connections are made without a TronGrid key, or confirm it is intentionally kept opaque.


Positive Observations

Area Observation
Security warnings Every place where private keys could be exposed via shell flags (-k, -m, --new-password) includes a visible caution block — excellent practice.
Breaking change communication The removal of TRON_PRIVATE_KEY / TRON_MNEMONIC is communicated in three places (FAQ, LocalPrivatizedDeployment, ToolList) with explicit migration guidance and a version callout (:::caution Migrating from legacy wallet modes).
Testnet-first guidance Both SUN CLI and TRON MCP Server docs consistently emphasize testing on Nile testnet before mainnet operations.
Dry-run mode SUN CLI and x402 docs prominently feature --dry-run / --dry-run flags to encourage safe operation before committing on-chain.
Safety guardrails for TRC-20 BANKOFAISkill.md documents platform-enforced safety limits (MAX_UINT256 blocked, self-transfer rejected) — good transparency.
Docker support Docker deployment option is well-documented with practical docker run examples, health-check endpoint, and a clear note that Docker is read-only by design.
Bilingual coverage All major new content (SUN CLI: 4 files) has corresponding Chinese translations, maintaining language parity.
agent-wallet init UX tip The :::tip When to use init vs start callout clearly distinguishes the two commands — reduces common user confusion.
Multisig lockout warning The :::danger Lockout warning for Owner permission changes is a genuinely important user protection that prevents irreversible lockouts.

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 5 3 2 0 Hardcoded activation cost (MJ-03); dead link (MJ-02)
Security 6 5 1 0 Privy App Secret storage guidance missing (MN-02)
Performance 3 2 0 1 Timeout change not explained (MN-03); N/A for doc-only
Code Quality 5 4 1 0 Incomplete Chinese translation (MJ-01)
Testing 4 0 0 4 No code logic changed — all documentation
Documentation 8 5 3 0 MJ-01, MJ-02, MN-01
Compatibility 3 2 1 0 BSC_PRIVATE_KEY rename not flagged as breaking (S-03)
Observability 2 2 0 0 Fallback RPC documented (with SLA caveat)

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between the specified branches. Runtime behavior, integration testing, and deployment impact are not covered. This PR is documentation-only — no executable code was changed.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-08

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

Code Review Report

Project: BANK OF AI / docs
PR: mainupdate-mcp-server
Review Date: 2026-04-08
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch origin/main
To Branch origin/update-mcp-server
Commits 17
Files Changed 54
Lines Added +3,280
Lines Removed -325

Commit History

Hash Message
85c1a65 fix gasfree
a080ac3 fix
91f6996 fix
3d44188 update all docs
29ab530 update all docs
0dbacc9 add suncli
64a0c36 fix
53baadb fix
0f53ddb fix
856ed9e Merge branch 'update-mcp-server' of github.com:BofAI/docs into update-mcp-server
0e3cfdd add suncli
2056ef1 Merge branch 'main' into update-mcp-server
7043fb4 update version
0712c70 add suncli
d69c9eb add suncli
3335240 add gas free
88c765c add sun-cli

Review Summary

Verdict

Verdict: ⚠️ Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 4 6 4

Summary

This PR introduces a significant volume of new documentation across three major areas: (1) a brand-new SUN CLI section covering a command-line DeFi tool for the SunSwap ecosystem; (2) TRON MCP Server v1.1.7 updates that migrate from legacy wallet modes (TRON_PRIVATE_KEY, TRON_MNEMONIC) to the unified Agent Wallet, add Docker deployment, and expose write tools unconditionally; (3) an exact_gasfree payment scheme for TRON that allows buyers to pay without holding TRX for gas. Several supporting documents (Agent Wallet, x402 quickstarts, BANKOFAISkill, Openclaw QuickStart) are updated to align with these changes.

The documentation quality is generally strong—security warnings are present, command examples are clear, and the material is well-structured. However, the review found four Major issues that should be resolved before merging. The most impactful are: (1) a cross-product inconsistency where TRON MCP Server docs declare TRON_PRIVATE_KEY deprecated while x402 quickstarts continue to promote it as a valid option; (2) a disconnect in quickstart-for-human.md where the setup guide presents two credential options but all SDK code examples only work with one of them (Agent Wallet auto-resolution), leaving users who follow Option B without working code; (3) the i18n versioned copy of LocalPrivatizedDeployment.md diverging from the main English doc with 18 additional net-changed lines; and (4) an undocumented breaking change for existing SUN CLI users regarding --network flag placement semantics. The six Minor issues and four Suggestions are quality improvements that do not block correctness.


Change Summary

Group 1 – SUN CLI Documentation (New)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md Added Overview, capability table, comparison with SUN MCP Server, security notes
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Added Install, first query, wallet setup, first swap, env vars
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Added Complete command reference (860 lines) covering all 12 command groups
docs/McpServer-Skills/MCP/SUNCli/FAQ.md Added Installation, wallet, common errors, AI agent integration, network/token Q&A
sidebars.js Modified Adds SUNCli category under McpServer-Skills/MCP

Purpose: Introduce @bankofai/sun-cli, a CLI tool for SunSwap DeFi operations on TRON; provide full user and reference documentation.


Group 2 – TRON MCP Server v1.1.7 Updates

File Change Type Description
docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md Modified Tool count updated 95→97; wallet table column renamed
docs/McpServer-Skills/MCP/TRONMCPServer/ToolList.md Modified Tool count 95→97; write-tool visibility behavior updated
docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md Modified Legacy wallet modes (TRON_PRIVATE_KEY, TRON_MNEMONIC) removed; v1.1.7 change log added
docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md Modified Removes Option 2/3 (plaintext private key / mnemonic); adds Docker (Option D); HTTP mode clarifications
docs/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md Modified Tool count updated
docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md Modified Tool count updated

Purpose: Align all TRON MCP Server docs with v1.1.7 which mandates Agent Wallet and makes write tools always visible.


Group 3 – x402 GasFree Payment Scheme

File Change Type Description
docs/x402/core-concepts/network-and-token-support.md Modified Adds exact_gasfree scheme; GasFree account management commands
docs/x402/faq.md Modified Documents all three payment schemes
docs/x402/sdk-features.md Modified Adds exact_gasfree/tron, SufficientBalancePolicy, and USDD rows
docs/x402/index.md Modified Minor formatting (bold network names)
docs/x402/getting-started/quickstart-for-agent.md Modified Two-option credential setup; fallback RPC note; env var rename
docs/x402/getting-started/quickstart-for-human.md Modified GasFree SDK examples; TronClientSigner.create() / EvmClientSigner.create() migration; timeout 60→120
docs/x402/getting-started/quickstart-for-sellers.md Modified Env var rename BSC_PRIVATE_KEYAGENT_WALLET_PRIVATE_KEY; fallback RPC note

Purpose: Document the new exact_gasfree TRON payment scheme and migrate SDK examples to agent-wallet auto-resolution.


Group 4 – Agent Wallet Updates

File Change Type Description
docs/Agent-Wallet/QuickStart.md Modified Node.js ≥18→≥20; install step updated
docs/Agent-Wallet/FAQ.md Modified Adds privy wallet type; Windows support; Node.js ≥20
docs/Agent-Wallet/Developer/SDK-Guide.md Modified Node.js ≥18→≥20; Privy error types added
docs/Agent-Wallet/Developer/CLI-Reference.md Modified New commands: agent-wallet init, resolve-address; inspect --show-address; change-password non-interactive mode; Privy wallet tip
docs/Agent-Wallet/Developer/SDK-Cookbook.md Modified Adds "More Examples" table linking to repository examples

Purpose: Document Agent Wallet v2.x additions: Privy wallet type, init command, resolve-address, Windows support, and the Node.js v20 requirement.


Group 5 – BANKOFAISkill, Openclaw, and Configuration

File Change Type Description
docs/McpServer-Skills/SKILLS/BANKOFAISkill.md Modified TRC20 advanced features (batch mode, dry-run, safety guards); MultiSig key details and lockout warning
docs/Openclaw-extension/QuickStart.md Modified mcp-server-tron install made automatic (no TRONGRID_API_KEY prompt); TronScan API key config section
package.json Modified Version bump 1.2.7→1.2.8

Group 6 – i18n (zh-Hans) Mirrored Changes

All groups above are mirrored under i18n/zh-Hans/docusaurus-plugin-content-docs/current/. The LocalPrivatizedDeployment.md i18n copy has a different net-change count than the English source (see findings).


Detailed Findings


Major

[MJ-01] x402 quickstart-for-human.md: SDK code examples are incompatible with the documented Option B (Static Private Key)

Property Value
Severity Major
Category Correctness / Documentation
File docs/x402/getting-started/quickstart-for-human.md : Step 1 (credential setup) and the code examples section

Description

The guide presents two credential options:

  • Option A: Agent Wallet (AGENT_WALLET_PASSWORD) — recommended
  • Option B: Static Private Key (TRON_PRIVATE_KEY / AGENT_WALLET_PRIVATE_KEY) — for test environments

However, every code example in the page was migrated to use TronClientSigner.create() / EvmClientSigner.create(), which auto-resolves the wallet from Agent Wallet. The old os.getenv("TRON_PRIVATE_KEY") / os.getenv("BSC_PRIVATE_KEY") approach has been removed entirely. Users who choose Option B and copy-paste either Python or TypeScript sample code will get a runtime failure (wallet not found) because create() looks for Agent Wallet, not a raw env var.

Code (before → after in Python TRON example):

# REMOVED (Option B users set this up):
signer = TronClientSigner.from_private_key(os.getenv("TRON_PRIVATE_KEY"))

# NOW (only works with Option A / Agent Wallet):
signer = await TronClientSigner.create()

Recommendation

Either:

  • Remove Option B from Step 1 (simplify to Agent Wallet only), or
  • Provide parallel code snippets showing how to initialize the signer with a raw private key (from_private_key) alongside the Agent Wallet variant, so Option B is usable end-to-end.

[MJ-02] Cross-product env var conflict: TRON MCP Server deprecates TRON_PRIVATE_KEY, x402 guides still promote it

Property Value
Severity Major
Category Correctness / Documentation
File docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md (lines 47–60), docs/x402/getting-started/quickstart-for-agent.md (Step 1), docs/x402/getting-started/quickstart-for-sellers.md

Description

TRONMCPServer/FAQ.md explicitly states:

"If you were previously using TRON_PRIVATE_KEY or TRON_MNEMONIC environment variables, these are no longer supported as of v1.1.7."

Yet quickstart-for-agent.md (Option B) still instructs users to:

export TRON_PRIVATE_KEY="your_agent_wallet_private_key_here"

And quickstart-for-sellers.md still shows TRON_PRIVATE_KEY=paste_your_facilitator_private_key_here in the TRON .env block. A user reading both sections in the same session will receive contradictory guidance. Even if the two products (mcp-server-tron and x402) are independent and TRON_PRIVATE_KEY remains valid for x402, this conflict should be made explicit.

Recommendation

Add a clarification note in the x402 quickstarts:

:::note
`TRON_PRIVATE_KEY` is used by the x402 SDK and SUN CLI only.
If you are also using TRON MCP Server (v1.1.7+), that product
has migrated to Agent Wallet exclusively — see
[TRON MCP Server Local Deployment](../../McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md).
:::

[MJ-03] i18n versioned LocalPrivatizedDeployment.md diverges from the English source

Property Value
Severity Major
Category Correctness / Documentation
File i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md

Description

The diff stat shows the English source has +43 / -47 lines net change while the i18n copy has +47 / -61 lines net change — a discrepancy of ~18 lines. This means either the i18n file received additional changes not present in the English source, or the i18n base was already divergent before this PR and the merge compounded the drift. Readers of the Chinese documentation will encounter different content than English readers on the same deployment guide, which is the most critical setup document in this PR (it guides users through wallet configuration and Docker deployment).

Code (diff stat evidence):

90 43  47  docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md
108 47  61  i18n/zh-Hans/.../MCP/TRONMCPServer/LocalPrivatizedDeployment.md

Recommendation

Diff the two files directly to identify the delta. Either reconcile them to identical content, or document which sections are intentionally localized. Prefer keeping structural and code-example sections identical between locales to avoid divergent instructions.


[MJ-04] BSC credential env var renamed inconsistently across docs

Property Value
Severity Major
Category Correctness / Documentation
File docs/x402/getting-started/quickstart-for-agent.md (BSC tab), docs/x402/getting-started/quickstart-for-human.md (BSC tab), docs/x402/getting-started/quickstart-for-sellers.md (BSC tab)

Description

All three quickstart guides rename the BSC credential env var from BSC_PRIVATE_KEYAGENT_WALLET_PRIVATE_KEY. However:

  • TRON tab in the same guides still uses TRON_PRIVATE_KEY (product-specific naming)
  • The BSC sellers .env comment says "Private key of the dedicated Facilitator wallet (NOT your receiving wallet!)" but the new var name AGENT_WALLET_PRIVATE_KEY is a generic name shared with other components

This creates confusion: TRON_PRIVATE_KEY and AGENT_WALLET_PRIVATE_KEY appear to be parallel options on different tabs but have different naming conventions. A user setting up both networks in the same environment may set AGENT_WALLET_PRIVATE_KEY for BSC but wonder whether it conflicts with the TRON configuration.

Code:

# TRON tab (unchanged):
export TRON_PRIVATE_KEY="your_agent_wallet_private_key_here"

# BSC tab (renamed):
export AGENT_WALLET_PRIVATE_KEY="your_agent_wallet_private_key_here"

Recommendation

Either normalize both to AGENT_WALLET_PRIVATE_KEY (and update TRON_PRIVATE_KEY references in x402 guides), or add an explicit note explaining that each env var is consumed by the respective network's signer and they do not conflict. A side-by-side table at the top of Step 1 listing which env vars correspond to which network/mode would resolve the ambiguity.


Minor

[MN-01] SUN CLI --network root-flag ordering — not documented in Intro or QuickStart

Property Value
Severity Minor
Category Documentation
File docs/McpServer-Skills/MCP/SUNCli/QuickStart.md, docs/McpServer-Skills/MCP/SUNCli/Intro.md

Description

The FAQ correctly documents a non-obvious CLI behavior: --network (and all global flags) must be placed before the subcommand, otherwise nile is parsed as an unknown command. This is a common error. The Intro and QuickStart pages show examples without any mention of this ordering rule. New users who read only those two pages and try sun swap TRX USDT 1000000 --network nile will get a confusing error before ever reaching the FAQ.

Code (FAQ correctly shows, but Intro/QuickStart omit the warning):

# This works (shown in QuickStart without comment):
sun swap TRX USDT 1000000 --network nile --yes

# But this is what beginners naturally write:
sun swap TRX USDT 1000000 --network nile  ← Fails if --network is not root position

Recommendation

Add a brief callout in the QuickStart's "Network & API Configuration" section:

:::note Root flag ordering
Global flags like `--network`, `--json`, and `-k` must be placed **before** the subcommand:
`sun --network nile swap TRX USDT 1000000``sun swap TRX USDT 1000000 --network nile` ❌
:::

[MN-02] exact_gasfree GasFree account activation commands assume local source checkout

Property Value
Severity Minor
Category Documentation / Correctness
File docs/x402/core-concepts/network-and-token-support.md : GasFree Account Management section

Description

The GasFree management commands use npx tsx x402-payment/src/x402_invoke.ts, which requires a local checkout of the x402-payment source tree:

npx tsx x402-payment/src/x402_invoke.ts --gasfree-info
npx tsx x402-payment/src/x402_invoke.ts --gasfree-activate

These commands will fail for anyone who installed @bankofai/x402 via npm (npm install @bankofai/x402) without cloning the repository. The document does not explain this prerequisite, nor does it link to a repository clone step or an npm-published CLI alternative.

Recommendation

Add a prerequisite note clarifying that these commands require the x402-payment skill to be installed (via Openclaw or manual clone), or document the equivalent workflow via the published npm package if one exists. Example:

:::info Prerequisite
The commands below require the `x402-payment` skill installed locally.
See [Openclaw Extension QuickStart](../../Openclaw-extension/QuickStart.md) for installation.
:::

[MN-03] Docker deployment section missing instructions for enabling write operations

Property Value
Severity Minor
Category Documentation / Completeness
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Option D (Docker)

Description

The Docker section states: "The Docker image runs in read-only HTTP mode by default" and the tip says: "For local write operations, use Option A or B with a configured Agent Wallet." However, Docker is a legitimate deployment target for write operations in many production environments (e.g., passing environment variables via docker run -e or Docker Secrets). There is no guidance on how to configure Agent Wallet with Docker, and no explanation of whether the Docker image supports the AGENT_WALLET_PASSWORD / AGENT_WALLET_DIR environment variables at all.

Recommendation

Either:

  • Explicitly state that the Docker image does not support write operations (by design) and explain why, or
  • Add a short example showing how to pass Agent Wallet credentials to the container:
docker run -d \
  -p 3001:3001 \
  -e AGENT_WALLET_PASSWORD="<your-password>" \
  -e AGENT_WALLET_DIR="/app/.agent-wallet" \
  -v "$HOME/.agent-wallet:/app/.agent-wallet:ro" \
  mcp-server-tron

[MN-04] quickstart-for-human.md HTTP timeout silently doubled with no rationale

Property Value
Severity Minor
Category Documentation
File docs/x402/getting-started/quickstart-for-human.md : TRON Python example (line ~240), BSC Python example (line ~370)

Description

Both Python client examples change timeout=60.0 to timeout=120 (seconds) with no explanation:

# Before:
async with httpx.AsyncClient(timeout=60.0) as http_client:

# After:
async with httpx.AsyncClient(timeout=120) as http_client:

For a quickstart guide this is significant — doubling the timeout will cause user scripts to hang for two minutes on failures instead of one, and it implies some known latency increase (possibly from GasFree settlement or the new fallback RPC endpoint). Developers copy-pasting this as a baseline will bake in an unnecessarily high timeout without understanding why.

Recommendation

Add an inline comment explaining the reasoning:

# GasFree settlement may take up to 60s on TRON; timeout set to 120s for safety
async with httpx.AsyncClient(timeout=120) as http_client:

[MN-05] agent-wallet change-password non-interactive flags expose passwords in shell history

Property Value
Severity Minor
Category Security / Documentation
File docs/Agent-Wallet/Developer/CLI-Reference.md : change-password section

Description

The new non-interactive mode for change-password documents:

agent-wallet change-password -p 'OldPassword123!' --new-password 'NewPassword456!'

The caution admonition correctly warns:

"Both -p and --new-password will be recorded in shell history."

However, the example itself demonstrates the exact insecure pattern it warns against, with no alternative shown. Showing passwords inline in code blocks—even as placeholders—normalizes this pattern and could easily be used verbatim in scripts.

Recommendation

Replace the example with a safer alternative:

# Read passwords from environment variables (not shell history):
agent-wallet change-password \
  -p "$OLD_WALLET_PASS" \
  --new-password "$NEW_WALLET_PASS"

And reference a password manager or CI secrets vault for obtaining the values.


[MN-06] SUN CLI CommandGuide shows raw private key flag inline in code examples

Property Value
Severity Minor
Category Security / Documentation
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Global Flags Examples section

Description

Despite a well-written :::caution Private Key Security block, the Global Flags example section immediately below it demonstrates:

sun -k your_private_key --network nile --yes swap TRX USDT 1000000

This is a live-fire write operation example (mainnet-equivalent swap) with a private key flag. The caution block appears above this example but a reader skimming to examples will encounter the --yes bypass and private key pattern first. The juxtaposition—security warning followed immediately by a demonstrative example of the warned-against pattern—risks normalizing the behavior.

Recommendation

Relocate the -k flag example to an "Advanced / Legacy" subsection or replace it with the environment variable approach:

# Preferred: private key from environment variable
export AGENT_WALLET_PRIVATE_KEY=your_private_key
sun --network nile --yes swap TRX USDT 1000000

Suggestions

[S-01] Add exact_gasfree to the sellers quickstart as a receivable payment scheme

File: docs/x402/getting-started/quickstart-for-sellers.md
Description: The sellers guide thoroughly covers server setup for exact_permit and exact schemes, but never mentions that sellers can also accept exact_gasfree payments from buyers who don't hold TRX. A seller following this guide has no way to know whether their server will automatically handle GasFree payments or needs additional configuration.
Suggestion: Add a short section (or a note under the TRON configuration) explaining whether exact_gasfree requires any server-side changes and whether the Facilitator wallet needs GasFree activation.


[S-02] SUNCli CommandGuide (860 lines) would benefit from a top-level anchor table

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md
Description: At 860 lines, the command reference is comprehensive but has no quick-jump index. Users looking for a specific command group (e.g., farm, contract) must scroll through the entire document.
Suggestion: Add an anchor table at the top, similar to the one in the Intro capability table:

| Category | Commands |
|----------|----------|
| [Wallet & Portfolio](#wallet--portfolio) | `wallet address`, `wallet balances` |
| [Swap](#swap) | `swap`, `swap:quote`, `swap:quote-raw`, `swap:exact-input` |
| [Pool](#pool) | `pool list`, `pool search`, `pool top-apy`, `pool hooks`, ... |
...

[S-03] GasFree SDK code examples in quickstart-for-human.md lack error handling for activation state

File: docs/x402/getting-started/quickstart-for-human.md : TRON Python/TypeScript examples
Description: The new GasFree examples register ExactGasFreeClientMechanism but include no guidance on the prerequisite that the GasFree account must be activated before first use (--gasfree-activate). A first-time user who copies the SDK example without activating their GasFree account will get an unclear error.
Suggestion: Add a step (or a callout) before the SDK code block:

:::caution GasFree account activation required
Before using `exact_gasfree`, activate your GasFree account once:
`npx tsx x402-payment/src/x402_invoke.ts --gasfree-activate --network nile`
See [GasFree Account Management](../../x402/core-concepts/network-and-token-support.md#gasfree-account-management).
:::

[S-04] agent-wallet resolve-address command missing from the FAQ's quick-reference list

File: docs/Agent-Wallet/FAQ.md
Description: The FAQ has a section on "What values does the network parameter accept?" and other usage questions, but the new resolve-address command (which displays EVM + TRON addresses for a wallet) is not mentioned anywhere in the FAQ. This is particularly useful for users who need to find their TRON address after wallet creation.
Suggestion: Add an FAQ entry: "How do I find the on-chain address for my wallet?" that points to agent-wallet resolve-address and links to the CLI Reference.


Positive Observations

Area Observation
Security warnings — SUN CLI The CommandGuide and Intro both include prominent :::caution and :::warning admonitions covering private key hygiene, testnet-first validation, minimum-funds principle, and dry-run usage. These are well-placed and comprehensive.
Breaking change communication The v1.1.7 migration from TRON_PRIVATE_KEY / TRON_MNEMONIC to Agent Wallet is documented in three places (FAQ, LocalPrivatizedDeployment, ToolList) with clear :::caution Migrating from legacy wallet modes blocks and actionable next steps.
SUN CLI vs SUN MCP Server comparison table The Intro provides a clear side-by-side feature comparison helping users choose the right tool. This prevents unnecessary support questions.
GasFree proxy transparency The exact_gasfree docs clearly disclose that BANK OF AI operates the proxy endpoint, that it has no guaranteed SLA, and that users should bring their own TRON_GRID_API_KEY for production. This is an honest and user-respecting disclosure.
Fallback RPC endpoint documented in two places Both quickstart-for-agent.md and quickstart-for-sellers.md include an identical :::note Fallback RPC Endpoint block, ensuring the caveat reaches both buyer and seller audiences.
--dry-run pattern promoted The CommandGuide, Intro security notes, and BANKOFAISkill all consistently promote --dry-run before high-value writes. This is a solid safety-first pattern.
Docker health check endpoint documented The new Docker deployment section mentions the /health endpoint, which is important for container orchestration and often forgotten in documentation.
Node.js version bump consistent The upgrade from Node.js ≥18 to ≥20 is applied consistently across QuickStart, FAQ, and SDK Guide for Agent Wallet. No partial-update confusion.
MultiSig lockout warning The new :::danger Lockout warning in BANKOFAISkill.md is appropriately prominent for an irreversible operation (Owner permission changes).

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 8 6 2 0 [MJ-01] code/doc mismatch; [MJ-04] env var inconsistency
Security 10 8 0 2 Warnings present; [MN-05][MN-06] minor normalization issues
Performance 7 6 0 1 Timeout change noted [MN-04]; no perf-critical code changes
Code Quality 8 7 0 1 N/A — documentation repo
Testing 7 0 0 7 N/A — documentation only
Documentation 10 7 3 0 [MJ-02][MJ-03][MN-01][MN-02][MN-03]
Compatibility 5 4 1 0 [MJ-02] cross-product env var conflict
Observability 4 3 0 1 N/A — documentation only

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between origin/main and origin/update-mcp-server. Runtime behavior, integration testing, and deployment impact are not covered. All findings are based on documentation consistency, cross-reference accuracy, and security best practices.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-08

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

Code Review Report

Project: BofAI / docs
PR: mainupdate-mcp-server
Review Date: 2026-04-09
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main
To Branch update-mcp-server
Commits 21
Files Changed 56
Lines Added +3,558
Lines Removed -520

Commit History

Hash Message
37d478b update x402
408ec4b update x402, skills, agent-wallet, mcp-server
f7f440e adjust content
cc7feb9 add agent-wallet cli-reference
85c1a65 fix gasfree
a080ac3 fix
91f6996 fix
3d44188 update all docs
29ab530 update all docs
0dbacc9 add suncli
64a0c36 fix
53baadb fix
0f53ddb fix
856ed9e Merge branch 'update-mcp-server' of github.com:BofAI/docs
0e3cfdd add suncli
2056ef1 Merge branch 'main' into update-mcp-server
7043fb4 update version
0712c70 add suncli
d69c9eb add suncli
3335240 add gas free
88c765c add sun-cli

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 3 4 4

Summary

This is an entirely documentation-only PR that introduces a large set of new and updated Markdown reference pages across four product areas: SUN CLI (brand-new, 4 files), TRON MCP Server (v1.1.7 changelog), Agent Wallet (Privy wallet type, Node.js 20 requirement, new commands), and x402 payment protocol (exact_gasfree scheme). It also adds the new agent-wallet Skill entry across both English and Chinese (zh-Hans) localizations, bumps package.json to version 1.2.8, and registers the new SUN CLI sidebar entries.

The overall quality is high — content is clear, well-structured, and the security-first messaging around private key management is exemplary. However, three Major issues need to be addressed before merge: a broken cross-document link in the SUN CLI Quick Start page, a silent breaking-change that removes TRON_PRIVATE_KEY / BSC_PRIVATE_KEY from x402 code examples without an inline upgrade notice, and the i18n Chinese CLI-Reference omitting the inspect --show-address section that was added to the English file. Four Minor issues (unexplained Snyk High Risk rating, Python os import removal, timeout type inconsistency, and an ambiguous note about --network flag placement in the SUN CLI command guide) complete the picture.


Change Summary

1 — New SUN CLI Documentation (4 new files)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md Added Overview: what SUN CLI is, capabilities table, SUN CLI vs MCP Server comparison, output modes, networks, security notes
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Added Step-by-step install, first query, wallet setup, first swap, environment configuration
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Added Complete command reference for all 13 command categories (860 lines)
docs/McpServer-Skills/MCP/SUNCli/FAQ.md Added Troubleshooting: installation, wallet errors, AI agent integration, network/token questions

Purpose: Introduces @bankofai/sun-cli, a new command-line interface for SunSwap DEX operations, as a sibling tool to the existing TRON MCP Server.


2 — TRON MCP Server v1.1.7 Changes

File Change Type Description
docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md Modified New v1.1.7 section, removes "Invalid private key" FAQ, replaces legacy-wallet FAQ with Agent Wallet-only guidance
docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md Modified Tool count 95 → 97; wording for local deployment prerequisites
docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md Modified Removes Option 2 (plain private key) and Option 3 (mnemonic); adds Docker (Option D) and HTTP env vars
docs/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md Modified Tool count 95 → 97
docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md Modified Tool count 95 → 97
docs/McpServer-Skills/MCP/TRONMCPServer/ToolList.md Modified Tool count 95 → 97; updates write-tool visibility behavior

Purpose: Documents the breaking removal of TRON_PRIVATE_KEY / TRON_MNEMONIC env vars and the new Agent Wallet–only wallet model. Adds Docker deployment option and stateless HTTP mode details.


3 — Agent Wallet Documentation Updates

File Change Type Description
docs/Agent-Wallet/QuickStart.md Modified Node.js requirement bumped 18 → 20
docs/Agent-Wallet/FAQ.md Modified Node.js 18 → 20; adds privy wallet type to comparison table; Windows support note
docs/Agent-Wallet/Developer/SDK-Guide.md Modified Node.js 18 → 20; four new Privy error types in error hierarchy
docs/Agent-Wallet/Developer/SDK-Cookbook.md Modified Adds "More Examples" table linking to TypeScript and Python example directories
docs/Agent-Wallet/Developer/CLI-Reference.md Modified New privy wallet tip; init command; inspect --show-address flag; resolve-address command; non-interactive change-password

Purpose: Documents Agent Wallet v2.x features: Privy cloud-custody wallet type, new CLI subcommands, Windows support, and the Node.js 20 requirement upgrade.


4 — x402 Payment Protocol Updates

File Change Type Description
docs/x402/core-concepts/network-and-token-support.md Modified New exact_gasfree payment scheme; GasFree CLI commands; payment scheme overview table updated
docs/x402/faq.md Modified Adds exact_gasfree description
docs/x402/sdk-features.md Modified Adds exact_gasfree/tron, SufficientBalancePolicy, GasFree, and USDD support rows
docs/x402/index.md Modified Minor formatting (bold on network names)
docs/x402/getting-started/quickstart-for-agent.md Modified Removes platform-specific prereq table; unified AGENT_WALLET_PRIVATE_KEY; .create() factory signer; ExactGasFreeClientMechanism registered
docs/x402/getting-started/quickstart-for-human.md Modified Same as above; removes import os; timeout 60 → 120
docs/x402/getting-started/quickstart-for-sellers.md Modified TRON_PRIVATE_KEY / BSC_PRIVATE_KEYAGENT_WALLET_PRIVATE_KEY; fallback RPC note

Purpose: Documents the new gas-free TRON payment path and unifies wallet credential naming under AGENT_WALLET_PRIVATE_KEY.


5 — SKILLS, OpenClaw & Navigation

File Change Type Description
docs/McpServer-Skills/SKILLS/BANKOFAISkill.md Modified New agent-wallet skill section; enhanced trc20-toolkit and multi-sig sections
docs/McpServer-Skills/SKILLS/Intro.md Modified Skill count 7 → 8; new "Secure Wallet Management" capability block
docs/McpServer-Skills/SKILLS/QuickStart.md Modified Skill count 7 → 8; security risk table updated to include agent-wallet
docs/Openclaw-extension/QuickStart.md Modified Skill count 7 → 8; mcp-server-tron now fully automatic; updated skill list
sidebars.js Modified New SUN CLI category in MCP section
i18n/zh-Hans/.../sidebars.js Modified Same sidebar entry in Chinese locale
package.json Modified Version 1.2.7 → 1.2.8

Purpose: Registers SUN CLI in navigation, adds agent-wallet as the 8th Skill, and updates the OpenClaw installer UI screenshots for the new skill.


Detailed Findings


Major

[MJ-01] Broken Cross-Document Link in SUN CLI QuickStart

Property Value
Severity Major
Category Correctness / Documentation
File docs/McpServer-Skills/MCP/SUNCli/QuickStart.md : Line 147 (last bullet)

Description

The "Next Steps" section links to ../SUNMCPServer/Intro.md, but no directory named SUNMCPServer exists in the repo. The actual TRON MCP Server documentation lives at TRONMCPServer/. Docusaurus will either throw a build warning or silently produce a dead link for every visitor who clicks "SUN MCP Server" at the bottom of the Quick Start page.

Code

- **[SUN MCP Server](../SUNMCPServer/Intro.md)** — Prefer AI-driven DeFi? Use SUN MCP Server for natural language interaction

Recommendation

- **[SUN MCP Server (TRON)](../TRONMCPServer/Intro.md)** — Prefer AI-driven DeFi? Use TRON MCP Server for natural language interaction

Verify the target file exists at docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md (it does) and update the link accordingly. The same broken reference should be checked in the zh-Hans counterpart file if it exists.


[MJ-02] Silent Breaking Change — TRON_PRIVATE_KEY / BSC_PRIVATE_KEY Removed Without Inline Upgrade Notice

Property Value
Severity Major
Category Documentation / Compatibility
File docs/x402/getting-started/quickstart-for-agent.md, quickstart-for-human.md, quickstart-for-sellers.md

Description

All three x402 quickstart guides silently replace TRON_PRIVATE_KEY / BSC_PRIVATE_KEY with the unified AGENT_WALLET_PRIVATE_KEY. While the TRON MCP Server FAQ does contain a ":::caution Migrating from legacy wallet modes" callout, the x402 quickstart pages that existing users are most likely to revisit contain no migration note. A user who already has TRON_PRIVATE_KEY set in their shell profile will follow the updated guide, miss that their environment variable name is now wrong, and silently get a Private key not found error at runtime.

Code

-export TRON_PRIVATE_KEY="your_agent_wallet_private_key_here"
+export AGENT_WALLET_PRIVATE_KEY="your_agent_wallet_private_key_here"

Recommendation
Add a short callout directly above the export AGENT_WALLET_PRIVATE_KEY instruction in each of the three files:

:::caution Upgrading from a previous version?
If you previously set `TRON_PRIVATE_KEY` or `BSC_PRIVATE_KEY`, rename the variable to `AGENT_WALLET_PRIVATE_KEY`. The old names are no longer recognized.
```bash
export AGENT_WALLET_PRIVATE_KEY="$TRON_PRIVATE_KEY"   # one-time rename
unset TRON_PRIVATE_KEY

:::


---

#### [MJ-03] i18n Chinese CLI-Reference Missing `inspect --show-address` Section

| Property | Value |
|----------|-------|
| **Severity** | Major |
| **Category** | Documentation / Compatibility |
| **File** | `i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/Developer/CLI-Reference.md` |

**Description**
> The English `CLI-Reference.md` adds two new subsections — `inspect --show-address` (flag table) and `resolve-address` command — but the Chinese translation only adds `resolve-address`. The `inspect --show-address` flag table and its description are absent from the Chinese file. Chinese-language readers following the localized documentation will have incomplete information about the `inspect` subcommand.

**Code** (present in English, absent in Chinese)
```markdown
Show wallet metadata along with derived addresses:
```bash
agent-wallet inspect my-bsc-wallet --show-address
Flag Description
--show-address Derive and display EVM + TRON addresses (requires password for local_secure wallets)

**Recommendation**
Add the translated equivalent of the `--show-address` block to the Chinese CLI-Reference immediately after the `agent-wallet inspect` command example, before the `Sign with a specific wallet` paragraph.

---

### Minor

#### [MN-01] `agent-wallet` Skill Listed as Snyk "High Risk" Without User Explanation

| Property | Value |
|----------|-------|
| **Severity** | Minor |
| **Category** | Documentation |
| **File** | `docs/McpServer-Skills/SKILLS/QuickStart.md` : Security Risk Assessments table |

**Description**
> The security risk assessment table for the 8-skill installer now shows `agent-wallet` with a `High Risk` Snyk rating — the only skill rated that highly. No prose accompanies this entry to explain what Snyk flagged (e.g., dependency vulnerabilities in a cryptographic library, permissive file I/O, etc.) or whether users should be concerned. Users who see this rating with no context may either dismiss the entire installer out of caution or, worse, proceed without understanding the actual risk.

**Recommendation**
Add a short callout or footnote after the table, e.g.:
> **Note on agent-wallet Snyk rating:** The High Risk flag reflects Snyk's detection of cryptographic key-management dependencies (e.g., `keystore`, `scrypt`). These are intentional — the skill is a key management tool. All key operations happen locally; no keys are transmitted to remote services.

---

#### [MN-02] `import os` Removed From Python x402 Code Examples Without Verification Comment

| Property | Value |
|----------|-------|
| **Severity** | Minor |
| **Category** | Correctness / Documentation |
| **File** | `docs/x402/getting-started/quickstart-for-human.md` : TRON Python tab, BSC Python tab |

**Description**
> `import os` was removed from both Python client examples after the `os.getenv("TRON_PRIVATE_KEY")` calls were replaced by the `TronClientSigner.create()` / `EvmClientSigner.create()` factory. The removal is functionally correct if `create()` handles env resolution internally, but the diff provides no comment confirming this. If a user copies the code and later tries to add their own `os.getenv()` call, they will see an `NameError: name 'os' is not defined` which can be confusing. The standard practice for tutorial code is to keep common-sense imports even if not immediately used, or leave a brief note.

**Recommendation**
Either retain `import os` at the top of the example for clarity (no runtime cost), or add a comment:
```python
# os import not needed — TronClientSigner.create() resolves the private key
# from AGENT_WALLET_PRIVATE_KEY automatically

[MN-03] HTTP Timeout Changed Inconsistently — 60.0 (float) → 120 (int) in Python, 60.0120 in Two Separate Places

Property Value
Severity Minor
Category Code Quality / Documentation
File docs/x402/getting-started/quickstart-for-human.md : TRON Python tab and BSC Python tab

Description

The httpx.AsyncClient(timeout=...) value was changed from 60.0 to 120 in both the TRON and BSC Python code examples. The change itself is reasonable (longer timeout for GasFree transactions), but the rationale for the doubling is not explained. Additionally, 60.0 is a float that matches httpx's timeout parameter type signature, while 120 is an int. Both are accepted by httpx, but documentation-level consistency matters: users who adapt the code for their own use might not realize why the value doubled.

Recommendation
Add a one-line comment next to the timeout value:

async with httpx.AsyncClient(timeout=120) as http_client:  # increased for GasFree settlement latency

[MN-04] SUN CLI CommandGuide --network Flag Placement Warning May Confuse Users of Subcommand Options

Property Value
Severity Minor
Category Documentation / Clarity
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Lines 1–15 (Global Flags section)

Description

The Global Flags table states: "Root flags must be placed before the subcommand." However, individual subcommand option tables (e.g., pool vol-history, farm tx) also include date and time range --start / --end options that look syntactically identical to root-level flags. A first-time user could easily attempt sun pool top-apy --network nile --page-size 5 and receive an error because --network was placed after the subcommand. The FAQ file does address this, but only for the specific unknown command 'nile' error. The root of the misunderstanding could be prevented at the CommandGuide level.

Recommendation
Add a short note directly under the Global Flags table header:

Important: Place root-level flags (this table) before the subcommand name. Sub-command options (flags listed per-command below) go after the subcommand.

# Correct:  sun --network nile --json pool top-apy --page-size 5
# Wrong:    sun pool top-apy --network nile   ← --network after subcommand

Suggestions

[S-01] Add exact_gasfree Activation Prerequisite to x402 QuickStart for Agents

File: docs/x402/getting-started/quickstart-for-agent.md
Description: The exact_gasfree mechanism requires a GasFree account to be activated before the first use (--gasfree-activate). The code examples now register ExactGasFreeClientMechanism by default, but the quickstart page does not mention that GasFree accounts need prior activation. A new user whose account is not activated will get a silent failure or confusing error.
Suggestion: Add a short note or optional activation step in the Prerequisites section pointing to network-and-token-support.md#gasfree-account-management.


[S-02] Provide a Dedicated v1.1.7 Migration Guide Page

File: docs/McpServer-Skills/MCP/TRONMCPServer/ (new file suggestion)
Description: The v1.1.7 changes (legacy wallet removal, write tools always visible, Docker support) are material breaking changes scattered across FAQ and LocalPrivatizedDeployment. Users upgrading from v1.1.6 must hunt across multiple pages to understand what changed.
Suggestion: Add a Changelog.md or MigrationGuide.md to the TRONMCPServer directory summarising all v1.1.7 breaking changes and migration steps in one place.


[S-03] Link to Privy Official Docs From Privy Wallet Type Sections

File: docs/Agent-Wallet/Developer/CLI-Reference.md, docs/Agent-Wallet/FAQ.md
Description: The new Privy wallet type docs mention "Privy App ID, App Secret, and Wallet ID" but do not link to Privy's documentation for obtaining these credentials. Users unfamiliar with Privy will have to search separately.
Suggestion: Add [Privy documentation](https://docs.privy.io/reference/server-wallets) wherever Privy App ID is first mentioned.


[S-04] Consider Adding --gasfree Flag to the SUN CLI Command Guide

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md
Description: The swap command table does not mention any GasFree option, even though the x402 documents describe GasFree as a TRON-specific payment path. If SUN CLI v1.x or future versions expose a --gasfree flag for swaps, the command guide should be kept in sync. At minimum, a forward-looking note could prevent confusion.
Suggestion: Add a note to the swap command section: "GasFree swap execution is available via the x402 payment layer — see x402 GasFree docs."


Positive Observations

Area Observation
Security messaging The PR consistently and prominently warns against plaintext private keys, shell history exposure, and the use of raw_secret wallets. The change-password non-interactive mode includes a :::caution about shell history — this is exactly the right level of prominence.
Breaking-change disclosure The :::caution Migrating from legacy wallet modes callout in LocalPrivatizedDeployment.md and the v1.1.7 FAQ entry are clear and actionable. Existing users are told exactly which env vars to stop using.
Dry-run / testnet first patterns Both SUN CLI and TRON MCP Server docs consistently promote --dry-run and testnet-first approaches before mainnet writes. The testnet-first tip appears in 4+ places, which is appropriate for a financial operations tool.
Consistent structure across new SUN CLI files All four new SUN CLI pages (Intro, QuickStart, CommandGuide, FAQ) follow a consistent formatting style — tables with (read) / (write) labels, caution blocks for key-passing flags, --- section dividers.
Unified AGENT_WALLET_PRIVATE_KEY Replacing three separate env var names (TRON_PRIVATE_KEY, BSC_PRIVATE_KEY, legacy wallet modes) with a single AGENT_WALLET_PRIVATE_KEY is a clear developer-experience improvement that reduces cognitive overhead for multi-chain users.
Fallback RPC transparency The three :::note Fallback RPC Endpoint callouts in the x402 quickstart files honestly disclose that the fallback endpoint has no SLA and routes through BANK OF AI infrastructure. This is appropriately transparent.
Docker deployment documentation The new Docker Option D is well-scoped — it clearly states the image runs read-only by default and links back to Options A/B for write operations.

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 8 7 1 0 MJ-01: broken link; MJ-03: translation gap
Security 10 10 0 0 Excellent security-first documentation throughout
Performance 7 5 0 2 Timeout changes noted (MN-03); N/A for docs-only context
Code Quality 8 5 3 0 MN-02 (import), MN-03 (timeout), MN-04 (flag placement)
Testing 5 0 0 5 N/A — documentation-only PR
Documentation 6 4 2 0 MJ-02 migration notice; MJ-03 translation gap
Compatibility 5 3 1 1 MJ-02 breaking change without inline notice
Observability 3 0 0 3 N/A — documentation-only PR

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between the specified branches. Runtime behavior, integration testing, and deployment impact are not covered. All file paths and line numbers refer to the update-mcp-server branch state at the time of this review.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-09

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

Code Review Report

Project: @x402-tron/docs
PR: mainupdate-mcp-server
Review Date: 2026-04-09
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main
To Branch update-mcp-server
Commits 23
Files Changed 56
Lines Added +3,567
Lines Removed -520

Commit History

Hash Message
24bfe40 add inspect
37d478b update x402
408ec4b update x402, skills, agent-wallet, mcp-server
f7f440e adjust content
cc7feb9 add agent-wallet cli-reference
85c1a65 fix gasfree
a080ac3 fix
91f6996 fix
3d44188 update all docs
29ab530 update all docs
0dbacc9 add suncli
(12 earlier commits) add suncli, gasfree, version updates, fixes

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 2 4 4

Summary

This PR is a documentation update covering four primary areas: (1) introduction of a brand-new SUN CLI section with four pages (Intro, QuickStart, CommandGuide, FAQ) in both English and Chinese; (2) updates to Agent Wallet docs adding Privy wallet type, init/resolve-address/inspect --show-address commands, and bumping the Node.js minimum requirement from 18 to 20; (3) updates to TRON MCP Server docs reflecting the v1.1.7 architectural change that removes legacy TRON_PRIVATE_KEY/BSC_PRIVATE_KEY/TRON_MNEMONIC env vars in favour of exclusive Agent Wallet usage; and (4) x402 SDK updates adding the exact_gasfree TRON payment mechanism and unifying private key resolution to AGENT_WALLET_PRIVATE_KEY.

The documentation is well-written, security-conscious, and consistently bilingual (EN + ZH). The SUN CLI reference is thorough and well-structured. However, two major issues require attention before merging: the v1.1.7 breaking wallet change lacks a prominent migration guide (users upgrading without reading the FAQ will silently lose write-tool access), and the security scan in SKILLS/QuickStart.md shows agent-wallet at "High Risk" in Snyk without any explanation or mitigation guidance.


Change Summary

Group 1 — SUN CLI Documentation (New)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md Added Introduction to SUN CLI, comparison with SUN MCP Server, output modes, network support
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Added Install-to-first-query in under 1 minute, wallet setup, first swap on testnet
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Added 860-line complete command reference: wallet, price, token, swap, pool, liquidity, position, farm, protocol, tx, contract
docs/McpServer-Skills/MCP/SUNCli/FAQ.md Added Troubleshooting guide: installation, wallet errors, AI agent integration
i18n/zh-Hans/.../SUNCli/ (4 files) Added Full Chinese translations of the above
sidebars.js + i18n/.../sidebars.js Modified Added SUN CLI navigation category

Purpose: Document the new @bankofai/sun-cli CLI tool that provides SunSwap DEX capabilities from the terminal, targeting both human operators and AI agent workflows.


Group 2 — Agent Wallet Documentation Updates

File Change Type Description
docs/Agent-Wallet/Developer/CLI-Reference.md Modified New commands: init, resolve-address, inspect --show-address, remove --yes; change-password non-interactive mode; Privy wallet type tip
docs/Agent-Wallet/Developer/SDK-Guide.md Modified Node.js requirement 18→20; Privy error types added to hierarchy
docs/Agent-Wallet/Developer/SDK-Cookbook.md Modified "More Examples" section with links to additional repository examples
docs/Agent-Wallet/FAQ.md Modified Privy wallet type added to comparison table; Node.js 18→20; Windows support added in v2.3.x
docs/Agent-Wallet/QuickStart.md Modified Node.js 18→20 throughout
i18n/zh-Hans/.../Agent-Wallet/ (5 files) Modified Chinese translations of all above

Purpose: Document Privy wallet type, new CLI commands (init, resolve-address), Node.js LTS version bump, Windows support, and expanded Privy error class hierarchy.


Group 3 — TRON MCP Server v1.1.7 Updates

File Change Type Description
docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md Modified Legacy wallet modes removed; write-tool-always-visible behavior change; migration note for TRON_PRIVATE_KEY users
docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md Modified Tool count 95→97; "Wallet Required" terminology update
docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md Modified Removed Options 2/3 (private key + mnemonic); Docker Option D added; HTTP mode stateless description
docs/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md Modified Minor terminology update
docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md Modified Minor terminology update
docs/McpServer-Skills/MCP/TRONMCPServer/ToolList.md Modified Minor update
i18n/zh-Hans/.../TRONMCPServer/LocalPrivatizedDeployment.md Modified Chinese translation with extended Docker section (108 lines)

Purpose: Reflect the v1.1.7 breaking change removing legacy wallet env vars, and the addition of Docker deployment support (v1.1.6).


Group 4 — x402 SDK Documentation Updates

File Change Type Description
docs/x402/getting-started/quickstart-for-agent.md Modified Unified to AGENT_WALLET_PRIVATE_KEY; simplified skill install via npx skills add; GasFree SDK examples added
docs/x402/getting-started/quickstart-for-human.md Modified Same unification; GasFree Python+TS client code examples
docs/x402/getting-started/quickstart-for-sellers.md Modified Env var rename to AGENT_WALLET_PRIVATE_KEY; TronGrid fallback note
docs/x402/core-concepts/network-and-token-support.md Modified exact_gasfree scheme added; GasFree account management CLI
docs/x402/index.md Modified Minor bold formatting
docs/x402/faq.md Modified exact_gasfree scheme added to FAQ answer
docs/x402/sdk-features.md Modified GasFree, USDD token, SufficientBalancePolicy entries added
i18n/zh-Hans/.../x402/ (6 files) Modified Chinese translations

Purpose: Document the exact_gasfree TRON payment mechanism (zero-gas purchases), unify private-key env vars to AGENT_WALLET_PRIVATE_KEY, and improve TronGrid fallback transparency.


Group 5 — Skills & Other

File Change Type Description
docs/McpServer-Skills/SKILLS/BANKOFAISkill.md Modified agent-wallet skill entry added; TRC20 advanced features; multi-sig details
docs/McpServer-Skills/SKILLS/QuickStart.md Modified Skill count 7→8; updated security scan table showing agent-wallet ratings
docs/McpServer-Skills/SKILLS/Intro.md Modified Minor update
docs/Openclaw-extension/QuickStart.md Modified Skill count update; recharge-skill note added
package.json Modified Version bump 1.2.7→1.2.8

Detailed Findings


Major

[MJ-01] Breaking Wallet Variable Change Lacks a Dedicated Migration Guide

Property Value
Severity Major
Category Documentation / Correctness
File docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md : Lines 83–93 (migration note), LocalPrivatizedDeployment.md : Lines 50–85

Description

The v1.1.7 release removes TRON_PRIVATE_KEY, BSC_PRIVATE_KEY, and TRON_MNEMONIC as valid wallet environment variables. This is a silent breaking change: existing users who upgrade the TRON MCP Server without reading the FAQ will find that all write tools return "Wallet not configured" errors with no other indication of what changed.

The migration note currently lives only in two places:

  1. A :::caution admonition at the bottom of the "Authentication & Key Issues" FAQ section.
  2. A :::caution Legacy wallet options removed note inside LocalPrivatizedDeployment.md.

Neither location is a first-stop for an upgrading user. There is no dedicated migration guide, no changelog entry in the docs, and no banner/notice on the Intro.md or QuickStart.md pages.

Code (from FAQ.md):

:::caution Migrating from legacy wallet modes
If you were previously using `TRON_PRIVATE_KEY` or `TRON_MNEMONIC` environment variables,
these are no longer supported as of v1.1.7. Please migrate to Agent Wallet.
:::

Recommendation

  1. Add a "What changed in v1.1.7" notice or admonition at the top of LocalPrivatizedDeployment.md and QuickStart.md, so it's visible before users follow any steps.
  2. Provide a concrete migration code block in the notice, e.g.:
    -export TRON_PRIVATE_KEY="<hex>"   # no longer supported in v1.1.7
    +# Install agent-wallet, then:
    +export AGENT_WALLET_PASSWORD="<master-password>"
  3. Consider adding a dedicated Migration-v1.1.7.md page linked from the sidebar or from the Intro.md "Next Steps" section.

[MJ-02] agent-wallet Skill Security Scan Shows "High Risk" with No Explanation

Property Value
Severity Major
Category Security / Documentation
File docs/McpServer-Skills/SKILLS/QuickStart.md : Lines 84–105

Description

The security scan table shown during skill installation — and reproduced verbatim in the docs — now lists agent-wallet with a High Risk Snyk score, a Med Risk Gen score, and 1 Socket alert. The documentation proceeds directly to a "Proceed with installation? Yes" prompt without any explanation of what the High Risk rating means, what specific vulnerability was flagged, or whether users should take mitigating action.

This creates two problems:

  • Security-conscious users may incorrectly assume it's safe to dismiss (because the docs show "Yes" as the answer).
  • Non-security-conscious users are unaware of the real risk level of an npm package being installed globally.

For comparison, x402-payment now shows Safe / 1 alert / Med Risk (improved from the previous Med / 1 alert / Med), which makes the agent-wallet High Risk flag more prominent and potentially alarming.

Code (from QuickStart.md):

│  agent-wallet                      Med Risk    1 alert    High Risk │
│  ...                                                                 │
◇  Proceed with installation?
│  Yes

Recommendation

  1. Add a note below the security scan table that explains the specific Snyk finding (e.g., "The High Risk rating relates to xyz dependency — see [link to Snyk advisory]. This is a known false positive / being tracked in issue #N.").
  2. If the High Risk is a genuine concern, resolve it before documenting the install flow.
  3. At minimum, link to the Snyk report or GitHub issue so users can make an informed decision.

Minor

[MN-01] Node.js Version Bump (18 → 20) Not Flagged as a Breaking Change for Existing Users

Property Value
Severity Minor
Category Documentation / Compatibility
File docs/Agent-Wallet/QuickStart.md : Lines 15–44, docs/Agent-Wallet/Developer/SDK-Guide.md : Lines 22–55, docs/Agent-Wallet/FAQ.md : Line 143

Description

Node.js 18 is still in Active LTS (End-of-Life: April 2025). The PR uniformly bumps the minimum requirement from >= 18 to >= 20 across all Agent Wallet and SUN CLI docs. This is a breaking change for users currently running Node 18, but no warning note is added. Users who installed Node 18 per the old docs may encounter cryptic runtime errors if they upgrade the package before upgrading Node.

Code (SDK-Guide.md):

-Requires Node.js ≥ 18. Check your current version:
+Requires Node.js ≥ 20. Check your current version:

Recommendation

Add a short note near the requirement statement:

> **Note:** As of v2.x, Node.js ≥ 20 is required. If you're on Node 18, upgrade to LTS 20 before proceeding.

[MN-02] BANK OF AI Proxy as Implicit Opt-Out Default for TronGrid RPC

Property Value
Severity Minor
Category Security / Transparency
File docs/x402/getting-started/quickstart-for-agent.md : Lines 65–79, docs/x402/getting-started/quickstart-for-human.md : Lines 165–179, docs/x402/getting-started/quickstart-for-sellers.md : Lines 545–555

Description

The PR correctly discloses (via a :::note admonition) that when TRON_GRID_API_KEY is not set, mainnet RPC calls are automatically routed through a BANK OF AI-operated public proxy:

When TRON_GRID_API_KEY is not set, mainnet RPC calls are automatically
routed through a BANK OF AI-operated public endpoint
(https://api.trongrid.io proxied via BANK OF AI).

While disclosing this is good, the design is an implicit opt-out: all users without a TronGrid key silently depend on BANK OF AI infrastructure, sending their mainnet transaction data through a third-party relay with no SLA. This is only disclosed in a collapsible note, and users who skip it may not realise they have a hidden dependency on a specific vendor.

Recommendation

  1. Move the proxy disclosure from a :::note to a :::caution to ensure higher visibility.
  2. In the QuickStart instructions, explicitly offer the choice:
    Option A: Set TRON_GRID_API_KEY (recommended for production)
    Option B: Use the BANK OF AI public fallback (testing only, no SLA)
    
  3. Consider providing the TRON_RPC_URL env var as an explicit opt-in for users who want to use their own or another public endpoint.

[MN-03] change-password Non-Interactive Example Shows Plaintext Passwords in Command String

Property Value
Severity Minor
Category Security / Documentation
File docs/Agent-Wallet/Developer/CLI-Reference.md : Lines 300–315

Description

The new non-interactive change-password section shows the following example prominently:

agent-wallet change-password -p 'OldPassword123!' --new-password 'NewPassword456!'

A :::caution block below correctly warns that both flags are recorded in shell history. However, the structure of the page (example first, warning after) means users may copy-paste the command before reading the caution. This is especially risky because password changes are a sensitive, infrequent operation — users may be in a hurry and not read carefully.

Recommendation

Move the :::caution block before the non-interactive example, so the warning is read before the command is shown:

:::caution Shell History Warning
Both `-p` and `--new-password` will be recorded in shell history. For production use,
prefer interactive mode or pipe passwords from a secrets manager.
:::

**Non-interactive mode** (for automation scripts where interactive input is unavailable):
```bash
agent-wallet change-password -p 'OldPassword123!' --new-password 'NewPassword456!'

[MN-04] SUN CLI CommandGuide.md Lists TRX with a "Virtual Contract Address" without Clarification

Property Value
Severity Minor
Category Documentation / Correctness
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Lines 840–855

Description

The "Built-In Token Symbols" table lists TRX with address T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb. This is the native TRX virtual address used internally by TRON DeFi protocols for routing — it is not a real TRC-20 contract, and a standard contract read call against this address will fail. A user who reads the "you can use either the symbol or the full address" guidance might try to use this address in another context and be confused.

Code:

| `TRX` | `T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb` | 6 |

Recommendation

Add a footnote or inline note clarifying that the TRX address is a virtual convention for router/pool APIs:

| `TRX` | `T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb` ¹ | 6 |

¹ This is the virtual TRX address used by SunSwap's router contracts — it is not a deployed TRC-20 contract. You cannot call `contract read` on it directly.

Suggestions

[S-01] Consider a Dedicated "Migration Guide: v1.1.6 → v1.1.7" Page

File: docs/McpServer-Skills/MCP/TRONMCPServer/
Description: The v1.1.7 wallet-mode removal is the most significant breaking change in this PR. A dedicated migration page (even a short one) would be far more discoverable than FAQ bullet points.
Suggestion: Create docs/McpServer-Skills/MCP/TRONMCPServer/Migration-v1.1.7.md with a step-by-step guide: detect old env vars → install agent-wallet → import key → set AGENT_WALLET_PASSWORD → verify. Link it prominently from the sidebar and from LocalPrivatizedDeployment.md.


[S-02] Document What Happens If Both Old and New Env Vars Are Set Simultaneously

File: docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md
Description: A user upgrading in-place may have both TRON_PRIVATE_KEY and AGENT_WALLET_PASSWORD in their shell profile. The docs don't explain which takes precedence or whether the old var is ignored or causes an error.
Suggestion: Add an FAQ entry: "I have both TRON_PRIVATE_KEY and AGENT_WALLET_PASSWORD set — what happens?" that clearly states the old var is ignored in v1.1.7+.


[S-03] SUN CLI QuickStart Should Note That --yes Bypasses All Confirmation — Including Destructive Ones

File: docs/McpServer-Skills/MCP/SUNCli/QuickStart.md : Line 118
Description: The QuickStart introduces --yes as a simple convenience flag (sun swap TRX USDT 1000000 --network nile --yes). The CommandGuide lists --yes in Global Flags correctly, but nowhere is it called out that --yes also bypasses confirmation for irreversible write operations (liquidity removal, large swaps).
Suggestion: Add a callout in the QuickStart: "The --yes flag skips all confirmation prompts — including for irreversible on-chain actions. Use it only in trusted automated pipelines, not interactively."


[S-04] agent-wallet Skill Entry in BANKOFAISkill.md Mentions Agent-Restricted Commands but inspect Is Not Included

File: docs/McpServer-Skills/SKILLS/BANKOFAISkill.md : Lines 93–96
Description: The new agent-wallet skill entry correctly marks remove, reset, and change-password as agent-restricted (must be run manually). However, the new inspect --show-address command (which can derive and display wallet addresses) is not mentioned. Depending on the threat model, address revelation may be a sensitive operation worth noting.
Suggestion: Confirm whether inspect --show-address is also agent-restricted, and if so, add it to the caution list. If not, note that it is safe for agent invocation.


Positive Observations

Area Observation
Security warnings Security cautions are comprehensive, prominent, and consistently placed throughout all new SUN CLI docs (CommandGuide :::caution Private Key Security, Intro :::warning, QuickStart :::caution)
Testnet-first philosophy All write operation examples use --network nile first and include explicit reminders that mainnet operations are irreversible
Unified private key env var Consolidating to AGENT_WALLET_PRIVATE_KEY across all x402 quickstart guides simplifies onboarding and reduces multi-chain confusion
GasFree proxy transparency The docs proactively disclose the BANK OF AI proxy dependency for GasFree operations in multiple locations, even though this is a competitive disadvantage
SUN CLI comprehensiveness The 860-line CommandGuide covers all command categories with consistent table formatting, read/write labels, required vs. optional flags, and examples
Bilingual parity All 56 changed files have corresponding Chinese translations that are semantically equivalent to the English versions
Privy wallet type The new Privy wallet type is well-documented with appropriate warnings and comparison table, filling an important gap for server-side AI agents
Docker deployment The new Docker option for TRON MCP Server is well-documented with a working docker run example and health check mention
Error hierarchy Adding Privy-specific error classes (PrivyConfigError, PrivyRateLimitError, PrivyAuthError) to the SDK error tree improves debuggability
--dry-run promotion The SUN CLI docs consistently promote --dry-run before high-value write operations — a best practice not always seen in DeFi tooling docs

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 8 7 1 0 MN-04: TRX virtual address not clarified
Security 10 7 3 0 MJ-02 (High Risk undisclosed), MN-02 (implicit proxy), MN-03 (password example order)
Performance 7 7 0 0 Documentation-only PR; no performance impact
Code Quality 8 8 0 0 Consistent formatting, good use of admonitions, proper table alignment
Testing 5 5 0 0 No test code changed; example commands are clear and verifiable
Documentation 6 4 2 0 MJ-01 (breaking change guide missing), S-01 (migration page)
Compatibility 5 3 2 0 MJ-01 (wallet migration), MN-01 (Node.js version)
Observability 4 4 0 0 Logging, exit codes, error messages well covered in CLI docs

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between the specified branches. Runtime behavior, integration testing, and deployment impact are not covered.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-09

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

Code Review Report

Project: BofAI/docs
PR: main -> update-mcp-server
Review Date: 2026-04-09
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main
To Branch update-mcp-server
Commits 23
Files Changed 60
Lines Added +3,627
Lines Removed -678

Commit History

Hash Message
05d402c add sunmcpserver
24bfe40 add inspect
37d478b update x402
408ec4b update x402, skills, agent-wallet, mcp-server
f7f440e adjust content
cc7feb9 add agent-wallet cli-reference
85c1a65 fix gasfree
a080ac3 fix
91f6996 fix
3d44188 update all docs
29ab530 update all docs
0dbacc9 add suncli
64a0c36 fix
53baadb fix
0f53ddb fix
856ed9e Merge branch 'update-mcp-server'
0e3cfdd add suncli
2056ef1 Merge branch 'main' into update-mcp-server
7043fb4 update version
0712c70 add suncli
d69c9eb add suncli
3335240 add gas free
88c765c add sun-cli

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 3 5 4

Summary

This PR is a large documentation release (23 commits, 60 files) that ships four major content areas: (1) all-new SUN CLI documentation (@bankofai/sun-cli) covering Intro, QuickStart, CommandGuide, and FAQ; (2) a breaking wallet API change across both TRON and SUN MCP Server docs, removing legacy TRON_PRIVATE_KEY / TRON_MNEMONIC modes in favour of the mandatory Agent Wallet; (3) updates to Agent Wallet docs adding the Privy wallet type, Windows support, Node.js ≥ 20 requirement, new init and resolve-address commands, and several CLI flag additions; and (4) x402 SDK quickstart examples updated to use Agent Wallet's TronClientSigner.create() factory with ExactGasFreeClientMechanism support.

The documentation is generally of high quality — clear writing, strong security callouts, well-structured tables, and consistent use of Docusaurus admonition blocks. However, there are three major issues requiring attention before merge: an incomplete migration guide for existing users losing access to the now-removed TRON_PRIVATE_KEY/TRON_MNEMONIC wallet modes, an undocumented CAIP-2 network identifier used in the new agent-wallet resolve-address example that contradicts identifier conventions used elsewhere, and a security exposure introduced by documenting change-password --new-password in a non-interactive shell invocation without adequately warning of process-listing risk. Five minor issues and four suggestions round out the findings.


Change Summary

1. New SUN CLI Documentation (4 new files)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md Added Overview, feature table, CLI vs MCP Server comparison, security notes
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Added Install → first query → wallet setup → first testnet swap
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Added Complete command reference (860 lines): all flags, options, examples
docs/McpServer-Skills/MCP/SUNCli/FAQ.md Added Installation, wallet, error, AI integration, network, token Q&A

Purpose: Introduce @bankofai/sun-cli, a new command-line DeFi interface for SunSwap on TRON, alongside the existing SUN MCP Server. Covers human and AI-agent use-cases.


2. TRON MCP Server Docs — v1.1.7 Breaking Changes

File Change Type Description
docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md Modified Removed Option 2 (Private Key) and Option 3 (Mnemonic); added Docker Option D
docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md Modified Updated FAQ entries reflecting legacy mode removal and v1.1.7 changelog
docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md Modified Tool count updated 95→97; table wording updated
docs/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md Modified Tool count updated 95→97
docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md Modified Tool count updated 95→97
docs/McpServer-Skills/MCP/TRONMCPServer/ToolList.md Modified Tool count updated 95→97; write-tool visibility behaviour updated

Purpose: Document the v1.1.7 release which removes legacy plaintext wallet modes and makes write tools always registered (with runtime wallet check), plus a new Docker deployment option.


3. SUN MCP Server Docs — Wallet Mode Consolidation

File Change Type Description
docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md Modified Same legacy-removal pattern as TRON MCP Server
docs/McpServer-Skills/MCP/SUNMCPServer/FAQ.md Modified Replaced "Conflicting Wallet Modes" FAQ with "Wallet Not Found" guidance

Purpose: Mirror the v1.1.7 wallet-mode consolidation for SUN MCP Server.


4. Agent Wallet Documentation Updates

File Change Type Description
docs/Agent-Wallet/Developer/CLI-Reference.md Modified Added init, resolve-address, inspect --show-address, change-password non-interactive mode, output examples, Privy tip
docs/Agent-Wallet/Developer/SDK-Guide.md Modified Node.js requirement ≥18 → ≥20; added Privy error types to hierarchy
docs/Agent-Wallet/Developer/SDK-Cookbook.md Modified Added "More Examples" table linking to GitHub repo
docs/Agent-Wallet/FAQ.md Modified Added privy wallet type; macOS/Linux → macOS/Linux/Windows; Node ≥18 → ≥20
docs/Agent-Wallet/QuickStart.md Modified Node.js requirement ≥18 → ≥20

Purpose: Document new CLI commands, the new Privy wallet type, Windows support added in v2.3.x, and the Node.js version bump.


5. x402 SDK Documentation Updates

File Change Type Description
docs/x402/getting-started/quickstart-for-agent.md Modified TRON_PRIVATE_KEY/BSC_PRIVATE_KEYAGENT_WALLET_PRIVATE_KEY; signers updated to .create() factory; ExactGasFreeClientMechanism added; timeout 60→120s
docs/x402/getting-started/quickstart-for-human.md Modified Same signer factory migration
docs/x402/getting-started/quickstart-for-sellers.md Modified TRON_PRIVATE_KEY/BSC_PRIVATE_KEYAGENT_WALLET_PRIVATE_KEY in .env examples
docs/x402/sdk-features.md Modified Added exact_gasfree/tron, SufficientBalancePolicy, GasFree, and USDD feature rows
docs/x402/index.md Modified Minor emphasis bolding

Purpose: Align x402 quickstarts with Agent Wallet integration and document GasFree TRON payment mechanism support.


6. Skills & Openclaw Docs Updates

File Change Type Description
docs/McpServer-Skills/SKILLS/BANKOFAISkill.md Modified Added agent-wallet skill entry; TRC20 advanced features; multisig danger warning
docs/McpServer-Skills/SKILLS/Intro.md Modified Count 7→8 skills; added Secure Wallet Management section
docs/McpServer-Skills/SKILLS/QuickStart.md Modified Count 7→8; updated security scan table
docs/Openclaw-extension/QuickStart.md Modified TRONGRID_API_KEY now optional post-install; x402 config added to clean-install deletions

Purpose: Surface agent-wallet as a first-class skill; add new install-flow UI for Openclaw.


7. Sidebar & Package

File Change Type Description
sidebars.js Modified Added SUN CLI sidebar category with 4 entries
versioned_docs/current/sidebars.js Modified Same addition for versioned docs
package.json Modified Version bump 1.2.71.2.8

Detailed Findings


Major

[MJ-01] Incomplete Migration Path for Removed Legacy Wallet Modes

Property Value
Severity Major
Category Documentation / Correctness
File docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md : Lines 55–66, 83–90; docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Lines 69–72; docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md : Lines 69–72

Description

The PR removes all documentation for TRON_PRIVATE_KEY and TRON_MNEMONIC wallet modes and replaces them with a mandatory Agent Wallet setup. The caution blocks correctly state "these are no longer supported" and direct users to the Agent Wallet documentation, but the specific import command for migrating an existing private key into Agent Wallet is never shown. A user who upgrades and is suddenly locked out of write operations can only learn they "can import your existing private key into Agent Wallet" via a generic link — the exact CLI incantation (agent-wallet add or the start wizard flow) is not spelled out in any of the migration notices.

Code

:::caution Migrating from legacy wallet modes
If you were previously using `TRON_PRIVATE_KEY` or `TRON_MNEMONIC` environment variables,
these are no longer supported as of v1.1.7. Please migrate to Agent Wallet.
You can import your existing private key into Agent Wallet —
see the [Agent-Wallet documentation](../../../Agent-Wallet/Intro) for details.
:::

Recommendation

Add the concrete migration steps inline (or in a dedicated "Migrating from v1.1.6" subsection) so users do not need to hunt through a secondary doc set under time pressure:

:::caution Migrating from legacy wallet modes
`TRON_PRIVATE_KEY` and `TRON_MNEMONIC` are removed as of v1.1.7.
To migrate your existing private key:

```bash
# 1. Install agent-wallet (if not already installed)
npm install -g @bankofai/agent-wallet

# 2. Initialize and create an encrypted wallet from your private key
agent-wallet start
#    When prompted, choose "local_secure" and paste your private key.

# 3. Replace your environment variable
unset TRON_PRIVATE_KEY
export AGENT_WALLET_PASSWORD='your-chosen-master-password'

See Agent Wallet Quick Start for full details.
:::


---

#### [MJ-02] Behavior Change of Write Tools Not Consistently Reflected Across All Affected Docs

| Property | Value |
|----------|-------|
| **Severity** | Major |
| **Category** | Correctness / Documentation |
| **File** | `docs/McpServer-Skills/MCP/TRONMCPServer/ToolList.md` : Lines 13–16 vs. `docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md` : Lines 47–53 vs. `docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md` |

**Description**

The v1.1.7 behavior change — write tools are now **always registered and visible**, with wallet checks deferred to execution time — is documented in `ToolList.md` and `TRONMCPServer/FAQ.md` (TRON side), but there is a subtle inconsistency in how it is described. `ToolList.md` says "In **read-only mode** (cloud service or `--readonly` flag), write tools are not registered." However, `TRONMCPServer/FAQ.md` says "If you're connected via the official cloud service or using `--readonly` mode, write tools will not appear at all." These two descriptions are consistent with each other, but **`SUN MCP Server` docs** make no equivalent statement — `SUNMCPServer/LocalPrivatizedDeployment.md` only says the server runs in "read-only mode" if no wallet is configured, which now contradicts the new behavior (tools visible but return error).

**Code**

```markdown
<!-- TRONMCPServer/ToolList.md — correctly documents new behavior -->
Write tools are always visible in the AI's tool list, but wallet availability
is checked at execution time.

<!-- SUNMCPServer/LocalPrivatizedDeployment.md — uses old framing -->
Without wallet configuration, SUN MCP Server will run in **read-only mode**,

Recommendation

Update SUNMCPServer/LocalPrivatizedDeployment.md to reflect the v1.1.7 behavior for SUN MCP Server as well. Add a note clarifying whether the "read-only mode" framing applies because write tools are hidden OR because they return an error, to ensure users understand the correct behavior:

Without wallet configuration, write operations will return a "wallet not configured" error.
All tools (read and write) remain visible in the tool list — wallet availability is checked
at execution time. To enable write operations, configure Agent Wallet (see Step 1 below).

[MJ-03] change-password --new-password Non-Interactive Mode Documents Credential Exposure Risk Insufficiently

Property Value
Severity Major
Category Security / Documentation
File docs/Agent-Wallet/Developer/CLI-Reference.md : Lines 301–322

Description

The newly documented non-interactive change-password syntax passes both the old and new master passwords as CLI flags. The caution block only mentions shell history, but omits the more immediate risk: /proc/<pid>/cmdline exposure on Linux systems means any process with read access to /proc can read the passwords in real time while the command runs — this is a more serious risk than shell history alone, especially in multi-tenant or containerised environments.

Additionally, the doc says "For production use, prefer interactive mode or pipe passwords from a secrets manager" but does not provide any example of the piping technique, leaving the reader without a safe alternative for automation use-cases.

Code

:::caution
Both `-p` and `--new-password` will be recorded in shell history. For production use,
prefer interactive mode or pipe passwords from a secrets manager.
:::

Recommendation

Expand the caution to name both threat vectors and provide a safe automation alternative:

:::caution Password exposure risks
Passing `-p` and `--new-password` as CLI flags exposes passwords in two ways:
1. **Shell history** — recorded in `~/.bash_history` / `~/.zsh_history`
2. **Process listings** — visible via `ps aux` or `/proc/<pid>/cmdline` while the command runs

For automation, prefer reading passwords from a secrets manager and passing them
via standard input or a named pipe rather than as direct flags:

```bash
# Example: read passwords from stdin using a subshell (passwords not in history)
agent-wallet change-password <<EOF
OldPassword123!
NewPassword456!
EOF

Only use the flag form in fully private, single-user environments.
:::


---

### Minor

#### [MN-01] Inconsistent Environment Variable for Raw Private Key Across SUN CLI and x402 Docs

| Property | Value |
|----------|-------|
| **Severity** | Minor |
| **Category** | Documentation / Consistency |
| **File** | `docs/McpServer-Skills/MCP/SUNCli/FAQ.md` : Lines 33–36 vs. `docs/x402/getting-started/quickstart-for-agent.md` |

**Description**

`SUNCli/FAQ.md` documents three separate env vars for SUN CLI wallet resolution:
- `AGENT_WALLET_PRIVATE_KEY` (direct private key)
- `AGENT_WALLET_MNEMONIC` (mnemonic phrase)
- `AGENT_WALLET_PASSWORD` (encrypted wallet)

However, the x402 quickstart and sellers guide only ever reference `AGENT_WALLET_PRIVATE_KEY` and `AGENT_WALLET_PASSWORD`. The existence of `AGENT_WALLET_MNEMONIC` is not documented anywhere in the Agent Wallet CLI Reference or FAQ under the non-interactive section. If this env var is real, it needs to appear in the authoritative Agent Wallet docs; if it is SUN-CLI-specific, the FAQ should clarify that.

**Code**

```markdown
<!-- SUNCli/FAQ.md -->
- `AGENT_WALLET_PRIVATE_KEY` — direct private key
- `AGENT_WALLET_MNEMONIC` — mnemonic phrase
- `AGENT_WALLET_PASSWORD` — encrypted wallet via agent-wallet

Recommendation

Either add AGENT_WALLET_MNEMONIC to docs/Agent-Wallet/Developer/CLI-Reference.md under the non-interactive execution section, or remove it from the SUN CLI FAQ if it is not a real supported env var. Whichever env vars are supported should be listed consistently across all docs.


[MN-02] agent-wallet resolve-address Example Uses CAIP-2 Identifier While All Other Docs Use Plain Names

Property Value
Severity Minor
Category Documentation / Consistency
File docs/Agent-Wallet/Developer/CLI-Reference.md (new resolve-address section) vs. sign examples

Description

The sign command examples throughout CLI-Reference.md use network identifiers like -n tron and -n eip155:56 interchangeably. However, there is no explanation anywhere in the added sections of what eip155:56 means compared to tron, and whether resolve-address also accepts eip155:* identifiers. The inconsistency between human-readable (tron, bsc) and CAIP-2 (eip155:56) identifiers could confuse new users configuring multi-chain wallets.

Code

# sign example uses CAIP-2
agent-wallet sign msg "Hello" -n eip155:56 -w my-bsc-wallet -p 'Abc12345!'

# resolve-address example uses no -n flag at all — shows both networks in output
agent-wallet resolve-address my-wallet

Recommendation

Add a small note in the "Wallet Management" section explaining the network identifier format:

> **Network identifiers:** SUN CLI accepts both short-form names (`tron`, `bsc`, `mainnet`)
> and CAIP-2 format (`eip155:56` for BSC, `eip155:1` for Ethereum). Both forms are
> equivalent — use whichever is more readable in your context.

[MN-03] Docker Deployment Section Does Not Explain How to Enable Write Operations

Property Value
Severity Minor
Category Documentation / Completeness
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Lines 130–170

Description

The new Docker Option D section says "The Docker image runs in read-only HTTP mode by default" and the tip says to use Option A or B for write operations. However, it does not explain whether Docker can be configured for write operations at all (e.g., by mounting an Agent Wallet directory and setting AGENT_WALLET_PASSWORD and AGENT_WALLET_DIR as env vars), leaving advanced users without guidance.

Code

:::tip
The Docker image is designed for read-only cloud deployments. For local write operations
(transfers, staking, etc.), use Option A or B with a configured Agent Wallet.
:::

Recommendation

Add a brief note clarifying whether Docker write mode is supported and, if so, how to enable it:

:::tip Write operations in Docker
If you need write operations, mount your Agent Wallet directory and pass credentials:

```bash
docker run -d \
  -p 3001:3001 \
  -v $HOME/.agent-wallet:/root/.agent-wallet \
  -e AGENT_WALLET_PASSWORD="your-password" \
  -e TRONGRID_API_KEY="your-key" \
  mcp-server-tron

This gives the container access to your local encrypted keystore while keeping
the key material off the container image.
:::


---

#### [MN-04] Security Scan Table in QuickStart Shows High Risk for `agent-wallet` Without Context

| Property | Value |
|----------|-------|
| **Severity** | Minor |
| **Category** | Documentation / User Experience |
| **File** | `docs/McpServer-Skills/SKILLS/QuickStart.md` : Lines 84–101 |

**Description**

The updated security scan table shows `agent-wallet` as `Med Risk` (Gen), `1 alert` (Socket), and `High Risk` (Snyk). Unlike `x402-payment` which shows only `Med` ratings, `agent-wallet` carries a `High Risk` Snyk score — yet no explanation or context is provided for why this is acceptable. Users unfamiliar with Snyk's risk scoring for cryptographic key management libraries may be alarmed and choose not to install the skill.

**Code**

```markdown
│  agent-wallet                      Med Risk    1 alert    High Risk │

Recommendation

Add a brief parenthetical or follow-up note explaining the risk ratings:

> **Note on security risk ratings:** The `High Risk` Snyk rating for `agent-wallet` reflects
> the presence of cryptographic key management code — a category Snyk flags conservatively.
> The skill has been reviewed and the flagged code is intentional signing functionality.
> See the [agent-wallet GitHub repository](https://github.com/BofAI/agent-wallet) for audit details.

[MN-05] quickstart-for-agent.md Removes import os But Python Code Still Has Implicit os Dependency via AGENT_WALLET_PRIVATE_KEY

Property Value
Severity Minor
Category Correctness / Documentation
File docs/x402/getting-started/quickstart-for-agent.md : Lines 216–218 (TRON section), Lines 354–358 (BSC section)

Description

The diff removes import os from both the TRON and BSC Python client examples (replaced with the TronClientSigner.create() and EvmClientSigner.create() factory methods). This is correct — the factories resolve credentials internally. However, the env var AGENT_WALLET_PRIVATE_KEY is still referenced in Step 2 as the credential source, and if users follow the environment-variable path (rather than encrypted wallet), the create() factory presumably reads this env var using os.getenv() internally. There is no doc note confirming create() is aware of AGENT_WALLET_PRIVATE_KEY, leaving the credential resolution chain implicit. A user debugging a "wallet not found" error from create() will not know which env var to check.

Code

# import os  <-- removed in diff
...
signer = await TronClientSigner.create()   # how does it find AGENT_WALLET_PRIVATE_KEY?

Recommendation

Add a brief inline comment or an info admonition clarifying the resolution order:

# TronClientSigner.create() resolves wallet credentials in priority order:
# 1. Encrypted agent-wallet keystore (if AGENT_WALLET_PASSWORD is set)
# 2. AGENT_WALLET_PRIVATE_KEY environment variable
# 3. AGENT_WALLET_MNEMONIC environment variable
signer = await TronClientSigner.create()

This aligns with the info block already present at the top of the file but makes it immediately visible at the point of use.


Suggestions

[S-01] Add a --dry-run Example to the x402 Quickstart

File: docs/x402/getting-started/quickstart-for-agent.md
Description: The SUN CLI docs prominently feature --dry-run as a safety mechanism. The x402 quickstart-for-agent guide doesn't mention any analogous preview capability before executing a payment. If the x402 SDK supports a simulation or dry-run mode, a brief mention would align the safety messaging across the docs suite.
Suggestion: Add a tip block: "Before running your client in production, verify the server returns a 402 response correctly by checking the WWW-Authenticate header with a simple httpx.get() call first."


[S-02] SUN CLI CommandGuide Could Cross-Reference v3/v4 Tick Computation

File: docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md
Description: The liquidity v3:mint and v4:mint commands list --tick-lower and --tick-upper as optional with "Auto" defaults, but do not explain how the automatic tick range is computed (e.g., full-range, ±10 ticks from current price). This is a common source of confusion for DeFi users managing concentrated liquidity.
Suggestion: Add a brief note: "When --tick-lower / --tick-upper are omitted, the CLI defaults to the full tick range for the pool's fee tier. For custom ranges, calculate tick values using 1.0001^tick = price or use an external tick calculator."


[S-03] Privy Wallet Type Should Reference a Minimum Privy SDK Version

File: docs/Agent-Wallet/Developer/CLI-Reference.md, docs/Agent-Wallet/FAQ.md
Description: The new privy wallet type documentation says "You'll need a Privy App ID, App Secret, and Wallet ID" but does not state which version of agent-wallet introduced Privy support or what minimum Privy server wallet SDK version is required.
Suggestion: Add "Privy wallet support was introduced in agent-wallet v2.x.x. Requires Privy server wallet API v1." (substituting actual versions) to the tip block in CLI-Reference.md.


[S-04] Version 1.2.8 Bump Should Have a CHANGELOG Entry

File: package.json
Description: The package version is bumped from 1.2.7 to 1.2.8 but no CHANGELOG.md exists or is referenced. The TRON MCP Server FAQ has an inline changelog section ("What changed in v1.1.7?"), which is a good pattern — but the doc-site's own version history is not tracked.
Suggestion: Either create a CHANGELOG.md at the repo root or add a note in docs/ documenting what doc-site version 1.2.8 includes, so external users can identify when specific documentation was updated.


Positive Observations

Area Observation
Security callouts Every new section involving private keys or mnemonic phrases includes a :::caution or :::warning admonition. The CommandGuide.md even includes a full-width caution on the very first page about --private-key shell history risk.
Read-only vs. write labeling All SUN CLI commands are consistently labeled (read) or (write) throughout CommandGuide.md. This makes the access model immediately clear to both human operators and AI agents consuming the docs.
Testnet-first guidance Both SUNCli/QuickStart.md and SUNCli/Intro.md prominently recommend Nile testnet before mainnet. The tip block in QuickStart is well-placed immediately before the first write operation example.
Dry-run support documented --dry-run is documented as a global flag and is reflected in examples, supporting safe automation workflows without risking on-chain state changes.
Docker deployment addition The Docker Option D section for TRON MCP Server is a welcome addition, including a health check endpoint and log-mount details — practical information often omitted from initial deployment docs.
Fallback RPC disclosure The :::note Fallback RPC Endpoint blocks in x402 quickstarts honestly disclose that BANK OF AI's public endpoint has no SLA guarantees. This is the right level of transparency for production users.
agent-wallet multisig danger warning The new :::danger Lockout warning in BANKOFAISkill.md for the multisig skill is critical safety information that was previously absent.
Consistent versioned-docs mirroring Every change in docs/ is correctly mirrored in versioned_docs/current/, ensuring versioned site builds remain consistent.

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 8 6 2 0 MJ-02 (behavior change inconsistency), MN-05 (implicit env var resolution)
Security 10 8 1 1 MJ-03 (process-listing risk underexplained); auth checks N/A (doc-only repo)
Performance 7 0 0 7 Not applicable to documentation
Code Quality 6 5 1 0 MN-01 (inconsistent env var naming across docs)
Testing 5 0 0 5 Not applicable to documentation
Documentation 6 4 2 0 MJ-01 (incomplete migration steps), MN-03 (Docker write-mode undocumented)
Compatibility 5 3 0 2 Node ≥20 bump is justified; migration guide needed (MJ-01)
Observability 4 4 0 0 Logging, error messages, and RPC fallback disclosures are all present

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between the specified branches (main...update-mcp-server). This is a documentation-only repository; findings focus on accuracy, consistency, security messaging, and completeness of the documentation changes rather than code runtime behavior.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-09

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

Code Review Report

Project: BofAI/docs
PR: mainupdate-mcp-server
Review Date: 2026-04-09
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main
To Branch update-mcp-server
Commits 24
Files Changed 60
Lines Added +3,641
Lines Removed -692

Commit History

Hash Message
b3fc365 fix agent-wallet
05d402c add sunmcpserver
24bfe40 add inspect
37d478b update x402
408ec4b update x402, skills, agent-wallet, mcp-server
f7f440e adjust content
cc7feb9 add agent-wallet cli-reference
85c1a65 fix gasfree
a080ac3 fix
91f6996 fix
3d44188 update all docs
29ab530 update all docs
0dbacc9 add suncli
64a0c36 fix
53baadb fix
0f53ddb fix
856ed9e Merge branch 'update-mcp-server' into update-mcp-server
0e3cfdd add suncli
2056ef1 Merge branch 'main' into update-mcp-server
7043fb4 update version
0712c70 add suncli
d69c9eb add suncli
3335240 add gas free
88c765c add sun-cli

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 2 4 4

Summary

This PR is primarily a documentation update release encompassing three major content areas: (1) introduction of the SUN CLI tool with four new documentation pages (Intro, QuickStart, CommandGuide, FAQ); (2) migration of TRON MCP Server and SUN MCP Server from supporting three wallet modes (AGENT_WALLET_PASSWORD, TRON_PRIVATE_KEY, TRON_MNEMONIC) to the single Agent Wallet approach only, reflecting a breaking change in v1.1.7; and (3) updates to Agent Wallet, x402 payment, Skills, and the Openclaw extension to document new features including the exact_gasfree payment scheme, Privy wallet type, the agent-wallet init/resolve-address commands, and a Docker deployment option.

The overall quality of this documentation is high — content is well-structured, security warnings are prominently placed, and i18n (zh-Hans) translations are kept in sync. However, two major issues require attention before merge: the Docker deployment example leaks the API key via command-line arguments (a documented security anti-pattern in this very project), and the breaking change removal of TRON_PRIVATE_KEY/TRON_MNEMONIC lacks a migration path in the QuickStart pages — the pages most likely to be read by upgrading users. Additionally, four minor issues affect documentation consistency and completeness, particularly around the --save-runtime-secrets flag and the unexplained "High Risk" Snyk rating for the agent-wallet skill.


Change Summary

1. New SUN CLI Documentation (4 new files)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md Added Overview of SUN CLI, comparison with SUN MCP Server, supported networks, security notes
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Added Install-to-first-query tutorial, wallet config, testnet swap walkthrough
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Added Full 860-line reference for all CLI commands: wallet, price, token, swap, pool, liquidity, position, pair, farm, protocol, transaction, contract
docs/McpServer-Skills/MCP/SUNCli/FAQ.md Added Installation, wallet/config, common errors, AI agent integration, network Q&A

Purpose: Introduce SUN CLI (@bankofai/sun-cli) as a companion to SUN MCP Server for direct CLI-driven DeFi operations on TRON/SUN protocol. Adds SUN CLI as a new sidebar category.


2. TRON MCP Server v1.1.7 Breaking Change — Agent Wallet Only

File Change Type Description
docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md Modified Replaced "Only read tools in list" with "Write tools appear but return error"; removed TRON_PRIVATE_KEY/TRON_MNEMONIC mode docs; added v1.1.7 changelog entry
docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md Modified Removed Option 2 (Private Key) and Option 3 (Mnemonic); added Docker Option D; updated HTTP mode docs
docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md Modified Tool count 95 → 97; "Private Key Required" → "Wallet Required"; phrasing updates
docs/McpServer-Skills/MCP/TRONMCPServer/ToolList.md Modified Tool count 95 → 97; updated write-tool visibility behavior; fixed .md link extensions
docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md Modified Tool count 95 → 97
docs/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md Modified Tool count 95 → 97

Purpose: Document v1.1.7 breaking changes: legacy wallet env vars removed; write tools now always visible (wallet checked at execution time); Docker support added; all wallet management through Agent Wallet.


3. SUN MCP Server — Agent Wallet Migration

File Change Type Description
docs/McpServer-Skills/MCP/SUNMCPServer/FAQ.md Modified Removed TRON_PRIVATE_KEY/TRON_MNEMONIC options; updated "Conflicting Wallet Modes" to "Wallet Not Found"; fixed link extensions
docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md Modified Removed Option 2/3; simplified to Agent Wallet only; added caution block

Purpose: Mirror the same wallet-only migration for SUN MCP Server docs.


4. Agent Wallet — New Features

File Change Type Description
docs/Agent-Wallet/Developer/CLI-Reference.md Modified Added: privy wallet type tip, agent-wallet init section, --show-address flag for inspect, --yes for remove, resolve-address command, non-interactive change-password with flags and caution
docs/Agent-Wallet/Developer/SDK-Cookbook.md Modified Added "More Examples" table linking to 7 advanced examples on GitHub
docs/Agent-Wallet/Developer/SDK-Guide.md Modified Node.js requirement ≥ 18 → ≥ 20; added 4 new Privy error types to error hierarchy
docs/Agent-Wallet/FAQ.md Modified Added privy wallet type to wallet-types FAQ; Windows support note
docs/Agent-Wallet/QuickStart.md Modified Node.js requirement ≥ 18 → ≥ 20

Purpose: Document the privy wallet type, new CLI commands, Node.js version bump, and Windows support.


5. x402 Payment — GasFree and Unified Key Config

File Change Type Description
docs/x402/core-concepts/network-and-token-support.md Modified Added exact_gasfree as third payment scheme; added GasFree Account Management CLI subsection
docs/x402/faq.md Modified Added exact_gasfree to payment schemes FAQ
docs/x402/getting-started/quickstart-for-agent.md Modified Removed "Confirm Platform Support" prereq; unified to AGENT_WALLET_PRIVATE_KEY; skill install via npx
docs/x402/getting-started/quickstart-for-human.md Modified Unified to AGENT_WALLET_PRIVATE_KEY; added GasFree code examples (Python + TS)
docs/x402/getting-started/quickstart-for-sellers.md Modified TRON_PRIVATE_KEY/BSC_PRIVATE_KEYAGENT_WALLET_PRIVATE_KEY
docs/x402/sdk-features.md Modified Added exact_gasfree/tron, SufficientBalancePolicy, GasFree, USDD rows
docs/x402/index.md Modified Bold formatting for "TRON" and "BSC"

Purpose: Document the new exact_gasfree TRON payment scheme and consolidate private key configuration to a single AGENT_WALLET_PRIVATE_KEY env var.


6. Skills and Extension Updates

File Change Type Description
docs/McpServer-Skills/SKILLS/BANKOFAISkill.md Modified Added agent-wallet skill section; expanded TRC20 and MultiSig sections
docs/McpServer-Skills/SKILLS/Intro.md Modified Count 7 → 8 skills; added agent-wallet intro block
docs/McpServer-Skills/SKILLS/QuickStart.md Modified Added agent-wallet to installer output; updated security risk table
docs/Openclaw-extension/QuickStart.md Modified Added agent-wallet skill in install flow; updated security table and skill count

Purpose: Introduce agent-wallet as the 8th supported skill.


7. Configuration / Navigation

File Change Type Description
sidebars.js Modified Added SUN CLI sidebar category with 4 items
package.json Modified Version bump 1.2.7 → 1.2.8
i18n/zh-Hans/... (31 files) Modified Chinese translation sync for all above changes

Detailed Findings


Major

[MJ-01] Docker Run Example Passes API Key via Inline -e Flag

Property Value
Severity Major
Category Security
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Lines 130–143 (Option D)

Description

The newly added Docker deployment example uses inline -e KEY="value" to pass the TRONGRID_API_KEY. This approach records the API key in shell history, exposes it in docker inspect output (visible to any user who can run docker inspect), and may appear in system-level process listings. This is the exact security anti-pattern that this same PR warns against extensively elsewhere (e.g., the "plaintext in environment variables" caution removed from the non-Docker options). A documentation project that teaches security-sensitive blockchain tooling should model secure practices in all code samples.

Code

docker run -d \
  -p 3001:3001 \
  -v $(pwd)/logs:/app/logs \
  -e TRONGRID_API_KEY="<your-key>" \
  mcp-server-tron

Recommendation

Use --env-file to pass secrets, which avoids shell history and docker inspect exposure:

# 1. Create a .env file (never commit this file)
cat > .env.docker << 'EOF'
TRONGRID_API_KEY=your-key-here
EOF

# 2. Run with --env-file
docker run -d \
  -p 3001:3001 \
  -v $(pwd)/logs:/app/logs \
  --env-file .env.docker \
  mcp-server-tron

Also add a :warning admonition:

:::warning
Never pass API keys with `-e KEY=value` in production — the value appears in
shell history and `docker inspect`. Use `--env-file` with a file excluded from
version control.
:::

[MJ-02] Breaking Change — No Migration Warning on QuickStart Pages

Property Value
Severity Major
Category Documentation / Compatibility
File docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md, docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md

Description

The removal of TRON_PRIVATE_KEY and TRON_MNEMONIC environment variable support (v1.1.7) is a breaking change for all existing users who currently run either MCP server with those variables set. Their deployments will silently break on upgrade — they will see a "Wallet not configured" error at runtime with no indication of why (the env vars they set are now ignored). The FAQ and LocalPrivatizedDeployment pages include caution blocks about this, but these are not the first pages returning users will consult on upgrade. The QuickStart pages and top-level sidebar pages lack any upgrade notice, changelog link, or "⚠️ Upgrading from v1.1.6?" banner. Users who rely on the QuickStart as their reference will be confused.

Code

<!-- Current QuickStart.md has NO mention of v1.1.7 breaking change -->
These are just the tip of the iceberg. For the full list of 97 tools...

Recommendation

Add a prominent admonition at the top of TRONMCPServer/QuickStart.md and link from the sidebar intro:

:::warning Upgrading from v1.1.6 or earlier?
As of **v1.1.7**, the `TRON_PRIVATE_KEY` and `TRON_MNEMONIC` environment variables
are no longer supported. All wallet management now uses **Agent Wallet**.
If you had either variable set, write operations will fail until you migrate.
See [Migrating to Agent Wallet](./LocalPrivatizedDeployment.md#agent-wallet) for
step-by-step instructions.
:::

The same notice should appear at the top of SUNMCPServer/QuickStart.md (if one exists) and the respective LocalPrivatizedDeployment.md intro sections.


Minor

[MN-01] agent-wallet init -p Lacks Security Caution

Property Value
Severity Minor
Category Security / Documentation
File docs/Agent-Wallet/Developer/CLI-Reference.md : agent-wallet init section

Description

The new agent-wallet init section documents a non-interactive mode that accepts the master password via the -p flag (agent-wallet init -p 'Abc12345!'). Passing passwords as CLI arguments records them in shell history (.bash_history, .zsh_history) and process listings (ps aux). The agent-wallet change-password section immediately below this one correctly includes a :caution block about exactly this risk. The init section is missing the equivalent warning, creating an inconsistency that may mislead users into treating -p as safe on init but not on change-password.

Code

**Non-interactive mode:**
```bash
agent-wallet init -p 'Abc12345!'

**Recommendation**

Add a `:caution` admonition immediately after the non-interactive example, mirroring the `change-password` section:

```markdown
:::caution
`-p` will be recorded in shell history. For production use, prefer the interactive
mode (`agent-wallet init` without flags) or set the `AGENT_WALLET_PASSWORD`
environment variable instead.
:::

[MN-02] --save-runtime-secrets Flag Has No Security Warning

Property Value
Severity Minor
Category Security / Documentation
File docs/Agent-Wallet/Developer/CLI-Reference.md : agent-wallet init and agent-wallet change-password flag tables

Description

Both the agent-wallet init and agent-wallet change-password sections list a --save-runtime-secrets flag described as persisting the password to runtime_secrets.json. This flag stores the master password — the sole credential protecting all encrypted wallet keys — in a plaintext JSON file on disk. This is a significant security trade-off: any process or user with file system access can read it. The flag is listed in a plain table row with no warning, no note about where the file is stored, and no recommendation about when it is or is not appropriate to use.

Code

| `--save-runtime-secrets` | 将密码持久化保存到 `runtime_secrets.json` |

(Same in the English version of CLI-Reference.md)

Recommendation

Expand the flag description and add a warning:

| `--save-runtime-secrets` | Persist the master password to `runtime_secrets.json` in the wallet directory. **Only use in fully trusted, isolated environments (e.g., containerized CI).** |

And add an admonition below the flags table:

:::danger `--save-runtime-secrets` stores your master password in plaintext
`runtime_secrets.json` is not encrypted. Any process with read access to the
wallet directory can retrieve your master password and decrypt all wallet keys.
Do not use this flag on shared machines or in environments where the wallet
directory may be accessible to other users or processes.
:::

[MN-03] agent-wallet "High Risk" Snyk Rating Not Explained in Security Table

Property Value
Severity Minor
Category Documentation
File docs/McpServer-Skills/SKILLS/QuickStart.md : Security Risk Assessments table

Description

The updated security scan table now shows agent-wallet with Med Risk (Gen), 1 alert (Socket), and High Risk (Snyk). This is the highest Snyk rating in the table and applies to a skill that manages private keys and wallet credentials — the most security-critical component. Yet the table provides no explanation of what the risk is, whether it is a known transitive dependency issue, or what users should do about it. All other skills with ratings show lower levels. A user evaluating whether to install the skill has no context to make an informed decision. This is especially concerning given the sensitive nature of wallet management.

Code

│  agent-wallet                      Med Risk    1 alert    High Risk │

Recommendation

Add a footnote or expandable callout below the security table:

> **Note on agent-wallet risk ratings:** The Snyk "High Risk" rating reflects a
> known transitive dependency issue in the underlying crypto libraries (e.g., a
> `secp256k1` or `elliptic` advisory). The `agent-wallet` skill itself does not
> expose these functions to untrusted input. Review the full Snyk report at
> [link] before installing in production environments.

If the risk is not yet characterized, the minimum acceptable change is a note such as:

> The `agent-wallet` Snyk rating is under review. See [GitHub issue #XX] for
> details.

[MN-04] SUN CLI CommandGuide Missing -p/--agent-wallet-password Security Caution

Property Value
Severity Minor
Category Security / Documentation
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Global Flags section

Description

The CommandGuide's Global Flags section correctly includes a :caution block warning about shell history and process listings for the -k/--private-key and -m/--mnemonic flags. However, the -p/--agent-wallet-password flag — which also passes a sensitive credential (the Agent Wallet master password) as a CLI argument — is listed in the same table without any equivalent security warning. A user reading the docs will see the caution for private keys and mnemonics, but may not realize that -p carries the same shell-history risk.

Code

| `-p, --agent-wallet-password <password>` | Override `AGENT_WALLET_PASSWORD` for this invocation |

(Listed without any security note, while -k and -m have a caution block immediately following the table)

Recommendation

Extend the existing :caution block to cover -p as well:

:::caution Private Credential Security
The `-k` / `--private-key`, `-m` / `--mnemonic`, and `-p` / `--agent-wallet-password`
flags pass sensitive material as command-line arguments, which may be recorded in
shell history and process listings. Prefer environment variables
(`AGENT_WALLET_PRIVATE_KEY`, `AGENT_WALLET_MNEMONIC`, `AGENT_WALLET_PASSWORD`)
or [agent-wallet](https://github.com/ABlockofAI/agent-wallet) for production use.
:::

Suggestions

[S-01] exact_gasfree Scheme — Add Fallback Behavior Documentation

File: docs/x402/core-concepts/network-and-token-support.md, docs/x402/getting-started/quickstart-for-human.md

Description: The new exact_gasfree payment scheme routes through a BANK OF AI proxy with "no SLA guarantee." The documentation mentions this limitation in passing but does not describe what happens from a user/buyer perspective when the proxy is unavailable — does the transaction fail silently, fall back to exact, or return an error? Sellers implementing this scheme need to understand the failure modes to build robust integrations.

Suggestion: Add a subsection on failure behavior and a recommendation to always have an exact payment option as a fallback for production deployments. Consider also documenting proxy availability, rate limits, and any monitoring endpoints.


[S-02] Docker Deployment — Add --readonly Flag Note

File: docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Option D (Docker)

Description: The :tip block for Docker says "The Docker image is designed for read-only cloud deployments." However, neither the Docker section nor the docker run example mentions the --readonly flag documented elsewhere. Users who want read-only behavior explicitly should know to pass this flag, and users who want write operations should know that they need a different deployment option rather than trying to add AGENT_WALLET_PASSWORD to the Docker run command.

Suggestion: Reference --readonly explicitly in the Docker tip block and clarify why write operations are not supported in the Docker image (missing Agent Wallet directory mount, or by design).


[S-03] SUN CLI QuickStart — Mention TRON_GRID_API_KEY Recommendation

File: docs/McpServer-Skills/MCP/SUNCli/QuickStart.md : Network & API Configuration section

Description: The QuickStart mentions TRON_GRID_API_KEY as a configurable variable but does not convey that it is recommended for production use (the x402 docs elsewhere use language like "required for mainnet; recommended for production workloads"). A new SUN CLI user querying mainnet data may hit rate limits without understanding why, since the section currently presents the API key as optional without context.

Suggestion: Add a note similar to: "Without a TronGrid API key, SUN CLI uses a shared fallback endpoint with no SLA guarantee. For production or high-frequency queries, set TRON_GRID_API_KEY."


[S-04] i18n zh-Hans sidebars.js Not Updated

File: i18n/zh-Hans/docusaurus-plugin-content-docs/current/sidebars.js

Description: The root sidebars.js was updated to add the SUN CLI category. The diff shows i18n/zh-Hans/docusaurus-plugin-content-docs/current/sidebars.js was also updated (confirmed in the diff). However, 4 new SUNCli .md files were added under i18n/zh-Hans/... but double check that the zh-Hans sidebar includes SUNCli/Intro, SUNCli/QuickStart, SUNCli/CommandGuide, SUNCli/FAQ in the correct order to match the English sidebar. If the translation sidebar ordering diverges from the English one, Chinese users will see a different navigation structure.

Suggestion: Verify the zh-Hans sidebars.js SUNCli entry order matches the English sidebars.js exactly.


Positive Observations

Area Observation
Security messaging Security cautions are placed proactively throughout new content. The :::caution Private Key Security block in CommandGuide.md is clear and actionable; the agent-wallet change-password section explicitly warns about shell history.
Breaking change disclosure Every directly relevant page (FAQ, LocalPrivatizedDeployment) includes a :::caution Legacy wallet options removed block with migration direction.
i18n completeness All 31 zh-Hans files are kept in sync with English counterparts in the same PR, avoiding documentation drift.
Test-first guidance SUN CLI QuickStart and TRON MCP Server docs consistently recommend Nile testnet before mainnet — good practice for financial operations.
Consistent link fixing Internal links have been systematically updated from bare fragment paths (e.g., ../../../Agent-Wallet/Intro) to explicit .md-extension paths (e.g., ../../../Agent-Wallet/Intro.md), improving Docusaurus link validation.
Docker documentation The new Docker option is well-structured with build, run, and configuration notes including a health check endpoint reference.
Dangerous op restriction The agent-wallet skill section explicitly states that remove, reset, and change-password are agent-restricted (must be run in terminal by the user), which is an important safety guardrail documented clearly.
--dry-run promotion Both SUN CLI and the GasFree docs prominently surface --dry-run as a first step before executing write operations — excellent practice for financial tooling.

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 8 7 1 0 Tool count 95→97 consistent across all files; Docker example uses insecure -e pattern
Security 10 6 4 0 init -p, --save-runtime-secrets, Docker -e, sun -p flag all missing or inconsistent warnings
Performance 3 3 0 0 N/A for docs; pagination/rate limit guidance present in SUN CLI
Code Quality 6 5 1 0 agent-wallet Snyk rating unexplained; consistent style otherwise
Testing 2 2 0 0 --dry-run and testnet guidance present throughout
Documentation 8 6 2 0 Breaking change not surfaced in QuickStart; --save-runtime-secrets not explained
Compatibility 4 2 2 0 No QuickStart upgrade warning; migration path only in FAQ/deployment pages
Observability 3 3 0 0 Log path in Docker, --dry-run pattern, error messages documented

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between the specified branches. Runtime behavior, integration testing, and deployment impact are not covered.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-09

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

Code Review Report

Project: BofAI/docs
PR: main -> update-mcp-server
Review Date: 2026-04-09
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main
To Branch update-mcp-server
Commits 25
Files Changed 60
Lines Added +3,769
Lines Removed -658

Commit History

Hash Message
ffb5377 chang wallet mode
b3fc365 fix agent-wallet
05d402c add sunmcpserver
24bfe40 add inspect
37d478b update x402
408ec4b update x402, skills, agent-wallet, mcp-server
f7f440e adjust content
cc7feb9 add agent-wallet cli-reference
85c1a65 fix gasfree
a080ac3 fix
91f6996 fix
3d44188 update all docs
29ab530 update all docs
0dbacc9 add suncli
64a0c36 fix
53baadb fix
0f53ddb fix
856ed9e Merge branch 'update-mcp-server' of github.com:BofAI/docs into update-mcp-server
0e3cfdd add suncli
2056ef1 Merge branch 'main' into update-mcp-server
7043fb4 update version
0712c70 add suncli
d69c9eb add suncli
3335240 add gas free
88c765c add sun-cli

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 3 4 3

Summary

This PR delivers a substantial and well-structured documentation update with three main thrusts: (1) introduction of the new SUN CLI tool as a complete 4-file documentation suite, (2) a breaking wallet-mode migration across TRON MCP Server, SUN MCP Server, and x402 — retiring TRON_PRIVATE_KEY/BSC_PRIVATE_KEY/TRON_MNEMONIC in favour of a unified AGENT_WALLET_PRIVATE_KEY, and (3) a set of documentation enhancements for Agent Wallet (Privy support, init and resolve-address commands, Node.js 20 bump, Windows support) and x402 (new exact_gasfree payment scheme).

The prose is clear, the new SUN CLI reference is thorough, and security admonitions are generally well placed. However, three meaningful issues require resolution before merge: an incorrect GitHub organisation URL in a code example (ABlockofAI vs BofAI), the removal of the plaintext-key security warning when using the new "Option B" env-var wallet path, and mixed link formatting (with/without .md extension) inside TRONMCPServer/LocalPrivatizedDeployment.md that will produce broken navigation links. Four minor polish items and three suggestions round out the review.


Change Summary

1. SUN CLI — New Documentation Suite (4 new files)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md Added Introduction, feature overview, comparison with SUN MCP Server, security notes
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Added Install → first query → wallet config → first swap walkthrough
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Added Complete 860-line command reference (global flags, wallet, price, token, swap, pool, liquidity, position, farm, protocol, transaction, contract)
docs/McpServer-Skills/MCP/SUNCli/FAQ.md Added Troubleshooting guide covering setup, wallet, common errors, AI agent integration

Purpose: Introduce @bankofai/sun-cli as a terminal-first alternative to SUN MCP Server for SunSwap DEX interaction. SUN CLI targets scripting, CI/CD, and AI agents that cannot speak MCP natively.


2. Wallet-Mode Migration — TRON MCP Server & SUN MCP Server

File Change Type Description
docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md Modified Removes Option 2/3 (Private Key, Mnemonic), replaces with Option A/B (generate new / import via AGENT_WALLET_PRIVATE_KEY); adds Docker Option D
docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md Modified Rewrites wallet error sections; removes "Conflicting Wallet Modes" FAQ; adds v1.1.7 changelog
docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md Modified Upgrades tool count 95→97, adds upgrade warning banner
docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md Modified Adds v1.1.7 upgrade warning at top
docs/McpServer-Skills/MCP/TRONMCPServer/ToolList.md Modified 95→97 tools, updates write-tool visibility semantics
docs/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md Modified 95→97 tool count
docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md Modified Mirrors TRON changes; removes Options 2/3
docs/McpServer-Skills/MCP/SUNMCPServer/FAQ.md Modified Removes "Conflicting Wallet Modes" FAQ; updates anchor links to use .md extension

Purpose: Align documentation with v1.1.7 breaking change — legacy TRON_PRIVATE_KEY, BSC_PRIVATE_KEY, and TRON_MNEMONIC env vars removed; all wallet management now flows through Agent Wallet. Also documents new write-tool visibility behaviour (always visible, wallet checked at call time) and Docker deployment.


3. Agent Wallet — New Features & Node.js Version Bump

File Change Type Description
docs/Agent-Wallet/Developer/CLI-Reference.md Modified New commands: init, resolve-address; new --show-address flag for inspect; non-interactive change-password; Privy wallet type docs; example outputs
docs/Agent-Wallet/Developer/SDK-Guide.md Modified Node.js requirement bump 18→20; adds Privy error types
docs/Agent-Wallet/Developer/SDK-Cookbook.md Modified Adds "More Examples" section with cross-platform cookbook links
docs/Agent-Wallet/FAQ.md Modified Adds privy wallet type; Node.js 18→20; Windows support
docs/Agent-Wallet/QuickStart.md Modified Node.js 18→20 references

Purpose: Document Privy cloud wallet support, two new CLI commands (init, resolve-address), Node.js 20 as the minimum version, and newly added Windows support.


4. x402 — exact_gasfree Payment Scheme & Unified Env Var

File Change Type Description
docs/x402/core-concepts/network-and-token-support.md Modified Adds exact_gasfree scheme documentation with GasFree account management CLI examples
docs/x402/faq.md Modified Updates payment scheme list to include exact_gasfree
docs/x402/sdk-features.md Modified Adds exact_gasfree/tron, SufficientBalancePolicy, GasFree, USDD to feature matrix
docs/x402/getting-started/quickstart-for-agent.md Modified Replaces TRON_PRIVATE_KEY/BSC_PRIVATE_KEY with AGENT_WALLET_PRIVATE_KEY; simplifies platform prerequisites; adds TronClientSigner.create() async API; registers ExactGasFreeClientMechanism
docs/x402/getting-started/quickstart-for-human.md Modified Same env-var unification; adds ExactGasFreeClientMechanism; adds fallback-RPC note
docs/x402/getting-started/quickstart-for-sellers.md Modified Env-var rename; adds fallback RPC note
docs/x402/index.md Modified Minor formatting (bold network names)

Purpose: Surface the new exact_gasfree zero-gas payment scheme for TRON, and unify all wallet private-key env vars to AGENT_WALLET_PRIVATE_KEY.


5. Skills & Navigation

File Change Type Description
docs/McpServer-Skills/SKILLS/BANKOFAISkill.md Modified Adds agent-wallet skill entry (table, use-case examples, security admonitions, TRC20 advanced features, Multi-Sig danger callout)
docs/McpServer-Skills/SKILLS/Intro.md Modified 7→8 skills; adds agent-wallet capability blurb
docs/McpServer-Skills/SKILLS/QuickStart.md Modified Updated installer UI screenshots to show 8 skills and agent-wallet security risk ratings
docs/Openclaw-extension/QuickStart.md Modified Reflects 8 skills in installer output; auto-config for mcp-server-tron; adds x402-config cleanup line
sidebars.js Modified Adds "SUN CLI" category to MCP section with 4 child pages
i18n/current/sidebars.js Modified Same sidebar change mirrored to versioned docs
package.json Modified Version bump 1.2.7→1.2.8

Purpose: Register agent-wallet as the 8th skill, add SUN CLI to sidebar navigation, and mirror all key changes into the versioned (i18n/current/) copy of the docs.


Detailed Findings


Major

[MJ-01] Wrong GitHub Organisation URL in CommandGuide.md

Property Value
Severity Major
Category Correctness
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Lines 29–34

Description

The Global Flags security caution in CommandGuide.md links to https://github.com/ABlockofAI/agent-wallet, but every other reference throughout the codebase consistently uses https://github.com/BofAI/agent-wallet. ABlockofAI appears to be an incorrect or legacy organisation name. Users clicking this link from the command reference will reach a 404 or an unrelated repository.

Code

:::caution Private Key Security
The `-k` / `--private-key` and `-m` / `--mnemonic` flags pass sensitive
material as command-line arguments, which may be recorded in shell history
and process listings. Prefer environment variables (`AGENT_WALLET_PRIVATE_KEY`,
`AGENT_WALLET_MNEMONIC`) or [agent-wallet](https://github.com/ABlockofAI/agent-wallet)
encrypted storage for all non-throwaway keys.
:::

Recommendation

or [agent-wallet](https://github.com/BofAI/agent-wallet)

Cross-reference: docs/McpServer-Skills/MCP/SUNCli/Intro.md correctly uses https://github.com/BofAI/agent-wallet.


[MJ-02] Plaintext Private Key Security Warning Removed Without Replacement

Property Value
Severity Major
Category Security / Documentation
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Lines 86–110 (and mirror in docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md)

Description

The PR removes the :::warning admonitions that explained the security risks of plaintext private keys in environment variables (exposure via shell history, ps aux, log files). The replacement "Option B: Import an Existing Private Key" now instructs users to run export AGENT_WALLET_PRIVATE_KEY=your_private_key_here — the same plaintext exposure risk — but provides only a :::tip about persistence and no mention of the security trade-off. Users who previously understood the risk from the warning may miss it in the new layout; new users have no warning at all for this path.

The :::caution Legacy wallet options removed note at the end of Option B discusses migration, not security risk.

Code

-:::warning
-Using a plaintext private key in environment variables carries a **real risk of fund theft**
-— environment variables can be leaked via shell history, process listings (`ps aux`), or
-log files. **Only keep small amounts of funds** in wallets configured this way.
-:::

+#### Option B: Import an Existing Private Key
+
+If you already have a private key you want to use, set it via the `AGENT_WALLET_PRIVATE_KEY`
+environment variable:
+
+```bash
+export AGENT_WALLET_PRIVATE_KEY=your_private_key_here

Recommendation

Add a :::warning (or at minimum :::caution) admonition immediately under the Option B heading:

#### Option B: Import an Existing Private Key

:::warning Security trade-off
Setting `AGENT_WALLET_PRIVATE_KEY` as an environment variable exposes the key in
shell history, process listings (`ps aux`), and potentially log files. Only keep
small amounts of funds in wallets configured this way. For production or
significant funds, use Option A (generate a new wallet via `agent-wallet start`)
which stores the key encrypted on disk.
:::

[MJ-03] Inconsistent Internal Link Format in TRONMCPServer/LocalPrivatizedDeployment.md

Property Value
Severity Major
Category Correctness
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Lines 57, 66

Description

Two newly introduced links inside LocalPrivatizedDeployment.md reference Agent-Wallet/Intro without the .md file extension, while the immediately preceding link on line 53 — and all other Agent Wallet links added in this PR across every other file — correctly use the .md extension. Docusaurus resolves links at build time; depending on the trailingSlash and markdown.format configuration, bare links without .md may fail or generate 404 pages in production.

Code

<!-- Line 53 — correct -->
TRON MCP Server uses [Agent Wallet](../../../Agent-Wallet/Intro.md) for secure wallet management.

<!-- Line 57 — missing .md -->
TRON MCP Server uses [Agent Wallet](../../../Agent-Wallet/Intro) for wallet management.

<!-- Line 66 — missing .md -->
> For installation, initialization, and detailed usage of Agent Wallet, see the
> [Agent-Wallet documentation](../../../Agent-Wallet/Intro).

Recommendation

<!-- Line 57 -->
TRON MCP Server uses [Agent Wallet](../../../Agent-Wallet/Intro.md) for wallet management.

<!-- Line 66 -->
> For installation, initialization, and detailed usage of Agent Wallet, see the
> [Agent-Wallet documentation](../../../Agent-Wallet/Intro.md).

Verify the same lines in i18n/current/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md — the versioned copy carries the same issue.


Minor

[MN-01] agent-wallet "High Risk" Snyk Rating Shown Without Context

Property Value
Severity Minor
Category Documentation
File docs/McpServer-Skills/SKILLS/QuickStart.md : Lines 88–100

Description

The newly added agent-wallet skill shows High Risk from Snyk and Med Risk from Gen in the installer security scan output, with no accompanying explanation in the prose. x402-payment also shows Med Risk from Snyk in both the previous and current version, and a comment was added for it elsewhere; but the agent-wallet rating — significantly higher — is left without context. Users may be alarmed and abort installation, or worse, dismiss the rating without understanding it. Since this is a wallet-signing skill, user trust is especially important here.

Code

│  agent-wallet                      Med Risk    1 alert    High Risk │

Recommendation

Add a brief note after the security scan block (or as a :::note admonition) explaining what these ratings reflect:

:::note About the agent-wallet security rating
The "High Risk" Snyk rating reflects that `agent-wallet` handles cryptographic
key material, which scanner heuristics flag by design. The skill signs locally
and never transmits private keys to external services. Review the
[agent-wallet source](https://github.com/BofAI/agent-wallet) if you wish to
audit the signing logic yourself.
:::

The same note (already present for x402-payment elsewhere) should be consistent.


[MN-02] --save-runtime-secrets Flag Documented Without Security Warning

Property Value
Severity Minor
Category Security / Documentation
File docs/Agent-Wallet/Developer/CLI-Reference.md : Lines (new agent-wallet init section)

Description

The new agent-wallet init command documentation lists the --save-runtime-secrets flag (which persists the master password to runtime_secrets.json) with no security warning about the risks of storing the master password in a plaintext JSON file on disk. This is particularly sensitive because runtime_secrets.json could be read by any process with file system access, undermining the encryption model of local_secure wallets.

The agent-wallet change-password section added in the same PR does include a caution about shell history for non-interactive use — the same standard should apply here.

Code

| Flag | Description |
| :--- | :--- |
| `--password, -p <pw>` | Master password (skip prompt) |
| `--save-runtime-secrets` | Persist password to `runtime_secrets.json` |

Recommendation

Add a caution admonition:

:::caution
`--save-runtime-secrets` writes your master password to `runtime_secrets.json`
in plaintext. Any process with read access to this file can decrypt all
`local_secure` wallets. Use only in fully isolated environments (e.g., a
dedicated CI runner). Prefer interactive password entry for developer machines.
:::

[MN-03] No Migration Note for x402 SDK Users Switching Env Var Names

Property Value
Severity Minor
Category Documentation
File docs/x402/getting-started/quickstart-for-agent.md, quickstart-for-human.md, quickstart-for-sellers.md

Description

The PR renames the chain-specific private key env vars (TRON_PRIVATE_KEY, BSC_PRIVATE_KEY) to the unified AGENT_WALLET_PRIVATE_KEY across all three x402 quick-start guides. Existing users who have TRON_PRIVATE_KEY or BSC_PRIVATE_KEY set in their shells, .env files, CI pipelines, or Docker configs will experience silent key resolution failure — the SDK will find no wallet and fail at runtime. Unlike the MCP server docs, these x402 guides contain no upgrade callout banner or migration note.

Recommendation

Add an upgrade notice at the top of each affected quickstart, consistent with the pattern already used in TRONMCPServer/QuickStart.md:

:::warning Migrating from an earlier x402 SDK version?
The environment variable for your private key has changed:
- `TRON_PRIVATE_KEY``AGENT_WALLET_PRIVATE_KEY`
- `BSC_PRIVATE_KEY``AGENT_WALLET_PRIVATE_KEY`

Update your shell profile, `.env` files, and CI/CD pipeline configs before upgrading.
:::

[MN-04] exact_gasfree Routes Through Third-Party Proxy Without Explicit Trust Notice

Property Value
Severity Minor
Category Security / Documentation
File docs/x402/core-concepts/network-and-token-support.md : exact_gasfree section

Description

The exact_gasfree documentation states that "all GasFree API calls route through the BANK OF AI facilitator endpoint at https://facilitator.bankofai.io/{mainnet,nile}" to eliminate the need for client-side API keys. This means payment transaction metadata (wallet addresses, amounts, signatures) is relayed through a third-party operated proxy. The docs explain the convenience benefit but do not disclose what data the proxy receives, whether it logs requests, or what trust assumptions users are making.

Recommendation

Add a transparency note:

:::note Privacy and trust
When using `exact_gasfree`, your wallet address, payment amounts, and
authorization signatures are transmitted to `https://facilitator.bankofai.io`
for relay to the GasFree API. The BANK OF AI facilitator does not retain
custody of funds but does see transaction metadata. For production workloads
requiring full data sovereignty, consider running your own GasFree relay.
:::

Suggestions

[S-01] Add a Dedicated v1.1.7 Migration Guide

File: docs/McpServer-Skills/MCP/TRONMCPServer/ (new file suggested)

Description: The v1.1.7 breaking changes (wallet mode removal, write-tool visibility change) are documented in-line across FAQ, Intro, QuickStart, and LocalPrivatizedDeployment. A single dedicated migration page (e.g. MigratingToV1.1.7.md) would give users a single authoritative reference, and could be linked from all upgrade warning banners.

Suggestion: Create docs/McpServer-Skills/MCP/TRONMCPServer/MigratingToV1.1.7.md covering: what changed, why, step-by-step migration instructions for each former wallet mode, and a verification checklist.


[S-02] Document TronClientSigner.create() API Change Impact

File: docs/x402/getting-started/quickstart-for-human.md : Python code block

Description: The Python code example now uses await TronClientSigner.create() (async factory) instead of the synchronous TronClientSigner.from_private_key(os.getenv("TRON_PRIVATE_KEY")). This is a significant API surface change. Users who have built their own x402 clients based on the previous snippet will need to update their code, but there is no API changelog or SDK version gate mentioned.

Suggestion: Add a brief inline comment and/or a :::note SDK version admonition indicating the minimum SDK version that supports TronClientSigner.create(), and note that from_private_key() is deprecated.


[S-03] Docker Section Could Clarify Read-Only Limitation More Prominently

File: docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Option D Docker

Description: The Docker deployment section notes at the end (in a :::tip) that "The Docker image is designed for read-only cloud deployments." This important constraint is easy to miss. Users expecting write operations in Docker may configure the container and only discover the limitation after attempting a transaction.

Suggestion: Move the read-only limitation to the opening of the Docker section as a :::warning or make it the first sentence of the section body, so users can decide whether Docker is the right option before reading the setup steps.


Positive Observations

Area Observation
Upgrade warnings TRON MCP Server Intro.md and QuickStart.md both open with a prominent :::warning callout for v1.1.7 upgraders — excellent pattern that proactively prevents user confusion.
Docker security guidance The Docker section explicitly warns against passing secrets with -e KEY=value and mandates --env-file — this is the correct pattern and well articulated.
change-password non-interactive warning New change-password docs correctly warn that -p / --new-password flags will appear in shell history and recommend interactive mode for production.
--dry-run throughout SUN CLI The CommandGuide and QuickStart consistently promote --dry-run before high-value write operations.
Consistent migration callouts The :::caution Legacy wallet options removed admonition is consistently placed at the end of each affected wallet section across both TRON MCP and SUN MCP server docs.
SUN CLI vs SUN MCP comparison table The Intro.md for SUN CLI includes a clear side-by-side comparison table helping users choose the right tool — this is an excellent UX addition.
exact_gasfree fallback RPC transparency Each quickstart now includes a :::note Fallback RPC Endpoint callout that honestly discloses the no-SLA nature of the public fallback, encouraging users to get their own API key for production.
Sidebar navigation Adding the SUN CLI category to both sidebars.js and i18n/current/sidebars.js ensures consistent navigation in both the default and versioned docs.

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 8 6 2 0 Broken GitHub org URL (MJ-01); broken link format (MJ-03)
Security 7 5 2 0 Missing plaintext key warning (MJ-02); --save-runtime-secrets undisclosed risk (MN-02)
Performance 3 3 0 0 N/A — documentation repo
Code Quality 6 5 1 0 Inconsistent link format (MJ-03); minor prose duplication
Testing 2 2 0 0 No test files in this repo
Documentation 8 6 2 0 Missing env-var migration note (MN-03); missing gasfree trust model (MN-04)
Compatibility 4 3 1 0 No x402 SDK migration guide for breaking API change (S-02)
Observability 2 2 0 2 N/A — documentation repo

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between main and update-mcp-server. Runtime behavior, integration testing, and deployment impact are not covered.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-09

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

Code Review Report

Project: BofAI/docs (x402-tron Documentation)
PR: main -> update-mcp-server
Review Date: 2026-04-09
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main
To Branch update-mcp-server
Commits 25
Files Changed 60
Lines Added +3,779
Lines Removed -668

Commit History

Hash Message
daea552 fix seller example
ffb5377 chang wallet mode
b3fc365 fix agent-wallet
05d402c add sunmcpserver
24bfe40 add inspect
37d478b update x402
408ec4b update x402,skills,agent-wallet,mcp-server
f7f440e adjust content
cc7feb9 add agent-wallet cli-reference
85c1a65 fix gasfree
a080ac3 fix
91f6996 fix
3d44188 update all docs
29ab530 update all docs
0dbacc9 add suncli
64a0c36 fix
53baadb fix
0f53ddb fix
856ed9e Merge branch 'update-mcp-server' of github.com:BofAI/docs into update-mcp-server
0e3cfdd add suncli
2056ef1 Merge branch 'main' into update-mcp-server
7043fb4 update version
0712c70 add suncli
d69c9eb add cuncli
3335240 add gas free
5a8e320 fix
88c765c add sun-cli

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 3 4 4

Summary

This PR is a substantial documentation update covering four main areas: (1) adding full SUN CLI documentation (Intro, QuickStart, CommandGuide, FAQ — approximately 1,267 new lines), (2) migrating TRON MCP Server and SUN MCP Server wallet configuration from legacy TRON_PRIVATE_KEY/TRON_MNEMONIC environment variables to Agent Wallet (AGENT_WALLET_PASSWORD/AGENT_WALLET_PRIVATE_KEY), (3) extending Agent Wallet documentation for Privy wallet type, new CLI commands (init, resolve-address, inspect --show-address), and a Node.js version bump from ≥18 to ≥20, and (4) adding exact_gasfree payment scheme documentation for TRON.

The changes are well-structured and represent a meaningful improvement in security posture (moving users away from plaintext private keys). However, three major issues require attention before merge: two newly introduced broken internal links, a numbering gap in deployment options (Option C is missing — jumping from B to D), and a version inconsistency where the quickstart-for-human.md checklist still references "Node.js 18+" while all other Agent Wallet docs have been updated to 20+. These issues will produce broken links in the live documentation site and confuse users.


Change Summary

1. SUN CLI Documentation (New)

Four new files added under docs/McpServer-Skills/MCP/SUNCli/ and their i18n counterparts:

  • Intro.md — overview, comparison table against SUN MCP Server, security notes
  • QuickStart.md — install, first query, wallet setup, execute first swap
  • CommandGuide.md — complete command reference (~860 lines covering wallet, price, token, swap, pool, liquidity, position, pair, farm, protocol, transaction, contract)
  • FAQ.md — troubleshooting guide

Both sidebars.js and i18n/zh-Hans/.../sidebars.js were updated to include the new SUN CLI category.

2. TRON MCP Server & SUN MCP Server — Wallet Migration (Breaking Change for Existing Users)

All references to TRON_PRIVATE_KEY, TRON_MNEMONIC, and BSC_PRIVATE_KEY were replaced with AGENT_WALLET_PASSWORD or AGENT_WALLET_PRIVATE_KEY. The three-option table (Agent Wallet / Private Key / Mnemonic) was replaced with a streamlined two-option flow (generate new wallet / import existing key). A deprecation warning (:::caution Legacy wallet options removed:::) was added in both English and Chinese documentation. This is documented as a v1.1.7 breaking change.

3. Agent Wallet Documentation Updates

  • Node.js minimum version bumped from ≥18 to ≥20 (consistent across QuickStart.md, SDK-Guide.md, FAQ.md in both docs/ and i18n)
  • privy wallet type added to FAQ.md comparison table and SDK-Guide.md error hierarchy
  • New CLI commands documented: agent-wallet init, inspect --show-address, resolve-address, non-interactive change-password
  • Additional SDK examples added to SDK-Cookbook.md
  • Windows support added in FAQ.md (previously macOS + Linux only)

4. x402 Payment Scheme — exact_gasfree

  • New exact_gasfree scheme documented in network-and-token-support.md, faq.md, and sdk-features.md
  • Client code examples updated to use TronClientSigner.create() / EvmClientSigner.create() (async factory) instead of direct constructor with raw private key
  • Python HTTP client timeout increased from 60s to 120s
  • FastAPI protected endpoint signature corrected to include request: Request parameter

5. Miscellaneous

  • package.json version bumped from 1.2.7 to 1.2.8
  • OpenClaw QuickStart updated to reflect automatic TRON MCP configuration (no more manual API key prompt during install)
  • Skills count updated from 7 to 8 (agent-wallet skill added)
  • TRON MCP Server tool count updated from 95 to 97

Detailed Findings

Finding 1 — Inconsistent Internal Links (Missing .md extension)

Severity: Major
Category: Documentation & Maintainability

Location:

  • docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md (added paragraph referencing ../../../Agent-Wallet/Intro)
  • i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md (same)

Code Evidence:

The diff introduces two new paragraphs that use a link without the .md extension, while the immediately preceding and surrounding lines in the same diff use the .md-suffixed form:

+TRON MCP Server uses [Agent Wallet](../../../Agent-Wallet/Intro) for wallet management. Private keys are encrypted...

vs. the corrected form used everywhere else in this same PR:

+The wallet determines which identity the AI assistant uses to perform on-chain operations. TRON MCP Server uses [Agent Wallet](../../../Agent-Wallet/Intro.md) for secure wallet management.

The old > For installation, initialization, and detailed usage of Agent Wallet, see the [Agent-Wallet documentation](../../../Agent-Wallet/Intro). line that was present in main was not updated to add .md when the new content was added around it. This results in two broken Docusaurus links: one in the English doc and one in its Chinese i18n counterpart.

Recommendation: Change both occurrences to ../../../Agent-Wallet/Intro.md to match all other link references in this PR.


Finding 2 — Deployment Option Numbering Gap (Option C Missing)

Severity: Major
Category: Correctness & Logic / Documentation

Location:

  • docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md
  • i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md

Code Evidence:

The wallet setup section introduces "Option A" and "Option B" for wallet initialization. The server deployment section that follows uses "Option A", "Option B" (HTTP mode, previously existed), then jumps directly to "Option D" for Docker:

+#### Option A: Generate a New Wallet (Recommended for New Users)
+#### Option B: Import an Existing Private Key
 #### Option A: Run directly with npx (Recommended)
 #### Option B: Run from source
+#### Option D: Docker Deployment

"Option C" does not exist anywhere in the document. The tip at the bottom of the Docker section also references only "Option A or B":

+The Docker image is designed for read-only cloud deployments. For local write operations (transfers, staking, etc.), use Option A or B with a configured Agent Wallet.

The skipped label makes navigation confusing since users scanning by letter will wonder what "C" was. The same issue appears in the i18n file.

Recommendation: Renumber the Docker option to "Option C", or if "C" was intentionally skipped (reserved for a future option), add a note explaining the gap.


Finding 3 — Node.js Version Inconsistency in quickstart-for-human.md

Severity: Major
Category: Correctness & Logic / Documentation

Location:

  • docs/x402/getting-started/quickstart-for-human.md (line ~27)
  • i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/getting-started/quickstart-for-human.md

Code Evidence:

-- [ ] **Python 3.10+** or **Node.js 18+** installed (depending on your chosen language)
+- [ ] **Python 3.11+** or **Node.js 18+** installed (depending on your chosen language)

The Python requirement was correctly updated from 3.10+ to 3.11+. However, Node.js remains at "18+" in these files while all Agent Wallet documentation (QuickStart, SDK-Guide, FAQ) was updated to Node.js ≥20. The x402 SDK documentation is now contradicting the Agent Wallet documentation it depends on.

Recommendation: Update the Node.js prerequisite in quickstart-for-human.md (and its i18n counterpart) from 18+ to 20+ to match the now-unified requirement stated across all other documentation.


Finding 4 — echo $AGENT_WALLET_PRIVATE_KEY Instructs Users to Print Private Key to Terminal

Severity: Minor
Category: Security / Documentation

Location:

  • docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md
  • docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md
  • docs/x402/getting-started/quickstart-for-agent.md
  • docs/x402/getting-started/quickstart-for-human.md
  • All i18n counterparts of the above

Code Evidence (representative):

+Verify the environment variable is set:
+
+```bash
+echo $AGENT_WALLET_PRIVATE_KEY
+```

This is a documentation pattern that instructs users to print their raw private key to the terminal as a "success check". The shell output will appear in terminal scrollback, may be captured in terminal logs, and could be seen in screen-sharing sessions. The original documentation avoided this by recommending a .env file approach.

The existing security caution note added elsewhere in this PR acknowledges this class of risk:

:::caution
Both -p and --new-password will be recorded in shell history. For production use, prefer interactive mode or pipe passwords from a secrets manager.
:::

Recommendation: Replace echo $AGENT_WALLET_PRIVATE_KEY with a safer verification that does not expose the value, for example:

[[ -n "$AGENT_WALLET_PRIVATE_KEY" ]] && echo "Variable is set" || echo "Variable is NOT set"

This pattern is already used elsewhere in this PR's changed content (in the TRON MCP FAQ): [[ -n "$AGENT_WALLET_PASSWORD" ]] && echo "Password is set" || echo "Password NOT set". Apply the same pattern consistently.


Finding 5 — GitHub Organisation Name Inconsistency (ABlockofAI vs BofAI)

Severity: Minor
Category: Documentation & Maintainability

Location:

  • docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md (Global Flags section, caution admonition)
  • i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNCli/CommandGuide.md

Code Evidence:

+`AGENT_WALLET_MNEMONIC`) or [agent-wallet](https://github.com/ABlockofAI/agent-wallet)

vs. every other agent-wallet link in this PR:

[agent-wallet](https://github.com/BofAI/agent-wallet)

Two different GitHub organisation names are used for the same repository: ABlockofAI and BofAI. One of these will return a 404, which is harmful to user experience and SEO.

Recommendation: Determine the canonical organisation name and fix the ABlockofAI reference to match. Based on frequency of use throughout the repository, BofAI appears to be correct.


Finding 6 — quickstart-for-sellers.md .env Example Still Uses Placeholder Syntax That May Confuse Users

Severity: Minor
Category: Documentation & Maintainability

Location:

  • docs/x402/getting-started/quickstart-for-sellers.md

Code Evidence:

-TRON_PRIVATE_KEY=paste_your_facilitator_private_key_here
+AGENT_WALLET_PRIVATE_KEY=paste_your_facilitator_private_key_here

The variable name has been correctly migrated. However, the instruction above the block still says "Facilitator wallet" but the same variable AGENT_WALLET_PRIVATE_KEY is also used in the agent/human quickstarts for non-Facilitator wallets. Users may be confused about whether a single variable serves both roles or if separate wallets require separate variables. The doc does state "NOT your receiving wallet!" but does not explain how to configure a separate key for each role if both are running in the same environment.

Recommendation: Add a brief note clarifying that if both the Facilitator and the client run in the same environment, separate shell sessions or .env files with different values are needed, since AGENT_WALLET_PRIVATE_KEY is a single variable per process.


Finding 7 — Docker Section Introduces MCP_HOST=0.0.0.0 Without Security Warning

Severity: Minor
Category: Security / Documentation

Location:

  • docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md (Option D / Docker section)
  • i18n/zh-Hans/.../LocalPrivatizedDeployment.md

Code Evidence:

+```bash
+export MCP_PORT=3001      # default: 3001
+export MCP_HOST=0.0.0.0   # default: 0.0.0.0
+```

The documentation lists 0.0.0.0 as the default bind address without noting the security implication: binding to 0.0.0.0 exposes the MCP server on all network interfaces, including those reachable from the network. Since the Docker section's tip states "The Docker image is designed for read-only cloud deployments", a server exposed on 0.0.0.0 in a cloud environment without authentication is accessible to anyone who can reach the host.

Recommendation: Add a note that for local use, binding to 127.0.0.1 is recommended. Only bind to 0.0.0.0 when network-level access control (firewall, reverse proxy with authentication) is in place.


Positive Observations

  1. Security improvement: Removing support for TRON_PRIVATE_KEY and TRON_MNEMONIC (plaintext private keys in env vars) in favour of Agent Wallet's encrypted keystore is a genuine security improvement. The migration path is clearly documented with :::caution Legacy wallet options removed::: admonitions.

  2. Consistent link format correction: The PR systematically fixed Agent-Wallet/IntroAgent-Wallet/Intro.md and Agent-Wallet/FAQAgent-Wallet/FAQ.md across both English and Chinese documentation. This fixes pre-existing broken links.

  3. Comprehensive new SUN CLI documentation: The four new SUN CLI files (~1,267 lines) are thorough and well-structured. The CommandGuide covers all command categories with consistent flag tables, and the Intro page's comparison table between SUN CLI and SUN MCP Server is particularly helpful for users choosing between the two tools.

  4. Breaking change callout: The upgrade warning admonition at the top of TRONMCPServer/Intro.md and TRONMCPServer/QuickStart.md is prominently placed and gives users a direct migration path. This is good practice for breaking changes.

  5. Docker deployment security: The new Docker deployment section correctly instructs users to use --env-file instead of -e KEY=value on the command line, with an explicit :::warning::: admonition. This is the right approach.

  6. FastAPI endpoint signature fix: Correcting async def protected_endpoint()async def protected_endpoint(request: Request) and adding the Request import is a genuine code correctness fix (the request object is needed if the decorated endpoint ever needs to read request headers/body, and the decorator may inject it).

  7. i18n parity: All English documentation changes are mirrored in the i18n/zh-Hans/ directory, maintaining documentation parity between languages.


Checklist Results

Category Status Notes
A. Correctness & Logic Partial Node.js version inconsistency (Finding 3); Option numbering gap (Finding 2)
B. Security Partial echo $AGENT_WALLET_PRIVATE_KEY reveals private key (Finding 4); MCP_HOST=0.0.0.0 needs security note (Finding 7)
C. Performance N/A Documentation only
D. Code Quality Partial Broken links (Finding 1); org name inconsistency (Finding 5); option numbering gap (Finding 2)
E. Testing N/A Documentation only — no automated link checking visible in CI configuration
F. Documentation & Maintainability Partial New docs are thorough; broken links and version inconsistency need resolution

Disclaimer

This review was performed by an automated AI reviewer on the diff between origin/main and origin/update-mcp-server. Only changed lines were evaluated for issues. Full file context was read to understand impact. This review does not replace human judgment and may not capture all issues, particularly those requiring runtime validation or deep domain expertise in the underlying blockchain protocols.

@github-actions
Copy link
Copy Markdown

Code Review Report

Project: BofAI/docs
PR: main -> update-mcp-server
Review Date: 2026-04-10
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch origin/main
To Branch origin/update-mcp-server
Commits 26
Files Changed 62
Lines Added +4,210
Lines Removed -747

Commit History

Hash Message
d883416 update content
daea552 fix seller example
ffb5377 chang wallet mode
b3fc365 fix agent-wallet
05d402c add sunmcpserver
24bfe40 add inspect
37d478b update x402
408ec4b update x402, skills, agent-wallet, mcp-server
f7f440e adjust content
cc7feb9 add agent-wallet cli-reference
85c1a65 fix gasfree
a080ac3 fix
91f6996 fix
3d44188 update all docs
29ab530 update all docs
0dbacc9 add suncli
64a0c36 fix
53baadb fix
0f53ddb fix
856ed9e Merge branch 'update-mcp-server'
0e3cfdd add suncli
2056ef1 Merge branch 'main' into update-mcp-server
7043fb4 update version
0712c70 add suncli
d69c9eb add suncli
3335240 add gas free

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 4 6 5

Summary

This PR is a large documentation-only update covering five main areas: (1) introduction of a brand-new SUN CLI section (four new pages, ~1,400 lines), (2) TRON and SUN MCP Server v1.1.7 migration away from legacy TRON_PRIVATE_KEY/TRON_MNEMONIC wallet modes to Agent Wallet exclusively, (3) Agent Wallet documentation expansion with Privy wallet support, Node.js 20 requirement, and new CLI commands, (4) x402 protocol additions including the new exact_gasfree payment scheme, Facilitator rate limiting, and updated self-hosted Facilitator instructions, and (5) addition of the agent-wallet skill as the 8th installable skill.

The overall quality of the content is high — security guidance is generally thorough, new features are well explained, and the migration notice for v1.1.7 is prominently placed. However, the PR introduces several issues that need attention before merge: a Node.js version inconsistency between files, loss of explicit security warnings when moving from plaintext keys to the new AGENT_WALLET_PRIVATE_KEY environment variable pattern, a missing Request parameter import in Python code examples, and a reference to a deprecated repository in the self-hosted Facilitator path. Additionally, the agent-wallet skill's "High Risk" Snyk rating is presented to users without adequate explanation or recommended mitigation.


Change Summary

1. New SUN CLI Documentation

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md New Introduction to SUN CLI, comparison with SUN MCP Server
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md New Install + first price query walkthrough
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md New Complete 860-line command reference for all sub-commands
docs/McpServer-Skills/MCP/SUNCli/FAQ.md New Troubleshooting, wallet config, AI agent integration FAQ
sidebars.js + i18n/current/sidebars.js Modified Added "SUN CLI" category to sidebar navigation

Purpose: Document the new @bankofai/sun-cli CLI package that wraps SunSwap DEX operations for terminal and scripted use.


2. TRON MCP Server v1.1.7 Changes

File Change Type Description
docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md Modified Breaking-change banner, tool count 95→97
docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md Modified Breaking-change banner, tool count reference update
docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md Modified Replaced three wallet modes with Agent Wallet only; added Docker (Option D)
docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md Modified Updated FAQ for wallet-mode removal, added v1.1.7 changelog
docs/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md Modified Tool count reference 95→97
docs/McpServer-Skills/MCP/TRONMCPServer/ToolList.md Modified Tool count 95→97; updated write-tool visibility behavior

Purpose: Reflect v1.1.7 API changes: TRON_PRIVATE_KEY/TRON_MNEMONIC removed; write tools now always visible (checked at execution time); Docker support added.


3. SUN MCP Server Wallet Mode Removal

File Change Type Description
docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md Modified Same wallet consolidation as TRON MCP Server
docs/McpServer-Skills/MCP/SUNMCPServer/FAQ.md Modified Updated FAQ: removed "Conflicting Wallet Modes" section, fixed link anchors

Purpose: Mirror the TRON MCP Server wallet change for SUN MCP Server; remove legacy wallet options.


4. Agent Wallet Documentation Expansion

File Change Type Description
docs/Agent-Wallet/QuickStart.md Modified Node.js requirement 18→20
docs/Agent-Wallet/FAQ.md Modified Added privy wallet type; Windows support; Node.js 20; OS matrix update
docs/Agent-Wallet/Developer/SDK-Guide.md Modified Node.js 18→20; added Privy error types
docs/Agent-Wallet/Developer/CLI-Reference.md Modified New init, resolve-address, inspect --show-address, change-password non-interactive; Privy tip
docs/Agent-Wallet/Developer/SDK-Cookbook.md Modified Added "More Examples" table linking to repo examples

Purpose: Document new Node.js 20 requirement, Privy managed wallet type, new CLI commands, and expanded SDK examples.


5. x402 Protocol Updates

File Change Type Description
docs/x402/core-concepts/network-and-token-support.md Modified Added exact_gasfree scheme; BSC YAML config note
docs/x402/core-concepts/facilitator.md Modified Rate limiting table; payment record scoping by API Key
docs/x402/faq.md Modified exact_gasfree FAQ entry
docs/x402/sdk-features.md Modified Added exact_gasfree, SufficientBalancePolicy, GasFree, USDD support
docs/x402/index.md Modified Minor bold formatting
docs/x402/getting-started/quickstart-for-agent.md Modified Unified AGENT_WALLET_PRIVATE_KEY; auto-install script; GasFree info block
docs/x402/getting-started/quickstart-for-human.md Modified Unified AGENT_WALLET_PRIVATE_KEY; Python 3.11+; GasFree imports
docs/x402/getting-started/quickstart-for-sellers.md Modified Updated self-hosted Facilitator repo & config format; AGENT_WALLET_PRIVATE_KEY

Purpose: Document exact_gasfree scheme (zero-gas TRON payments), Facilitator rate limiting, USDD support, and the switch to a new Facilitator repo/config format.


6. Skills and Navigation Updates

File Change Type Description
docs/McpServer-Skills/SKILLS/BANKOFAISkill.md Modified Added agent-wallet skill section; extended trc20 and multisig details
docs/McpServer-Skills/SKILLS/Intro.md Modified 7→8 skills; added "Secure Wallet Management" capability block
docs/McpServer-Skills/SKILLS/QuickStart.md Modified Updated skill count and security risk assessment table
docs/Openclaw-extension/QuickStart.md Modified 7→8 skills; automatic TRON MCP config; x402 config in clean-install list
package.json Modified Version bump 1.2.7→1.2.8

Detailed Findings

Major

[MJ-01] Node.js Version Inconsistency: "18+" in quickstart-for-human.md vs "20+" Everywhere Else

Property Value
Severity Major
Category Correctness
File docs/x402/getting-started/quickstart-for-human.md : Lines 30

Description

The prerequisite checklist in quickstart-for-human.md was updated to say Python 3.11+ (correct), but the Node.js minimum was left at 18+:

- [ ] **Python 3.11+** or **Node.js 18+** installed

Every other changed file in this PR explicitly bumps the Node.js requirement to 20+Agent-Wallet/QuickStart.md, Agent-Wallet/FAQ.md, Agent-Wallet/Developer/SDK-Guide.md, SUNCli/FAQ.md, SUNCli/QuickStart.md. A user following quickstart-for-human.md who has Node 18 installed will believe they are compliant, then hit runtime errors when the underlying @bankofai/x402 package requires Node ≥ 20.

Code

- [ ] **Python 3.11+** or **Node.js 18+** installed (depending on your chosen language)

Recommendation

- [ ] **Python 3.11+** or **Node.js 20+** installed (depending on your chosen language)

[MJ-02] Security Warning Downgraded: AGENT_WALLET_PRIVATE_KEY Plaintext Export Has No Shell-History Warning

Property Value
Severity Major
Category Security
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md, docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md, docs/x402/getting-started/quickstart-for-sellers.md : Multiple locations

Description

The previous version of LocalPrivatizedDeployment.md (both TRON and SUN) included explicit :::warning blocks when documenting TRON_PRIVATE_KEY and TRON_MNEMONIC:

"Using a plaintext private key in environment variables carries a real risk of fund theft — environment variables can be leaked via shell history, process listings (ps aux), or log files."

This PR removes those wallet options in favor of AGENT_WALLET_PRIVATE_KEY, but the new "Option B / Path 2: Import an Existing Private Key" sections show:

export AGENT_WALLET_PRIVATE_KEY=your_private_key_here

...with only a :::tip about persistence and no security warning at all. The key is still plaintext in shell history and process listings. quickstart-for-sellers.md similarly shows:

export AGENT_WALLET_PRIVATE_KEY=paste_your_facilitator_private_key_here

with no accompanying caution. The CLI-Reference.md for change-password does include a :::caution about shell history for that specific command, establishing a precedent the deployment guides should follow.

Recommendation

Add a :::caution or :::warning admonition wherever export AGENT_WALLET_PRIVATE_KEY=<key> appears in plaintext, e.g.:

:::caution Shell history risk
This command stores your private key in shell history (`~/.zsh_history` or `~/.bash_history`).
For production use, prefer importing the key via `agent-wallet start` (encrypted keystore, Path 1)
or load it from a secrets manager. If you must use this method, run `history -d $(history 1)` after
setting the variable, or prefix the command with a space (if your shell supports `HISTCONTROL=ignorespace`).
:::

[MJ-03] Python Code Example Missing Request Parameter Import in Seller Quick Start

Property Value
Severity Major
Category Correctness
File docs/x402/getting-started/quickstart-for-sellers.md : Lines 153, 195 (TRON and BSC tabs)

Description

The diff adds Request to two FastAPI endpoint function signatures:

-async def protected_endpoint():
+async def protected_endpoint(request: Request):

The import line was also updated:

-from fastapi import FastAPI
+from fastapi import FastAPI, Request

Both changes are necessary and consistent in the diff. This is a correct fix (without Request in the import the code would raise NameError at startup). However, the i18n mirror file (i18n/current/x402/getting-started/quickstart-for-sellers.md) must also reflect this change. If it does not, users reading the versioned/translated documentation will have broken example code.

Recommendation

Verify that the corresponding i18n mirror file at i18n/current/x402/getting-started/quickstart-for-sellers.md contains the same from fastapi import FastAPI, Request and async def protected_endpoint(request: Request): corrections. The diff stat shows this file was changed (+240 lines) but the exact content should be validated.


[MJ-04] Self-Hosted Facilitator References Undocumented Repo Change (x402-demox402-facilitator)

Property Value
Severity Major
Category Documentation
File docs/x402/getting-started/quickstart-for-sellers.md : Self-Hosted tab, Step 3.2

Description

The self-hosted Facilitator instructions silently change the repository from https://github.com/BofAI/x402-demo.git to https://github.com/BofAI/x402-facilitator.git, the configuration format from a .env file to a YAML config file, and the startup command from ./start.sh facilitator to python src/main.py. Users who bookmarked the old guide or cloned the old repository will find the instructions entirely incompatible with their setup. There is no migration note, no explanation of why the repo changed, and no link to a changelog.

Code

# Old (removed):
git clone https://github.com/BofAI/x402-demo.git
cd x402-demo
# ...
./start.sh facilitator

# New:
git clone https://github.com/BofAI/x402-facilitator.git
cd x402-facilitator
# ...
python src/main.py

Recommendation

Add a callout at the top of the self-hosted section explaining the repo change:

:::info Facilitator repository change
As of this release, the self-hosted Facilitator has moved to its own dedicated repository:
`https://github.com/BofAI/x402-facilitator`. The old demo repo (`x402-demo`) is no longer
the canonical source for the Facilitator service. If you previously cloned `x402-demo`, please
re-clone from the new repository and follow the updated configuration steps below.
:::

Minor

[MN-01] Broken Anchor Link: #agent-wallet-reset-reset-all-data May Not Resolve

Property Value
Severity Minor
Category Documentation
File docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md : Line approx 80; docs/McpServer-Skills/MCP/SUNMCPServer/FAQ.md : Line approx 134

Description

Both files reference:

[CLI Reference → Reset](../../../Agent-Wallet/Developer/CLI-Reference.md#agent-wallet-reset-reset-all-data)

The heading in CLI-Reference.md is ### \agent-wallet reset` (Reset All Data). Docusaurus generates anchors by stripping backticks and converting spaces/special characters to hyphens. The resulting anchor is typically agent-wallet-reset-reset-all-data`, which should match. However, if the heading text has changed (other commits in this PR rename headings), the anchor silently becomes a dead link. These should be verified.

Recommendation

Manually verify that navigating to CLI-Reference.md#agent-wallet-reset-reset-all-data resolves to the correct section after build. Consider adding an explicit {#agent-wallet-reset} anchor id to the heading for stability.


[MN-02] agent-wallet Skill "High Risk" Rating Unexplained in Security Assessment Table

Property Value
Severity Minor
Category Documentation
File docs/McpServer-Skills/SKILLS/QuickStart.md, docs/Openclaw-extension/QuickStart.md

Description

Both files now display the updated security risk assessment table showing:

│  agent-wallet   Med Risk    1 alert    High Risk

The existing x402-payment row shows Safe / Med Risk and gets no additional explanation. The new agent-wallet row shows a High Risk (Snyk) rating, which is significantly more alarming. No explanation is provided about what the Snyk finding relates to, whether it is a false positive, a transitive dependency issue, or an accepted risk. Users who notice "High Risk" in the installation UI may abandon the installation or feel misled if they later read this documentation.

Recommendation

Add a brief note after the table explaining what the agent-wallet Snyk alert is:

:::info About the agent-wallet Snyk rating
The "High Risk" Snyk rating for agent-wallet is triggered by a transitive dependency
used only in development (e.g., a test runner or bundler). It does not affect the runtime
package. The BANK OF AI team has reviewed this finding and determined it poses no risk to
production use. See [issue #XXX](link) for details.
:::

If the actual cause is unknown or unreviewed, this needs investigation before publishing.


[MN-03] Inconsistent Python Version Requirement: quickstart-for-sellers.md Section 3.1 Still Says Python 3.10+

Property Value
Severity Minor
Category Correctness
File docs/x402/getting-started/quickstart-for-sellers.md : Section 3.1 Prerequisites

Description

Section 3.1 of the self-hosted Facilitator path begins with:

- **Python 3.10+** and **Git** (confirmed in the Prerequisites section above)

The top-level Prerequisites in quickstart-for-human.md was bumped to Python 3.11+, and the SUNCli/FAQ.md says "Node.js 20.0.0 or later." However quickstart-for-sellers.md section 3.1 still mentions 3.10+. If the Facilitator service itself requires 3.11+, this is a silent breakage; if 3.10 is genuinely supported for the Facilitator, then quickstart-for-human.md should clarify the context.

Recommendation

Align to a single Python minimum version throughout. If the Facilitator requires 3.11+, update the sellers guide to match. If 3.10 is valid for the Facilitator specifically, add a note clarifying the different requirements.


[MN-04] USDD Base Fee Value Missing Explanatory Comment in YAML Example

Property Value
Severity Minor
Category Documentation
File docs/x402/getting-started/quickstart-for-sellers.md : YAML config snippet

Description

The YAML config for the self-hosted TRON Facilitator shows:

base_fee:
  USDT: 100                # 0.0001 USDT per settlement (adjust as needed)
  USDD: 100000000000000

The USDT line has a helpful comment explaining the human-readable amount. The USDD line has no comment. Since USDD has 18 decimals on TRON (vs. 6 for USDT), 100000000000000 represents 0.0001 USDD, but this is non-obvious and may cause misconfiguration if users assume the values should be the same magnitude.

Recommendation

USDD: 100000000000000        # 0.0001 USDD per settlement (18 decimals — adjust as needed)

[MN-05] SUNCli/CommandGuide.md tx scan Uses --offset Pagination, Inconsistent with All Other Commands

Property Value
Severity Minor
Category Documentation
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Transaction section

Description

Every listing command in CommandGuide.md (token list, pool list, farm list, position list, farm tx, etc.) uses --page <n> for pagination. The tx scan command uses --offset <offset> and --page-size <n> but has no --page parameter. This cursor-based pagination is likely intentional (the underlying API may use offsets), but the inconsistency is not explained and will confuse users who try --page 2 expecting the standard behavior.

Recommendation

Add a brief note in the tx scan description:

> Note: `tx scan` uses offset-based pagination (`--offset`) rather than
> the page-number pagination (`--page`) used by other commands.

[MN-06] SUNCli/CommandGuide.md Built-In Token Symbol WIN Decimal Listed as 6 — Verify Accuracy

Property Value
Severity Minor
Category Correctness
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : Built-In Token Symbols table

Description

The built-in token table lists:

| `WIN` | `TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7` | 6 |

The WIN token on TRON is widely documented as having 6 decimals, so this appears correct. However, it is worth double-checking against the live contract, as a wrong decimal causes incorrect amount calculations in swap commands. Other tokens like SUN, JST, BTT are correctly listed at 18 decimals. This warrants a quick on-chain verification before publishing.

Recommendation

Verify WIN decimals against https://tronscan.org/#/token20/TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7. If confirmed as 6, no change needed. If incorrect, update the table.


Suggestions

[S-01] quickstart-for-agent.md — Clarify GasFree Account Activation Is Required Before First Use

File: docs/x402/getting-started/quickstart-for-agent.md
Description: The GasFree scheme is introduced in the x402 docs, and network-and-token-support.md mentions activation is required (--gasfree-activate). However, quickstart-for-agent.md introduces GasFreeAPIClient without telling agents they need to activate first.
Suggestion: Add a callout near the GasFree integration note: "Before your first GasFree payment, you must activate your GasFree account with --gasfree-activate."


[S-02] TRON MCP Server Docker Option Warns Against -e KEY=value But Should Also Warn Against Committing .env.docker

File: docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Option D Docker section
Description: The warning correctly tells users to use --env-file, but only says "add .env.docker to your .gitignore" in a tip. A stricter instruction would be to explicitly run echo '.env.docker' >> .gitignore as a command in the example.
Suggestion: Add the gitignore command inline with the setup steps:

echo '.env.docker' >> .gitignore

[S-03] Consolidate Repeated TRON Fallback RPC Warning Into a Shared Admonition

File: docs/x402/getting-started/quickstart-for-agent.md, docs/x402/getting-started/quickstart-for-human.md, docs/x402/getting-started/quickstart-for-sellers.md
Description: The identical "Fallback RPC Endpoint" :::note block appears three times verbatim across three files. Any future change to the fallback URL or policy will require updates in all three places.
Suggestion: Consider extracting this into a Docusaurus shared MDX component or a :::note in a reusable include. At minimum, add a comment noting these are duplicates to be kept in sync.


[S-04] SUNCli/FAQ.md — Missing --json Output Format Caveat for AI Agent Integration

File: docs/McpServer-Skills/MCP/SUNCli/FAQ.md : AI Agent Integration section
Description: The FAQ recommends --json for machine-readable responses. However, it doesn't mention that some commands (e.g., wallet address) may still output error messages to stderr in human-readable form even when --json is set. AI agents parsing stdout may be surprised by stderr output mixing into their input stream.
Suggestion: Add a note: "Errors are written to stderr in human-readable form regardless of --output setting. Capture stderr separately or check the exit code before parsing stdout."


[S-05] BANKOFAISkill.mdmultisig Proposal Expiry Hardcoded "24 hours" Should Reference Config

File: docs/McpServer-Skills/SKILLS/BANKOFAISkill.md : multisig section
Description: The new content states "Proposals expire after 24 hours by default." If this is a configurable default, document the configuration parameter. If it's hardcoded in the skill, note that explicitly.
Suggestion: Link to or reference the relevant configuration file or skill setting, or add "(hardcoded, cannot be changed)" if it's not configurable.


Positive Observations

Area Observation
Security — Docker The Docker deployment guide correctly instructs users to use --env-file instead of -e KEY=value flags to avoid leaking secrets into shell history and docker inspect.
Breaking change UX The v1.1.7 migration is announced at the top of both Intro.md and QuickStart.md for TRON MCP Server with a :::warning admonition — users who update packages will immediately see the migration path.
GasFree disclosure The docs proactively disclose that BANK OF AI operates a fallback RPC proxy and explain its SLA limitations, giving users the information they need to decide whether to supply their own API key.
Facilitator rate limits The new rate limiting table for the Facilitator /settle endpoint (1000 req/min authenticated vs 1 req/min anonymous) is clear and actionable, helping sellers plan their API key needs.
Dry-run promotion --dry-run is prominently featured in the SUNCli docs and Security Notes, reducing the risk of users accidentally executing write operations.
Testnet-first guidance Every write-operation example in the new SUNCli docs includes a network flag (--network nile) and an explicit tip recommending testnet validation before mainnet — good practice for financial tooling.
Link anchor fixes Several ../../../Agent-Wallet/FAQ and similar links missing .md extensions were corrected to ../../../Agent-Wallet/FAQ.md, improving cross-reference reliability.
Windows support The Agent Wallet FAQ now explicitly documents Windows support (v2.3.x+) with notes about graceful handling of chmod 600 on Windows — preventing user confusion when running on non-Unix systems.

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 8 6 2 0 Node.js 18/20 mismatch; Python 3.10/3.11 mismatch
Security 5 3 2 0 Missing plaintext key warnings; agent-wallet High Risk unexplained
Performance 0 0 0 8 Not applicable (docs only)
Code Quality 4 3 1 0 Inconsistent pagination pattern in CommandGuide
Testing 0 0 0 6 No test files changed
Documentation 10 7 3 0 Broken anchors; repo change unexplained; USDD comment missing
Compatibility 3 2 1 0 Self-hosted Facilitator breaks existing users without migration note
Observability 1 1 0 0 Logging/startup output examples updated for new Facilitator

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between the specified branches. Runtime behavior, integration testing, and deployment impact are not covered. All findings are based on static analysis of documentation content.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-10

@github-actions
Copy link
Copy Markdown

Code Review Report

Project: BofAI / docs
PR: main -> update-mcp-server
Review Date: 2026-04-10
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main
To Branch update-mcp-server
Commits 28
Files Changed 62
Lines Added +4,272
Lines Removed -747

Commit History

Hash Message
174c30d add setup
d883416 update content
daea552 fix seller example
ffb5377 chang wallet mode
b3fc365 fix agent-wallet
05d402c add sunmcpserver
24bfe40 add inspect
37d478b update x402
408ec4b update x402, skills, agent-wallet, mcp-server
f7f440e adjust content
cc7feb9 add agent-wallet cli-reference
85c1a65 fix gasfree
a080ac3 fix
91f6996 fix
3d44188 update all docs
29ab530 update all docs
0dbacc9 add suncli
64a0c36 fix
53baadb fix
0f53ddb fix
856ed9e Merge branch 'update-mcp-server'
0e3cfdd add suncli
2056ef1 Merge branch 'main' into update-mcp-server
7043fb4 update version
0712c70 add suncli
d69c9eb add cuncli
3335240 add gas free
88c765c add sun-cli

Review Summary

Verdict

Verdict: Request Changes — Several factual errors and structural issues in the documentation must be fixed before merge to avoid user confusion and misconfiguration.

Findings at a Glance

Critical Major Minor Suggestion
Count 0 4 4 3

Summary

This PR is a documentation-only update — no executable code, smart contracts, or server logic changed. It introduces four new SUN CLI documentation pages, expands Agent Wallet docs with Privy wallet support and new CLI commands, migrates all MCP server wallet configuration from the legacy TRON_PRIVATE_KEY/TRON_MNEMONIC environment variables to the AGENT_WALLET_PRIVATE_KEY pattern, adds x402 documentation for the exact_gasfree payment scheme, expands the self-hosted Facilitator guide to use PostgreSQL and a YAML config, and bumps the docs site version from 1.2.7 to 1.2.8. All changes are mirrored in both English (docs/) and Simplified Chinese (i18n/zh-Hans/).

The overall documentation quality is high — security warnings are prominent, testnet-first guidance is consistent, and sensitive-data handling is thoroughly covered. However, four major defects were found: a Node.js minimum version inconsistency that will cause runtime failures for users who follow the FAQ; an HTTP server flag inconsistency that will prevent connections; a large block of duplicated content in SUNMCPServer/LocalPrivatizedDeployment.md; and a wrong expected-output description in the deployment verification step. Four additional minor issues cover faucet URL divergence, a copy-paste comment inaccuracy on USDD decimals, private-key persistence security guidance, and developer-internal CLI paths exposed in public docs.


Change Summary

1. New SUN CLI Documentation (4 new files + zh-Hans mirrors)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md Added Overview of SUN CLI tool and its capabilities
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Added Install-and-first-query walkthrough
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Added Complete command reference (860 lines) covering wallet, price, swap, liquidity, position, farm, contract commands
docs/McpServer-Skills/MCP/SUNCli/FAQ.md Added Troubleshooting guide for common SUN CLI issues

Purpose: Introduces a new CLI product (@bankofai/sun-cli) for direct terminal-based DeFi interaction with SunSwap — distinct from the MCP Server AI-assistant approach.


2. Agent Wallet CLI & SDK Updates

File Change Type Description
docs/Agent-Wallet/Developer/CLI-Reference.md Modified Added privy wallet type docs; new agent-wallet init command; --show-address flag for inspect; --yes flag for remove; new resolve-address command; non-interactive change-password flags
docs/Agent-Wallet/Developer/SDK-Guide.md Modified Updated for new wallet types and Node.js ≥ 20 requirement
docs/Agent-Wallet/Developer/SDK-Cookbook.md Modified Added recipes for Privy wallet configuration
docs/Agent-Wallet/FAQ.md Modified Updated FAQ entries for new error types (PrivyConfigError, PrivyRequestError, etc.)
docs/Agent-Wallet/QuickStart.md Modified Node.js requirement bumped from ≥ 18 to ≥ 20; added Privy wallet option

Purpose: Documents v2.3.x Agent Wallet release which adds Privy-managed server wallets, Windows support, and new administrative CLI commands.


3. TRON MCP Server & SUN MCP Server Wallet Migration

File Change Type Description
docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md Modified Replaced legacy TRON_PRIVATE_KEY/TRON_MNEMONIC env vars with Agent Wallet; added Docker deployment option
docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md Modified Updated wallet troubleshooting for Agent Wallet; removed legacy env var references
docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md Modified Tool count updated 95 → 97; write tools now visible regardless of wallet state
docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md Modified Updated quick-start for Agent Wallet flow
docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md Modified Wallet migration + Docker option added
docs/McpServer-Skills/MCP/SUNMCPServer/FAQ.md Modified Agent Wallet troubleshooting added

Purpose: Removes plaintext private-key environment variable support (as of v1.1.7) and migrates all wallet management to the encrypted Agent Wallet system.


4. x402 Protocol Documentation Expansion

File Change Type Description
docs/x402/getting-started/quickstart-for-sellers.md Modified Full rewrite of self-hosted Facilitator section: PostgreSQL setup, YAML config, x402-facilitator repo; official Facilitator rate limit info
docs/x402/getting-started/quickstart-for-agent.md Modified Updated for exact_gasfree scheme and Agent Wallet private key variable rename
docs/x402/getting-started/quickstart-for-human.md Modified Updated private key env var from legacy to AGENT_WALLET_PRIVATE_KEY
docs/x402/core-concepts/facilitator.md Modified Added rate limiting table; expanded API endpoint reference
docs/x402/core-concepts/network-and-token-support.md Modified Added exact_gasfree scheme documentation and GasFree CLI examples
docs/x402/faq.md Modified Minor clarification updates
docs/x402/index.md Modified Minor navigation update
docs/x402/sdk-features.md Modified Added exact_gasfree to feature list

Purpose: Documents the new exact_gasfree TRON payment scheme, Facilitator rate limiting, and migrates the self-hosted Facilitator from a demo repo to the dedicated x402-facilitator repo with PostgreSQL persistence.


5. Skills & Navigation

File Change Type Description
docs/McpServer-Skills/SKILLS/BANKOFAISkill.md Added Documents the agent-wallet skill (8th official skill)
docs/McpServer-Skills/SKILLS/Intro.md Modified Skill count updated 7 → 8
docs/McpServer-Skills/SKILLS/QuickStart.md Modified Updated installer UI security scan description
docs/Openclaw-extension/QuickStart.md Modified Minor updates
sidebars.js Modified Added SUN CLI category (Intro, QuickStart, CommandGuide, FAQ)
i18n/zh-Hans/.../sidebars.js Modified Mirrors the English sidebar change
package.json Modified Version bumped from 1.2.7 to 1.2.8

Detailed Findings


Major

[MJ-01] Node.js Minimum Version Inconsistency in SUN MCP Server FAQ

Property Value
Severity Major
Category Correctness
File docs/McpServer-Skills/MCP/SUNMCPServer/FAQ.md : Lines 19–21

Description

The entire PR is explicitly about upgrading the Node.js requirement from v18 to v20. All other changed documentation (Agent Wallet QuickStart, TRON MCP Server LocalPrivatizedDeployment.md, SUN MCP Server LocalPrivatizedDeployment.md, SUN CLI QuickStart) correctly states the requirement as >= 20.0.0. However, the SUN MCP Server FAQ still contains a diagnostic check that says "Should return v18+", contradicting the updated requirement. A user following only the FAQ to diagnose a connection problem could run Node.js 18.x and assume their environment is valid — when in fact @bankofai/sun-mcp-server requires v20+. The Chinese mirror (i18n/zh-Hans/.../SUNMCPServer/FAQ.md) has the same error.

Code

1. **Check Node.js Installation**
   ```bash
   node --version  # Should return v18+
   npm --version

**Recommendation**

```markdown
1. **Check Node.js Installation**
   ```bash
   node --version  # Should return v20+
   npm --version

> Also apply the same fix to `i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNMCPServer/FAQ.md`.

---

#### [MJ-02] HTTP Server Flag Inconsistency — `--http` vs `--transport streamable-http`

| Property | Value |
|----------|-------|
| **Severity** | Major |
| **Category** | Correctness |
| **File** | `docs/McpServer-Skills/MCP/SUNMCPServer/FAQ.md` : Lines 57–59 vs `docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md` : Lines 225 |

**Description**

> Two changed documents describe how to start the SUN MCP Server in HTTP mode, but use conflicting command flags. The FAQ uses `--http --port 8080`, while `LocalPrivatizedDeployment.md` uses `--transport streamable-http --host 127.0.0.1 --port 8080 --mcpPath /mcp`. These cannot both be correct — one form will fail at the command line. A user following the FAQ's shorter form will likely get an "Unknown option" error (if `--http` was removed or renamed in the current CLI), or will omit required arguments like `--mcpPath` and get a misconfigured server. This is a user-facing runtime failure point.

**Code**

```bash
# FAQ (docs/McpServer-Skills/MCP/SUNMCPServer/FAQ.md, line 59)
sun-mcp-server --http --port 8080

# LocalPrivatizedDeployment.md (line 225)
sun-mcp-server --transport streamable-http --host 127.0.0.1 --port 8080 --mcpPath /mcp

Recommendation

Verify the current CLI's accepted flags by running sun-mcp-server --help and update both files to use the same authoritative form. If --transport streamable-http is canonical (as used in the deployment guide), update the FAQ to match:

# In docs/McpServer-Skills/MCP/SUNMCPServer/FAQ.md, "Connection Refused in HTTP Mode"
sun-mcp-server --transport streamable-http --host 127.0.0.1 --port 8080 --mcpPath /mcp

Apply the same fix to the Chinese mirror.


[MJ-03] Duplicated Deployment Steps in SUN MCP Server LocalPrivatizedDeployment.md

Property Value
Severity Major
Category Documentation / Code Quality
File docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md : Lines 112–216

Description

The document contains two structurally sequential sections — Step 2: Local Private Deployment (lines 112–162) and Step 3: Server Running Methods (lines 165–216) — whose "Option A: Run directly with npx" and "Option B: Clone from Source" sub-sections are verbatim duplicates of each other (same commands, same description text, same code blocks). A user reading the document linearly would see the same installation instructions twice with different section headers, creating significant confusion about whether there are two separate stages or one. If either copy is ever updated, the other becomes stale. The Chinese mirror has the same duplication.

Code

### Step 2: Local Private Deployment

#### Option A: Run directly with npx (Recommended)
...
npx -y @bankofai/sun-mcp-server
...

#### Option B: Clone from Source
...
git clone https://github.com/BofAI/sun-mcp-server.git
...

### Step 3: Server Running Methods   ← identical content repeated below

### Option A: Run directly with npx (Recommended)
...
npx -y @bankofai/sun-mcp-server    ← exact same block
...

### Option B: Clone from Source     ← exact same block
...
git clone https://github.com/BofAI/sun-mcp-server.git
...

Recommendation

Remove one of the two duplicate sections entirely. The intended structure appears to be:

  • Step 2: Configure Wallet (keep as-is)
  • Step 3: Start the Server (keep one copy of the npx / clone / HTTP options)
  • Step 4: Client Configuration (keep)
  • Step 5: Verify Connection (keep)

[MJ-04] Wrong Expected Output in Deployment Verification Step

Property Value
Severity Major
Category Correctness
File docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md : Lines 262–267

Description

The verification step instructs users to ask "Check the current prices of USDT and TRX on SunSwap" and then tells them to "Expect to receive the current block number." These two things are unrelated. Asking for prices should return price data, not a block number. The block number message appears to be copy-pasted from a different context (possibly from TRON MCP Server's verification step). A user following this guide will ask for prices, receive a price response (correct behavior), but think something is wrong because the expected outcome was "block number". This is a direct documentation accuracy error.

Code

#### Query Test

Try the following command in chat:

Check the current prices of USDT and TRX on SunSwap


Expect to receive the current block number.   ← WRONG

Recommendation

#### Query Test

Try the following command in chat:

Check the current prices of USDT and TRX on SunSwap


Expect to receive the current token prices for USDT and TRX, along with pool information from SunSwap.

Minor

[MN-01] Inconsistent Nile Testnet Faucet URLs

Property Value
Severity Minor
Category Correctness
File docs/x402/getting-started/quickstart-for-sellers.md : Lines 56, 99 vs docs/McpServer-Skills/MCP/SUNMCPServer/FAQ.md : Line 372

Description

Two different URLs are given for the TRON Nile testnet faucet in the same PR. quickstart-for-sellers.md uses https://nileex.io/join/getJoinPage while SUNMCPServer/FAQ.md uses https://nile.trongrid.io/join/getjoined. These are different domain names with different paths, and it is unclear which one is canonical or currently active. If either URL is outdated, users will fail to obtain test tokens needed for onboarding.

Recommendation

Verify which URL is currently active for the Nile faucet. Update all occurrences (including the TRON MCP Server docs and the zh-Hans mirrors) to use a single consistent, verified URL.


[MN-02] Misleading USDD base_fee Comment in Facilitator Config Example

Property Value
Severity Minor
Category Documentation
File docs/x402/getting-started/quickstart-for-sellers.md : Lines 500–502

Description

In the YAML config example for the self-hosted Facilitator (TRON tab), the comment # 0.0001 USDT per settlement is incorrectly placed next to the USDD field. USDD uses 18 decimals on TRON, so the value 100000000000000 (10^14) does equal 0.0001 USDD — but the comment says "USDT", not "USDD". This copy-paste error will confuse operators who try to set a matching fee for both USDT and USDD, as USDT uses only 6 decimals. Setting USDT: 100 (= 0.0001 USDT) and USDD: 100 (= 0.0000000000001 USDD) would result in a near-zero USDD fee that was clearly not intended.

Code

base_fee:
  USDT: 100                # 0.0001 USDT per settlement (adjust as needed)
  USDD: 100000000000000    # ← comment says "0.0001 USDT" but this is USDD

Recommendation

base_fee:
  USDT: 100                # 0.0001 USDT per settlement (6 decimals; adjust as needed)
  USDD: 100000000000000    # 0.0001 USDD per settlement (18 decimals; adjust as needed)

[MN-03] Private Key Persisted to Shell Profile Without Plaintext Storage Warning

Property Value
Severity Minor
Category Security
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Lines 96–107 (same block in SUNMCPServer/LocalPrivatizedDeployment.md : Lines 92–107)

Description

The tip advising users to persist AGENT_WALLET_PRIVATE_KEY in ~/.zshrc or ~/.bashrc does not warn that these files store the private key as plaintext and are commonly included in cloud backup services (iCloud Drive syncing ~/.zshrc on macOS, Dropbox or OneDrive home folder syncs on Linux/Windows). A user who does not know this may inadvertently back up or sync their private key to a third-party cloud service. The docs correctly warn about shell history (via the :::caution Shell history risk admonition elsewhere), but no equivalent warning appears in this :::tip block.

Code

:::tip
To make this persist across terminal sessions, add it to your shell configuration file:

```bash
echo 'export AGENT_WALLET_PRIVATE_KEY=your_private_key' >> ~/.zshrc   # zsh (macOS default)
echo 'export AGENT_WALLET_PRIVATE_KEY=your_private_key' >> ~/.bashrc  # bash (Linux default)

:::


**Recommendation**

```markdown
:::tip
To make this persist across terminal sessions, add it to your shell configuration file:

```bash
echo 'export AGENT_WALLET_PRIVATE_KEY=your_private_key' >> ~/.zshrc   # zsh (macOS default)
echo 'export AGENT_WALLET_PRIVATE_KEY=your_private_key' >> ~/.bashrc  # bash (Linux default)

⚠️ ~/.zshrc and ~/.bashrc store this value as plaintext. If your home directory is synced to a cloud service (e.g., iCloud, Dropbox, OneDrive), the private key will be uploaded. Consider using a secrets manager or encrypted keystore (Agent Wallet's local_secure mode) for wallets holding real funds.
:::


---

#### [MN-04] GasFree Management Commands Reference Developer-Internal Paths

| Property | Value |
|----------|-------|
| **Severity** | Minor |
| **Category** | Documentation |
| **File** | `docs/x402/core-concepts/network-and-token-support.md` : Lines 133–145 |

**Description**

> The GasFree account management examples under the `exact_gasfree` scheme documentation use `npx tsx x402-payment/src/x402_invoke.ts` — a path that refers to a TypeScript source file within the `x402-payment` local directory. This is a developer-local repository path that will not work for end users who have only installed the SDK via `pip`. A user reading this documentation will run the commands and receive a "Cannot find module" or "file not found" error, as the directory `x402-payment/src/` does not exist in their environment. Either a published CLI entrypoint should be used, or the examples should include a prerequisite note to clone the repo first.

**Code**

```bash
# Query GasFree wallet info
npx tsx x402-payment/src/x402_invoke.ts --gasfree-info

# Activate a GasFree account
npx tsx x402-payment/src/x402_invoke.ts --gasfree-activate

Recommendation

Either:

  1. Replace with a published CLI command (e.g., x402-payment --gasfree-info or python -m bankofai.x402.gasfree --info) if one exists, or
  2. Add a prerequisite block before the examples:
# First, clone the x402 repository and navigate to the skill directory:
git clone https://github.com/BofAI/x402.git
cd x402/x402-payment
npm install

# Then run:
npx tsx src/x402_invoke.ts --gasfree-info

Suggestions

[S-01] Missing Step-by-Step Migration Guide for Legacy TRON_PRIVATE_KEY Users

File: docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md, TRONMCPServer/LocalPrivatizedDeployment.md

Description: The PR removes support for TRON_PRIVATE_KEY and TRON_MNEMONIC and replaces them with Agent Wallet. There are :::caution admonitions noting the removal, but no step-by-step migration guide for existing users who have the legacy variables configured. Users with production deployments may face sudden auth failures after upgrading and will not know how to recover.

Suggestion: Add a dedicated migration section (or link to one) that walks users through: (1) exporting the existing private key from the old env var, (2) running agent-wallet start to create an encrypted keystore, (3) unsetting the legacy variables, and (4) restarting the server.


[S-02] agent-wallet resolve-address Output Format Not Documented for Private-Key Wallets

File: docs/Agent-Wallet/Developer/CLI-Reference.md : Lines 167–189

Description: The resolve-address command documentation includes a sample output for a mnemonic-derived wallet (showing both EVM and TRON addresses). However, the text says "For private-key-based wallets, it shows the single address for the configured network" without providing a sample output. An example output for both wallet types would make the documentation complete.

Suggestion: Add a second output example for a raw_secret or imported private-key wallet showing only a single address entry.


[S-03] No .gitignore Reminder for config/facilitator.config.yaml

File: docs/x402/getting-started/quickstart-for-sellers.md : Lines 482–519

Description: The self-hosted Facilitator setup instructs users to copy facilitator.config.example.yaml to facilitator.config.yaml and fill in the database connection string, which may include the database password. The guide warns about protecting the private key env var but does not remind users to add config/facilitator.config.yaml to .gitignore to prevent accidentally committing the database credentials.

Suggestion: Add a reminder after the config copy step:

echo "config/facilitator.config.yaml" >> .gitignore

Positive Observations

Area Observation
Security warnings :::danger admonitions are consistently and prominently used for raw_secret key warnings, shell history risks for -p flag usage, and Docker --env-file best practices.
Testnet-first guidance Every write-operation example includes a reminder to test on Nile first before using mainnet, reducing the risk of accidental fund loss.
Legacy deprecation communication The removal of TRON_PRIVATE_KEY/TRON_MNEMONIC is clearly communicated with :::caution Legacy wallet options removed blocks in all affected files.
Comprehensive CLI reference The new SUN CLI CommandGuide.md covers all command categories exhaustively with flag tables, defaults, and examples — setting a high documentation standard.
CI/CD example The GitHub Actions example in CLI-Reference.md correctly uses repository secrets rather than hardcoded passwords — a good security practice.
Docker security The Docker deployment section correctly warns against -e KEY=value on the command line and prescribes --env-file with a .gitignore entry.
Trust model clarity The x402 facilitator.md trust model section clearly explains what even a malicious Facilitator cannot do, which is valuable for user trust.
Bilingual parity All English content changes are consistently mirrored to i18n/zh-Hans/, ensuring non-English users are not left with outdated documentation.

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 8 5 3 0 Node.js version (MJ-01), HTTP flag (MJ-02), wrong expected output (MJ-04)
Security 5 4 1 0 Plaintext ~/.zshrc storage not warned (MN-03)
Performance 3 3 0 0 N/A for documentation
Code Quality 6 5 1 0 Duplicated deployment steps (MJ-03)
Testing 4 3 0 1 No executable code changed
Documentation 7 5 2 0 USDD comment (MN-02), GasFree paths (MN-04)
Compatibility 3 2 0 1 Legacy migration noted
Observability 2 2 0 0

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between the specified branches. Runtime behavior, integration testing, and deployment impact are not covered. This PR is documentation-only — all findings relate to accuracy, consistency, and usability of the documentation content.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-10

@github-actions
Copy link
Copy Markdown

Code Review Report

Project: BofAI Docs (@x402-tron/docs)
PR: mainupdate-mcp-server
Review Date: 2026-04-10
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch origin/main
To Branch origin/update-mcp-server
Commits 29
Files Changed 62
Lines Added +4,274
Lines Removed -747

Commit History

Hash Message
2d193a0 fix
174c30d add setup
d883416 update content
daea552 fix seller example
ffb5377 chang wallet mode
b3fc365 fix agent-wallet
05d402c add sunmcpserver
24bfe40 add inspect
37d478b update x402
408ec4b update x402,skills,agent-wallet,mcp-server
f7f440e adjust content
cc7feb9 add agent-wallet cli-reference
85c1a65 fix gasfree
... (17 earlier commits — initial SUN CLI addition, agent-wallet migration, x402 updates)

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 2 6 3

Summary

This PR is a documentation-only release that introduces four major functional additions: (1) a completely new SUN CLI section (4 new files, ~1,720 lines), (2) TRON and SUN MCP Server v1.1.7 migration from legacy TRON_PRIVATE_KEY/TRON_MNEMONIC environment variables to the Agent Wallet system exclusively, (3) a new exact_gasfree zero-gas payment scheme for x402, and (4) a new agent-wallet skill in the BANK OF AI Skills ecosystem. The changes also update Node.js requirements (18 → 20), add Privy wallet support, Docker deployment options, and a self-hosted Facilitator setup overhaul.

The overall content quality is high — the SUN CLI reference is comprehensive, the MCP migration path is clearly motivated, and the security cautions on --private-key flags are appropriate. However, two major issues need resolution before merge. First, the new "Import an Existing Private Key" setup path guides users to write their plaintext private key into shell profile files (~/.zshrc, ~/.bashrc) without an adequate security warning — this is a regression from the old documentation, which explicitly labeled such approaches as "Low security." Second, the breaking change from TRON_PRIVATE_KEY/TRON_MNEMONIC is prominently flagged in the TRON MCP Server files but is absent or minimal in the SUN MCP Server files, creating an inconsistent user experience for operators who use both servers. Several minor issues (version inconsistency, a verification step that echoes private keys, and an undocumented tool count increase) should also be corrected.


Change Summary

1. New SUN CLI Documentation (4 new files)

File Change Type Description
docs/McpServer-Skills/MCP/SUNCli/Intro.md Added SUN CLI overview, comparison with SUN MCP Server, security notes
docs/McpServer-Skills/MCP/SUNCli/QuickStart.md Added Install-and-run guide, wallet configuration, testnet swap walkthrough
docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md Added Full command reference (~860 lines) across all categories
docs/McpServer-Skills/MCP/SUNCli/FAQ.md Added Troubleshooting guide for common errors and AI agent integration
sidebars.js + i18n/current/sidebars.js Modified Adds "SUN CLI" sidebar category with all 4 pages

Purpose: Introduce the @bankofai/sun-cli CLI tool for SunSwap DeFi operations, covering both human and AI agent use cases.


2. TRON MCP Server v1.1.7 Breaking-Change Migration

File Change Type Description
docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md Modified Upgrade banner + tool count 95 → 97
docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md Modified Upgrade banner added
docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md Modified Replaces 3 wallet options with Agent Wallet only; adds Docker (Option D)
docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md Modified Rewrites authentication errors; adds v1.1.7 changelog
docs/McpServer-Skills/MCP/TRONMCPServer/ToolList.md Modified Write-tool visibility behavior change; count 95 → 97; fixes .md links
docs/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md Modified Minor: tool count 95 → 97
docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md Modified Tool count 95 → 97

Purpose: Document that TRON_PRIVATE_KEY and TRON_MNEMONIC are no longer supported; only Agent Wallet is accepted for write operations. Write tools are now always visible in the tool list.


3. SUN MCP Server: Same Agent Wallet Migration

File Change Type Description
docs/McpServer-Skills/MCP/SUNMCPServer/FAQ.md Modified Removes TRON_PRIVATE_KEY/TRON_MNEMONIC options; simplifies wallet error resolution
docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md Modified Three wallet options → Agent Wallet only; same Option A/B split as TRON MCP

Purpose: Mirror TRON MCP Server's wallet migration in the SUN MCP Server docs.


4. Agent Wallet Enhancements

File Change Type Description
docs/Agent-Wallet/Developer/CLI-Reference.md Modified Privy wallet tip; init command; resolve-address command; inspect --show-address; change-password non-interactive mode
docs/Agent-Wallet/Developer/SDK-Guide.md Modified Node.js requirement 18 → 20; Privy error types added
docs/Agent-Wallet/Developer/SDK-Cookbook.md Modified Additional examples table
docs/Agent-Wallet/FAQ.md Modified Privy wallet type added to comparison table; Windows support added; Node.js 18 → 20
docs/Agent-Wallet/QuickStart.md Modified Node.js 18 → 20

Purpose: Document Privy wallet support, new CLI subcommands, Node.js 20 requirement, and Windows support.


5. x402 Payment Updates

File Change Type Description
docs/x402/core-concepts/network-and-token-support.md Modified exact_gasfree scheme added; BSC config format note
docs/x402/core-concepts/facilitator.md Modified Rate limiting table; seller-scoped payment queries
docs/x402/getting-started/quickstart-for-agent.md Modified Unified AGENT_WALLET_PRIVATE_KEY (replaces TRON_PRIVATE_KEY/BSC_PRIVATE_KEY); GasFree integration; simplified install
docs/x402/getting-started/quickstart-for-human.md Modified Same private key unification; GasFree code examples; FastAPI Request import fix
docs/x402/getting-started/quickstart-for-sellers.md Modified FastAPI Request import fix; self-hosted Facilitator setup overhauled (new repo, PostgreSQL setup)
docs/x402/faq.md Modified exact_gasfree scheme added
docs/x402/sdk-features.md Modified exact_gasfree/tron, USDD TRC-20, and GasFree SDK features added
docs/x402/index.md Modified Minor bold formatting

6. Skills Ecosystem Updates

File Change Type Description
docs/McpServer-Skills/SKILLS/BANKOFAISkill.md Modified agent-wallet skill entry added; multisig and trc20 skill details expanded
docs/McpServer-Skills/SKILLS/Intro.md Modified 7 → 8 skills; new "Secure Wallet Management" section
docs/McpServer-Skills/SKILLS/QuickStart.md Modified 7 → 8 skills; security assessment updated
docs/Openclaw-extension/QuickStart.md Modified Updated installer flow; agent-wallet added; mcp-server-tron now auto-configures

7. Configuration Files

File Change Type Description
package.json Modified Version bump 1.2.7 → 1.2.8
sidebars.js Modified SUN CLI category added

Detailed Findings


Major

[MJ-01] Plaintext Private Key Persisted to Shell Profile Presented Without Adequate Security Warning

Property Value
Severity Major
Category Security / Documentation
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Lines ~80–100; docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md : similar; docs/x402/getting-started/quickstart-for-agent.md : Lines ~70–80; docs/x402/getting-started/quickstart-for-human.md : Lines ~200–215

Description

The new "Option B / Path 2: Import an Existing Private Key" and x402 Step 1 sections across multiple files instruct users to persist their plaintext private key directly into their shell profile file (~/.zshrc or ~/.bashrc):

echo 'export AGENT_WALLET_PRIVATE_KEY=your_private_key' >> ~/.zshrc   # zsh (macOS default)
echo 'export AGENT_WALLET_PRIVATE_KEY=your_private_key' >> ~/.bashrc  # bash (Linux default)
source ~/.zshrc

In the old documentation, the equivalent approach (TRON_PRIVATE_KEY) carried an explicit :::warning admonition: "Using a plaintext private key in environment variables carries a real risk of fund theft — environment variables can be leaked via shell history, process listings (ps aux), or log files." That warning has been removed in the new version.

Writing the private key into .zshrc/.bashrc:

  • Stores the key as plaintext in a file that is often included in iCloud Drive, Dropbox, dotfile repos (chezmoi, dotfiles), backup tools, or OS backups
  • Makes the key visible in ps aux output to any process running as the same user
  • Appears in any tool that reads environment variables (e.g., crash reporters, monitoring agents)

The removal of the security warning is a documentation regression, especially since the PR's headline security benefit is migrating away from plaintext key exposure.

Code

# TRONMCPServer/LocalPrivatizedDeployment.md (Path 2) and x402 quickstarts:
echo 'export AGENT_WALLET_PRIVATE_KEY=your_private_key' >> ~/.zshrc   # zsh (macOS default)
echo 'export AGENT_WALLET_PRIVATE_KEY=your_private_key' >> ~/.bashrc  # bash (Linux default)
source ~/.zshrc   # or source ~/.bashrc — takes effect immediately without restarting the terminal

Recommendation

Restore a :::warning or :::caution admonition adjacent to the shell-profile instructions, making the risk explicit. Also consider recommending the .env file + .gitignore pattern (which was previously documented and is safer for interactive development). For example:

:::caution Security risk: plaintext key in shell profile
Writing your private key to `~/.zshrc` stores it as plaintext on disk and in
any backup, dotfile repo, or sync tool that touches your home directory. It
is also visible via `ps aux` and environment inspection tools. This method
is **lower security** than using Agent Wallet's encrypted keystore (Option A
/ Path 1). If you use this path:
- Never commit your shell profile to a public repository
- Keep the wallet funded with only the minimum tokens required for your task
- For production workloads, use the encrypted wallet approach instead
:::

[MJ-02] Breaking Change Migration Warning is Inconsistent Across Affected Servers

Property Value
Severity Major
Category Documentation / Compatibility
File docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md and docs/McpServer-Skills/MCP/SUNMCPServer/FAQ.md

Description

The removal of TRON_PRIVATE_KEY and TRON_MNEMONIC support is a breaking change for existing users — any operator with these variables set will silently lose write capability after upgrading. The TRON MCP Server documentation handles this well: both TRONMCPServer/Intro.md and TRONMCPServer/QuickStart.md have a prominent :::warning banner at the top of the page referencing v1.1.7 and linking to the migration guide.

However, the SUN MCP Server documentation has no equivalent top-level upgrade banner. The only mention is a :::caution block buried mid-page in LocalPrivatizedDeployment.md and a similar note in FAQ.md. A user upgrading the SUN MCP Server without reading both those sections would encounter broken write operations with no clear path forward.

Code

# TRONMCPServer/Intro.md — good, prominent warning:
+:::warning Upgrading from v1.1.6 or earlier?
+As of **v1.1.7**, the `TRON_PRIVATE_KEY` and `TRON_MNEMONIC` environment variables
+are no longer supported...
+:::

# SUNMCPServer/LocalPrivatizedDeployment.md — only a buried caution block:
+:::caution Legacy wallet options removed
+The legacy `TRON_PRIVATE_KEY` and `TRON_MNEMONIC` environment variables are no
+longer supported. All wallet management is now handled through Agent Wallet...
+:::

Recommendation

Add the same :::warning Upgrading from [version]? banner to the top of both SUNMCPServer/Intro.md (which is the natural entry point) and SUNMCPServer/QuickStart.md (if it exists), mirroring the pattern used in the TRON MCP Server docs. This ensures operators hitting any of the three common entry points for either server see the migration notice immediately.


Minor

[MN-01] echo $AGENT_WALLET_PRIVATE_KEY Verification Step Prints Private Key to Terminal

Property Value
Severity Minor
Category Security
File docs/x402/getting-started/quickstart-for-agent.md : ~line 100; docs/x402/getting-started/quickstart-for-human.md : ~line 215; docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : ~line 100; docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md : ~line 100

Description

Multiple guides use the following as a "success check":

echo $AGENT_WALLET_PRIVATE_KEY

Printing a private key to the terminal is problematic because:

  • Terminal output is captured in CI/CD logs (GitHub Actions, Jenkins, etc.)
  • Shell history records the command and output in some terminals
  • Screen sharing or screenshots during onboarding will expose the key
  • Some terminal multiplexers (tmux, screen) log session buffers

Recommendation

Replace with a non-revealing check that confirms the variable is set but does not print the value:

# Verify the variable is set (without printing the value)
[[ -n "$AGENT_WALLET_PRIVATE_KEY" ]] && echo "✅ AGENT_WALLET_PRIVATE_KEY is set" || echo "❌ Not set"

This pattern is already used in the TRON MCP Server FAQ ([[ -n "$AGENT_WALLET_PASSWORD" ]] && echo "Password is set"), so it's consistent with existing documentation.


[MN-02] Python Version Inconsistency (3.10+ vs 3.11+)

Property Value
Severity Minor
Category Documentation / Correctness
File docs/x402/getting-started/quickstart-for-human.md : line 27; docs/x402/getting-started/quickstart-for-sellers.md (unchanged)

Description

quickstart-for-human.md was updated to require Python 3.11+, but quickstart-for-sellers.md still references Python 3.10+ in its prerequisites section, and the new self-hosted Facilitator section (added in this PR) also mentions Python 3.10+:

# quickstart-for-human.md (changed):
-  [ ] **Python 3.10+** or **Node.js 18+** installed
+  [ ] **Python 3.11+** or **Node.js 18+** installed

# quickstart-for-sellers.md (self-hosted section, added in this PR — unchanged at 3.10+):
Before starting, make sure you have:
- **Python 3.10+** and **Git**

A user who runs the seller's self-hosted Facilitator on Python 3.10 but tries to follow the client quickstart may encounter confusing errors, or the reverse.

Recommendation

Align all x402 Python references to the same version. Determine the actual minimum required version, then update quickstart-for-sellers.md (and the new self-hosted facilitator section) to match quickstart-for-human.md.


[MN-03] TRON MCP Server Tool Count Increased (95 → 97) Without New Tools Listed

Property Value
Severity Minor
Category Documentation / Correctness
File docs/McpServer-Skills/MCP/TRONMCPServer/ToolList.md

Description

TRONMCPServer/Intro.md, ToolList.md, OfficialServerAccess.md, and QuickStart.md all update the tool count from 95 to 97. However, the actual tool table in ToolList.md was not updated with 2 new tool entries — the diff only shows the header being changed and two link fixes (.md extension added). A user who reads "97 tools" and then counts the table will find a mismatch.

Code

# ToolList.md header changed:
-TRON MCP Server provides **95 tools**...
+TRON MCP Server provides **97 tools**...

# But no new tool rows were added to the table below.

Recommendation

Either add the 2 new tool entries to the tool table with their descriptions and parameters, or revert the count to 95 until the actual entries are documented. If the 2 new tools are list_wallets and select_wallet (which already existed), verify the accurate count before publishing.


[MN-04] agent-wallet Skill Shows "High Risk" (Snyk) Without Explanation

Property Value
Severity Minor
Category Documentation / Security
File docs/McpServer-Skills/SKILLS/QuickStart.md : ~line 100; docs/Openclaw-extension/QuickStart.md : ~line 320

Description

Both the Skills QuickStart and Openclaw QuickStart now display a security risk assessment table where the new agent-wallet skill is rated High Risk by Snyk:

│  agent-wallet    Med Risk    1 alert    High Risk │

All other skills are rated at most "Med Risk." The documentation does not explain what "High Risk" means, why it applies to agent-wallet, or what users should know before accepting this risk. Users who do not understand the security scanning context may either blindly proceed or be unnecessarily alarmed without guidance.

Recommendation

Add a brief contextual note near the security table explaining the risk rating. For example:

:::info Understanding the security assessment
The `agent-wallet` skill is rated "High Risk" by Snyk due to its use of
cryptographic and key management libraries (a common flag for security-sensitive
packages). This does not indicate a known vulnerability — it reflects that the
package handles private key material. Review the [agent-wallet source](https://github.com/BofAI/agent-wallet)
if you require independent verification.
:::

[MN-05] TRX Token Address in Built-In Token Symbol List May Be Incorrect

Property Value
Severity Minor
Category Documentation / Correctness
File docs/McpServer-Skills/MCP/SUNCli/CommandGuide.md : ~line 1150

Description

The built-in token symbol table lists TRX as having address T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb:

| `TRX` | `T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb` | 6 |

TRX is the native coin of TRON — it does not have a TRC-20 contract address. This address (T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb) is typically associated with a system or wrapped contract for TRX representation in DEX contexts. This discrepancy could confuse users who verify the address against TRON explorers (where TRX won't appear as a standard TRC-20 contract).

Recommendation

Add a footnote or explanation clarifying that TRX's address entry is the DEX-internal representation used by SunSwap (e.g., the energy/bandwidth sentinel address), not a TRC-20 contract. The existing note about WTRX (TNUC9Qb1rRpS5CbWLmNMxXBjyFoydXjWFR) helps, but users may not understand the relationship between TRX and WTRX in V3/V4 pools.


[MN-06] Non-Interactive change-password Example Exposes Passwords to Shell History Without Platform-Specific Guidance

Property Value
Severity Minor
Category Security / Documentation
File docs/Agent-Wallet/Developer/CLI-Reference.md : ~line 130

Description

The new non-interactive change-password example is:

agent-wallet change-password -p 'OldPassword123!' --new-password 'NewPassword456!'

The :::caution block correctly warns that "Both -p and --new-password will be recorded in shell history." However, it does not address:

  • macOS/Linux: HISTCONTROL=ignorespace prefix (leading space suppresses history)
  • Shell-history-exclusion patterns (HISTIGNORE)
  • Piping from a password manager (e.g., pass, 1password)

Recommendation

Augment the caution to include the most practical workaround:

:::caution
Both `-p` and `--new-password` will appear in shell history. For non-interactive use
**without** exposing passwords in history, prefix the command with a space (suppresses
history entry in bash/zsh with `HISTCONTROL=ignorespace`), or pipe from a secrets
manager. For production use, interactive mode is always preferred.
:::

Suggestions

[S-01] No .env File Pattern Documented for x402 Private Key Setup

File: docs/x402/getting-started/quickstart-for-agent.md, docs/x402/getting-started/quickstart-for-human.md
Description: The previous documentation recommended creating a .env file and adding it to .gitignore as a project-scoped alternative to exporting to the global shell profile. This pattern (scoped, revocable, repo-specific) is safer than a global shell export for development use and is standard in Node.js and Python projects. The new documentation only covers the global export approach and the encrypted wallet approach, leaving a gap for developers working within a project context.
Suggestion: Restore the .env/.gitignore pattern as a named option (e.g., alongside the shell profile export), with a note that the .env file must be in .gitignore.


[S-02] Self-Hosted Facilitator Setup Is Significantly Expanded — Consider Standalone Guide

File: docs/x402/getting-started/quickstart-for-sellers.md
Description: The self-hosted Facilitator section has grown substantially (from ~20 lines to ~220 lines), covering PostgreSQL installation across 4 OS variants, database configuration, password authentication setup, and a new git repository (x402-facilitator). This is now significantly heavier than the rest of the "Quick Start for Sellers" page and may overwhelm users who only want the hosted path.
Suggestion: Consider extracting the self-hosted Facilitator setup into a dedicated page (e.g., quickstart-for-selfhosted-facilitator.md) and replacing the current inline content with a brief summary and a link. This keeps the seller quickstart focused on the most common path.


[S-03] i18n/current/ Files Are Not Verified Against docs/ Changes

File: All i18n/current/** files (30 files changed)
Description: Every changed doc in docs/ has a corresponding change in i18n/current/. The files appear to be near-identical copies. There is no automated check in this PR that the i18n copies are in sync with the source. For example, if a security fix is applied to docs/x402/getting-started/quickstart-for-agent.md post-merge but the i18n copy is forgotten, users viewing the versioned docs would see outdated guidance.
Suggestion: Document or implement a CI step (e.g., a diff check or sync script) to ensure i18n/current/ files stay in sync with docs/. Alternatively, document that i18n/current/ is auto-generated and explain how/when it is updated.


Positive Observations

Area Observation
Breaking change notices TRON MCP Server Intro.md and QuickStart.md both have prominent top-of-page :::warning banners for v1.1.7 migration — well-placed and actionable.
Security improvement: removed insecure env vars Eliminating TRON_PRIVATE_KEY and TRON_MNEMONIC as first-class wallet options is a genuine security improvement. The encrypted Agent Wallet approach is better.
Docker --env-file pattern The new Docker deployment section explicitly warns against -e KEY=value and mandates --env-file, with a note to add the file to .gitignore. This is a best-practice pattern correctly documented.
SUN CLI global flag security caution CommandGuide.md includes a :::caution Private Key Security block warning about -k/--private-key appearing in shell history and process listings, recommending env vars or agent-wallet instead.
FastAPI Request import fix Both TRON and BSC Python server examples in quickstart-for-sellers.md correctly add from fastapi import FastAPI, Request — this fixes a real runtime error in the existing sample code.
Dry-run and testnet-first culture Multiple new pages (SUN CLI Intro, FAQ, QuickStart) consistently emphasize testnet-first and --dry-run for write operations.
exact_gasfree scheme documentation The zero-gas payment scheme is well-explained with key characteristics, activation steps, and correct notes about GasFree API routing through the BANK OF AI proxy.
Non-interactive mode for change-password Adding the non-interactive flags and the associated caution block is a useful addition for CI pipelines.
agent-wallet skill caution block The skill overview correctly flags that remove, reset, and change-password are agent-restricted (terminal-only), preventing accidental key deletion by the AI.
Tool mode labels (read/write) in SUN CLI Every SUN CLI command entry consistently labels operations as (read) or (write) — greatly improves scannability for security-conscious users.

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 5 3 2 Python version inconsistency; tool count mismatch
Security 6 4 2 Plaintext key in shell profile; echo of private key
Performance 3 3 Not applicable (docs-only PR)
Code Quality 5 4 1 Shell history exposure underdocumented
Testing 2 2 Not applicable (docs-only PR)
Documentation 6 4 2 Inconsistent migration banners; missing risk rating explanation
Compatibility 3 2 1 Breaking change banners missing in SUN MCP Server entry points
Observability 2 2 Not applicable (docs-only PR)

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between the specified branches. Runtime behavior, integration testing, and deployment impact are not covered. This PR contains exclusively documentation (.md) and configuration (package.json, sidebars.js) changes — no executable code was introduced.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-10

@github-actions
Copy link
Copy Markdown

Code Review Report

Project: x402-tron/docs
PR: main -> update-mcp-server
Review Date: 2026-04-10
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main
To Branch update-mcp-server
Commits 28
Files Changed 62
Lines Added +4,248
Lines Removed -753

Commit History (recent)

Hash Message
a82086c add sun-cli
2d193a0 fix
174c30d add setup
d883416 update content
daea552 fix seller example
ffb5377 chang wallet mode
b3fc365 fix agent-wallet
05d402c add sunmcpserver
24bfe40 add inspect
37d478b update x402
408ec4b update x402, skills, agent-wallet, mcp-server
f7f440e adjust content
cc7feb9 add agent-wallet cli-reference
85c1a65 fix gasfree
3d44188 update all docs
0e3cfdd add suncli

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 3 5 4

Summary

This PR is a large, documentation-only release that introduces a new SUN CLI tool section (4 new files, ~1,267 lines), migrates all wallet configuration guidance from legacy plaintext modes (TRON_PRIVATE_KEY, TRON_MNEMONIC) to Agent Wallet as the sole supported mechanism, documents a new exact_gasfree payment scheme for TRON, adds a new agent-wallet skill (bringing the total from 7 to 8), and refreshes Agent Wallet docs with new commands (init, resolve-address), a new Privy wallet type, and a Node.js version bump from 18 to 20.

The documentation is comprehensive, well-structured, and shows strong security intent in consolidating around encrypted Agent Wallet storage over plaintext private keys. However, three Major issues warrant changes before merge: a regression in security guidance where the plaintext private key warning was silently dropped from the key import path, an invocation path in the GasFree examples that will not work for skill-installed users, and a minor inconsistency where some docs still reference Node.js 18+ after the project-wide bump to 20. The parallel i18n/current/ directory mirrors all changes correctly.


Change Summary

1. New SUN CLI Documentation (4 new files)

File Change Type Description
docs/McpServer-Skills/Tools/SUNCli/Intro.md Added Overview, capability table, comparison with SUN MCP Server, output modes, supported networks, security notes
docs/McpServer-Skills/Tools/SUNCli/QuickStart.md Added Install, first query, wallet configuration, testnet swap
docs/McpServer-Skills/Tools/SUNCli/CommandGuide.md Added Full command reference: wallet, price, token, swap, pool, liquidity (V2/V3/V4), position, pair, farm, protocol, tx, contract
docs/McpServer-Skills/Tools/SUNCli/FAQ.md Added Troubleshooting for setup, wallet, common errors, AI agent integration, networks

Purpose: Introduce @bankofai/sun-cli as a documented tool under the McpServer-Skills/Tools section.


2. MCP Server Wallet Mode Consolidation

File Change Type Description
docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md Modified Removed Options 2 (Private Key) and 3 (Mnemonic); replaced with Agent Wallet install + Path 1 (new wallet) / Path 2 (import key); added Option D (Docker)
docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md Modified Updated FAQ for v1.1.7: removed TRON_PRIVATE_KEY/TRON_MNEMONIC, added migration caution block, added v1.1.7 changelog entry
docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md Modified Tool count 95→97, table row renamed "Private Key Required" → "Wallet Required"
docs/McpServer-Skills/MCP/TRONMCPServer/ToolList.md Modified Count 95→97, write tool visibility behavior changed (always visible, checked at runtime)
docs/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md Modified Count reference 95→97
docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md Modified Count reference 95→97
docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md Modified Same wallet consolidation pattern as TRON
docs/McpServer-Skills/MCP/SUNMCPServer/FAQ.md Modified Removed conflicting wallet mode section, replaced with Agent Wallet-only guidance

Purpose: Enforce Agent Wallet as the sole supported wallet mechanism as of v1.1.7, removing the legacy plaintext private key and mnemonic options.


3. Agent Wallet Documentation Updates

File Change Type Description
docs/Agent-Wallet/Developer/CLI-Reference.md Modified Added agent-wallet init command, agent-wallet resolve-address command, --show-address flag for inspect, non-interactive change-password, sign command output examples, Privy wallet tip
docs/Agent-Wallet/Developer/SDK-Guide.md Modified Node.js requirement updated 18→20, Privy error types added to error hierarchy
docs/Agent-Wallet/Developer/SDK-Cookbook.md Modified Added "More Examples" table with 7 additional repository examples
docs/Agent-Wallet/FAQ.md Modified Added privy wallet type to comparison table, Windows support added, Node.js 18→20
docs/Agent-Wallet/QuickStart.md Modified Node.js 18→20 throughout

Purpose: Document new Agent Wallet features: Privy custody wallet type, init command, resolve-address, non-interactive change-password, and Windows support.


4. x402 Documentation Updates

File Change Type Description
docs/x402/core-concepts/network-and-token-support.md Modified Added exact_gasfree payment scheme with GasFree CLI examples; BSC network identifier clarification
docs/x402/core-concepts/facilitator.md Modified Added rate limiting section (1000 req/min authenticated, 1 req/min anonymous), payment record scoping docs
docs/x402/faq.md Modified Updated payment schemes to include exact_gasfree
docs/x402/sdk-features.md Modified Added exact_gasfree/tron, SufficientBalancePolicy, GasFree, USDD TRC-20 support
docs/x402/index.md Modified Minor formatting (bolded TRON and BSC)
docs/x402/getting-started/quickstart-for-agent.md Modified Platform support section removed; wallet env var consolidated to AGENT_WALLET_PRIVATE_KEY; installation simplified to npx skills add
docs/x402/getting-started/quickstart-for-human.md Modified Same wallet env var consolidation; Python 3.10→3.11
docs/x402/getting-started/quickstart-for-sellers.md Modified Updated with new facilitator API key flow and wallet guidance

Purpose: Document exact_gasfree, rate limiting on the Facilitator, and align wallet env var references with the new AGENT_WALLET_PRIVATE_KEY standard.


5. Skills & Sidebar Updates

File Change Type Description
docs/McpServer-Skills/SKILLS/BANKOFAISkill.md Modified Added agent-wallet skill entry (skill count 7→8); added advanced features for TRC20 and multisig sections
docs/McpServer-Skills/SKILLS/Intro.md Modified Added "Secure Wallet Management" section for agent-wallet
docs/McpServer-Skills/SKILLS/QuickStart.md Modified Updated skill count and security risk assessment table to include agent-wallet
docs/Openclaw-extension/QuickStart.md Modified Updated skill count/list, mcp-server-tron install now fully automatic (no API key prompt)
sidebars.js Modified Added TOOLS > SUN CLI category with 4 doc links
package.json Modified Version bump 1.2.7→1.2.8

Purpose: Introduce the agent-wallet as a first-class skill and register SUN CLI in the navigation sidebar.


Detailed Findings


Major

[MJ-01] Security Regression: Private Key Warning Silently Removed from Key Import Path

Property Value
Severity Major
Category Security / Documentation
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Lines 80-104 (new) and docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md : matching section

Description

In the old documentation, "Option 2: Private Key" and "Option 3: Mnemonic Phrase" were clearly marked with :::warning admonitions explaining the real risk of plaintext key exposure via shell history, ps aux, and log files. In the new documentation, these options have been removed in favour of Agent Wallet — which is a correct security improvement. However, the replacement "Path 2 / Option B: Import an Existing Private Key" instructs users to:

export AGENT_WALLET_PRIVATE_KEY=your_private_key_here

and even recommends persisting it via:

echo 'export AGENT_WALLET_PRIVATE_KEY=your_private_key' >> ~/.zshrc

The second command writes the raw private key into shell history and into the shell profile file — the same attack surface the old warnings described. The :::tip block that accompanies this path focuses only on how to make it persistent, with zero security context. Additionally, the FAQ in SUN CLI/FAQ.md lists AGENT_WALLET_PRIVATE_KEY as a valid wallet source but omits any security caveat.

This is a regression: users migrating from the old docs (which explicitly warned about this) will no longer receive that guidance, and new users will find no warning at all.

Code (new path, no warning):

# Path 2: Import an Existing Private Key
export AGENT_WALLET_PRIVATE_KEY=your_private_key_here

:::tip
To make this persist across terminal sessions, add it to your shell configuration file:

echo 'export AGENT_WALLET_PRIVATE_KEY=your_private_key' >> ~/.zshrc
echo 'export AGENT_WALLET_PRIVATE_KEY=your_private_key' >> ~/.bashrc

Recommendation

Replace the :::tip block with a :::warning admonition that mirrors the original security guidance:

:::warning Security Risk
Storing your private key as a plaintext environment variable carries real risks:
- The `echo 'export ...'` command above records your key in shell history (`~/.zsh_history`, `~/.bash_history`)
- The key is stored in plaintext in `~/.zshrc` or `~/.bashrc` — any process with filesystem access can read it
- Environment variables can be leaked via process listings (`ps aux`) or log files

**Only keep small amounts of funds in wallets configured this way.**
For wallets holding significant funds, use `agent-wallet start` (Path 1) to generate a fully encrypted keystore instead.
:::

Also add a brief caution to the SUN CLI FAQ under "I get 'No wallet configured'".


[MJ-02] GasFree CLI Examples Reference Unreachable Source File Path

Property Value
Severity Major
Category Correctness / Documentation
File docs/x402/core-concepts/network-and-token-support.md : Lines 128-144 (new GasFree account management section)

Description

The new exact_gasfree scheme documentation provides the following example commands for managing GasFree accounts:

npx tsx x402-payment/src/x402_invoke.ts --gasfree-info
npx tsx x402-payment/src/x402_invoke.ts --gasfree-activate

This invocation path (x402-payment/src/x402_invoke.ts) is a relative path to a TypeScript source file inside the x402-payment skill directory. Users who installed the skill via npx skills add https://github.com/BofAI/skills will have the skill files in ~/.openclaw/skills/x402-payment/ or ~/.claude/skills/x402-payment/ (depending on their platform) — not in a x402-payment/ directory relative to the current working directory. The npx tsx command would fail with a "file not found" error for the majority of users.

Furthermore, these commands require tsx to be available globally or the user to have run npm install inside the skill directory — neither of which is documented.

Code:

# Query GasFree wallet info
npx tsx x402-payment/src/x402_invoke.ts --gasfree-info
npx tsx x402-payment/src/x402_invoke.ts --gasfree-info --network nile
npx tsx x402-payment/src/x402_invoke.ts --gasfree-activate

Recommendation

Either:

  1. Document the correct path based on the actual skill installation location (e.g., ~/.openclaw/skills/x402-payment/src/x402_invoke.ts) and note that tsx must be available.
  2. Or — preferably — expose GasFree account management as a proper CLI command via a package binary (e.g., x402 gasfree info) so users don't need to invoke source files directly.
  3. At minimum, add a prerequisite note explaining that these commands must be run from within the x402-payment skill directory after running npm install.

[MJ-03] Node.js Version Requirement Inconsistency Across Docs

Property Value
Severity Major
Category Correctness / Documentation
File docs/x402/getting-started/quickstart-for-human.md : Line 179

Description

This PR updates the Node.js minimum requirement from 18 to 20 across Agent-Wallet/QuickStart.md, Agent-Wallet/Developer/SDK-Guide.md, Agent-Wallet/FAQ.md, and McpServer-Skills/Tools/SUNCli/QuickStart.md / Intro.md. However, quickstart-for-human.md was only partially updated:

  • The prerequisites checklist still reads: Python 3.11+ or Node.js 18+ installed
  • The Python requirement was correctly updated from 3.10 to 3.11 in the same file

This creates a direct contradiction within the same page and across the documentation suite. Users who check quickstart-for-human.md before installing Node.js may install v18, then encounter failures when using other tools that require v20.

Code:

### Checklist Before You Start

- [ ] **Python 3.11+** or **Node.js 18+** installed (depending on your chosen language)

Recommendation

Update the checklist line in docs/x402/getting-started/quickstart-for-human.md (and its mirror in i18n/current/) to:

- [ ] **Python 3.11+** or **Node.js 20+** installed (depending on your chosen language)

Also audit i18n/current/x402/getting-started/quickstart-for-human.md for the same issue — the parallel i18n file has the same content and will contain the same inconsistency.


Minor

[MN-01] agent-wallet Skill "High Risk (Snyk)" Score Not Contextualized

Property Value
Severity Minor
Category Documentation
File docs/McpServer-Skills/SKILLS/QuickStart.md : Lines 94-107 (security risk table) and docs/Openclaw-extension/QuickStart.md : matching section

Description

The updated security risk assessment table now shows agent-wallet with a High Risk Snyk score and Med Risk Gen score — the highest risk rating of any skill listed. The prior highest was x402-payment at Med Risk Snyk. The docs show these ratings as-is with no explanation of what they mean or why they are considered acceptable to install. Users who understand security scanners will be rightfully alarmed at "High Risk" for a wallet management tool and may refuse to install it, defeating the purpose of the PR. Users who don't understand security scanners will blindly install it without informed consent.

Code:

│  agent-wallet                      Med Risk    1 alert    High Risk │

Recommendation

Add a callout below the risk table explaining the scoring methodology and why the agent-wallet package receives a High Risk Snyk score (likely flagged due to cryptographic dependencies or key management scope):

:::info About Security Risk Scores
The ratings above come from automated static analysis tools (Snyk, Socket.dev). A "High Risk" Snyk score for `agent-wallet` does not indicate malware — it reflects the tool's use of cryptographic libraries for private key management, which static analyzers flag as sensitive. The BANK OF AI team reviews all skill code before publishing. You can inspect the source at [github.com/BofAI/skills](https://github.com/BofAI/skills).
:::

[MN-02] Ambiguity in Agent Wallet Environment Variable for MCP Server Runtime

Property Value
Severity Minor
Category Correctness / Documentation
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md and docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md

Description

The new deployment docs establish two separate flows:

  • Path 1 (new wallet): Run agent-wallet start. No additional env vars needed — Agent Wallet manages the keystore.
  • Path 2 (import key): Set AGENT_WALLET_PRIVATE_KEY=...

However, in Step 2 (Configure API Key) and throughout the FAQ, the docs consistently refer to AGENT_WALLET_PASSWORD as the env var for the MCP server to use. For users on Path 2 (using AGENT_WALLET_PRIVATE_KEY), it's unclear:

  1. Do they also need to set AGENT_WALLET_PASSWORD?
  2. Does AGENT_WALLET_PRIVATE_KEY bypass the password requirement entirely?
  3. Is AGENT_WALLET_PRIVATE_KEY a runtime env var for the MCP server, or only for the agent-wallet CLI during initial import?

This ambiguity could leave Path 2 users unable to start the MCP server or unsure whether their setup is correct.

Recommendation

Add a consolidating note in the Step 3 (Local Private Deployment) section that explicitly maps each path to its runtime environment variable:

**Runtime environment variable summary:**

| Setup Path | Runtime Env Var for MCP Server |
|------------|-------------------------------|
| Path 1: New wallet via `agent-wallet start` | `AGENT_WALLET_PASSWORD=<your-master-password>` |
| Path 2: Imported via `AGENT_WALLET_PRIVATE_KEY` | `AGENT_WALLET_PRIVATE_KEY=<your-private-key>` (no password needed) |

[MN-03] Docker Option D Omits .gitignore Instruction for .env.docker

Property Value
Severity Minor
Category Security / Documentation
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Lines 175-205 (Option D Docker)

Description

The Docker deployment example correctly instructs users to use --env-file .env.docker instead of -e KEY=value to avoid leaking keys in shell history and docker inspect. The warning block says "add .env.docker to your .gitignore" but does not show the actual command to do so. Users new to Docker or Git may miss this step, leading to accidental commits of secrets.

Code:

cat > .env.docker << 'EOF'
TRONGRID_API_KEY=your-key-here
EOF

(No .gitignore update shown)

Recommendation

Add the .gitignore step explicitly in the code block sequence:

# 1. Create a .env file for sensitive variables
cat > .env.docker << 'EOF'
TRONGRID_API_KEY=your-key-here
EOF

# 2. Exclude it from version control
echo ".env.docker" >> .gitignore

# 3. Build and run...

[MN-04] SUN CLI liquidity v4:mint Missing Default for --fee Flag

Property Value
Severity Minor
Category Documentation
File docs/McpServer-Skills/Tools/SUNCli/CommandGuide.md : liquidity v4:mint section

Description

In the liquidity v3:mint command, the --fee flag has a documented default of 3000. In the liquidity v4:mint command, --fee is listed as optional but no default value is shown. It is unclear whether V4 uses the same default or requires explicit specification. Users attempting to mint a V4 position without --fee may get an unexpected error or unexpected behavior.

Code:

| `--fee <n>` | Pool fee tier | — |   ← v4:mint (no default)
| `--fee <n>` | Pool fee tier | `3000` |   ← v3:mint (has default)

Recommendation

Either document the actual default for V4 --fee if one exists, or add a note clarifying that this parameter is required for V4 if no default applies:

| `--fee <n>` | Pool fee tier | `3000` (or mark as required) |

[MN-05] Privy Wallet Type Documentation is Incomplete for Production Use

Property Value
Severity Minor
Category Documentation
File docs/Agent-Wallet/FAQ.md, docs/Agent-Wallet/Developer/CLI-Reference.md

Description

The new Privy wallet type is introduced across several documents but only as tip boxes. For a wallet type that delegates private key custody to a third-party cloud service, users need to understand:

  • What data is sent to Privy's servers (signing requests include transaction data)
  • What happens if Privy is unavailable (signing operations fail)
  • How to migrate from Privy to a local wallet
  • Whether Privy wallets are compatible with all operations (e.g., does list_wallets work?)

Without this information, users cannot make an informed decision about adopting Privy custody for production workloads.

Recommendation

Add a dedicated "Privy wallet type" subsection (or link to Privy documentation) covering: availability dependency, data sent to Privy, migration path, and compatibility matrix with Agent Wallet operations.


Suggestions

[S-01] SUN CLI CommandGuide: Add Warning About --network as Root-Only Flag

File: docs/McpServer-Skills/Tools/SUNCli/CommandGuide.md — Global Flags table
Description: The FAQ correctly documents that --network must precede the subcommand, but the CommandGuide's Global Flags section has no such callout. The --network entry in the table reads the same as any other flag, which may lead users to append it after the subcommand.
Suggestion: Add an inline note to the --network row: "--network must appear before the subcommand (e.g., sun --network nile swap ...). Appending it after the subcommand will cause a parse error."


[S-02] Docker Deployment Should Note Agent Wallet Limitation

File: docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md — Option D (Docker)
Description: The Docker section notes the image runs in "read-only HTTP mode" and recommends Options A/B/C for write operations. It doesn't explain why Docker can't easily do write operations — the Agent Wallet keystore lives on the host filesystem and would need to be bind-mounted, with care taken around the master password. A brief technical note would help advanced users who want to explore Docker-based write deployments.
Suggestion: Add: "Write operations require Agent Wallet access. To enable writes in Docker, bind-mount your ~/.agent-wallet directory and pass AGENT_WALLET_PASSWORD via --env-file. Ensure the mounted directory has correct permissions inside the container."


[S-03] agent-wallet init vs agent-wallet start Disambiguation Could Be Clearer

File: docs/Agent-Wallet/Developer/CLI-Reference.mdagent-wallet init section
Description: The tip box says "start = init + create a wallet in one step", which is helpful. However, the surrounding text doesn't emphasize that for most users (including all CI scenarios described), start is simpler and sufficient. New users reading the CLI Reference top-to-bottom may try init thinking it's the recommended starting point.
Suggestion: Move the "When to use init vs start" tip to the top of the init section (currently it's at the bottom after the flag table), and add "For most users, agent-wallet start is the right starting point."


[S-04] x402 Quickstart for Agent: Remove Mention of npx skills add -y -g Without Explaining Flags

File: docs/x402/getting-started/quickstart-for-agent.md — Step 2
Description: The simplified install command npx skills add https://github.com/BofAI/skills -y -g uses -y (skip prompts) and -g (global install) without sufficient explanation. For users who may want per-project installation or who want to review security assessments before accepting, the -y flag bypasses that entirely. The page later references the Skills Quick Start for a "detailed walkthrough" but only for the interactive path.
Suggestion: Add a one-line explanation of each flag immediately after the command, and note that the interactive path (npx skills add without flags) lets users review security assessments before accepting.


Positive Observations

Area Observation
Security architecture Consolidating all wallet modes to Agent Wallet (encrypted keystore) is a meaningful security improvement over the previous plaintext TRON_PRIVATE_KEY / TRON_MNEMONIC environment variables. The encrypted-first design is well-motivated and consistently applied.
Docker warning The Docker section includes an explicit :::warning against using -e KEY=value on the command line. This is exactly the right guidance and is well-placed.
CLI Command Reference structure The SUN CLI CommandGuide is thorough, consistently formatted, and includes sensible defaults, required/optional marking, and practical examples for every command. The :::caution Private Key Security block for the -k/-m flags is appropriate and well-placed.
Testnet-first guidance Throughout SUN CLI docs, the guidance to test on Nile testnet before mainnet is consistently applied and marked clearly.
v1.1.7 changelog entry Adding an explicit FAQ entry for "What changed in v1.1.7?" is excellent practice — it gives users a single place to understand breaking changes (removal of TRON_PRIVATE_KEY/TRON_MNEMONIC) and migration guidance.
i18n parity The i18n/current/ directory mirrors all documentation changes, indicating good discipline in keeping localized versions in sync.
Rate limiting documentation The new Facilitator rate limiting section (1000 req/min authenticated vs 1 req/min anonymous) is actionable and clearly presented with a comparison table. This was previously undocumented.
Non-interactive mode coverage The agent-wallet change-password non-interactive mode documentation includes a :::caution about shell history exposure for passwords passed as flags — consistent with the overall security-forward tone of the PR.

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 8 6 2 0 Node.js version inconsistency (MJ-03); GasFree path incorrect (MJ-02)
Security 6 5 1 0 Plaintext key warning removed from import path (MJ-01)
Performance 5 0 0 5 Not applicable (documentation only)
Code Quality 6 5 0 1 Consistent formatting; minor v4 fee default gap (MN-04)
Testing 5 0 0 5 Not applicable (documentation only)
Documentation 6 4 2 0 Privy docs incomplete (MN-05); agent-wallet risk score unexplained (MN-01)
Compatibility 4 3 1 0 Path 2 runtime env var ambiguity (MN-02)
Observability 3 0 0 3 Not applicable (documentation only)

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analyzed only the diff between the specified branches. Runtime behavior, integration testing, and deployment impact are not covered. All content reviewed is documentation (Markdown files) and configuration (sidebars.js, package.json) — no application source code was changed in this PR.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-10

@github-actions
Copy link
Copy Markdown

Code Review Report

Project: BofAI Docs (@x402-tron/docs)
PR: mainupdate-mcp-server
Review Date: 2026-04-10
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main
To Branch update-mcp-server
Commits 31
Files Changed 62
Lines Added +4,226
Lines Removed -753

Commit History (recent)

Hash Message
e24ac5c delete caution
71a3720 fix
a82086c add sun-cli
2d193a0 fix
174c30d add setup
d883416 update content
daea552 fix seller example
ffb5377 chang wallet mode
b3fc365 fix agent-wallet
05d402c add sunmcpserver

Review Summary

Verdict

Verdict: Request Changes

Findings at a Glance

Critical Major Minor Suggestion
Count 0 5 6 4

Summary

This is a documentation-only PR that delivers three primary changes: (1) a new SUN CLI tool section with 4 new reference documents, (2) a wallet architecture consolidation that removes legacy TRON_PRIVATE_KEY/TRON_MNEMONIC/BSC_PRIVATE_KEY env-var wallet modes in favour of Agent Wallet exclusively across both TRON and SUN MCP Servers, and (3) a new exact_gasfree payment scheme for zero-gas TRON payments in the x402 protocol. The Chinese (zh-Hans) i18n translations mirror every English change.

The documentation quality is generally high — consistent formatting, appropriate security admonitions, and clear command examples. However, the PR contains several significant documentation gaps and internal inconsistencies that would actively mislead users or silently break existing deployments. The most pressing concerns are: an undisclosed breaking change for existing MCP Server users relying on raw private-key env vars; a behavioural inconsistency between TRONMCPServer (errors on write) and SUNMCPServer (read-only fallback) that is documented as a design difference without clear rationale; and credentials embedded in example YAML configs without a matching .gitignore reminder.

These issues do not affect production code (this repo is documentation only), but they directly affect users' ability to securely configure and operate the referenced software and should be resolved before publication.


Change Summary

1. SUN CLI Documentation (New Files)

File Change Type Description
docs/McpServer-Skills/Tools/SUNCli/Intro.md Added Introduction to SUN CLI tool
docs/McpServer-Skills/Tools/SUNCli/QuickStart.md Added Installation and first-run guide
docs/McpServer-Skills/Tools/SUNCli/CommandGuide.md Added Full command reference (~860 lines)
docs/McpServer-Skills/Tools/SUNCli/FAQ.md Added Troubleshooting and common questions
sidebars.js Modified Added TOOLS > SUN CLI navigation category

Purpose: Introduces SUN CLI as a new tool under the McpServer-Skills section, providing complete reference documentation.


2. Wallet Architecture Consolidation

File Change Type Description
docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md Modified Removed Option 2 (Private Key) and Option 3 (Mnemonic) wallet modes
docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md Modified Updated wallet errors, removed references to raw key modes
docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md Modified Same consolidation for SUN MCP Server
docs/McpServer-Skills/MCP/SUNMCPServer/FAQ.md Modified Removed "Conflicting Wallet Modes" FAQ entry
docs/Agent-Wallet/Developer/CLI-Reference.md Modified Added init, resolve-address commands, --show-address flag, non-interactive change-password
docs/Agent-Wallet/Developer/SDK-Guide.md Modified Node.js minimum version bump: 18 → 20, Privy error types added
docs/Agent-Wallet/FAQ.md Modified Added privy wallet type, Windows support, Node ≥ 20
docs/Agent-Wallet/QuickStart.md Modified Node.js version references updated 18 → 20
docs/Agent-Wallet/Developer/SDK-Cookbook.md Modified Added more examples table

Purpose: Consolidates all wallet configuration docs to use Agent Wallet only; adds Privy wallet type support and new CLI commands.


3. x402 Protocol Updates

File Change Type Description
docs/x402/core-concepts/network-and-token-support.md Modified New exact_gasfree scheme documented; BSC config note added
docs/x402/core-concepts/facilitator.md Modified Rate limiting section added; payment record query scoping documented
docs/x402/faq.md Modified exact_gasfree added to payment scheme FAQ
docs/x402/sdk-features.md Modified exact_gasfree/tron, SufficientBalancePolicy, GasFree, USDD rows added
docs/x402/getting-started/quickstart-for-agent.md Modified Migrated from TRON_PRIVATE_KEY/BSC_PRIVATE_KEY to AGENT_WALLET_PRIVATE_KEY; platform restriction removed
docs/x402/getting-started/quickstart-for-human.md Modified Same migration; Python 3.10 → 3.11; TronClientSigner.create() async pattern
docs/x402/getting-started/quickstart-for-sellers.md Modified FastAPI Request param bug fix; self-hosted Facilitator rewritten for YAML config + PostgreSQL

Purpose: Documents the new exact_gasfree zero-gas payment scheme, Facilitator rate limiting, and unified wallet credential pattern (AGENT_WALLET_PRIVATE_KEY).


4. Skills and Navigation Updates

File Change Type Description
docs/McpServer-Skills/SKILLS/BANKOFAISkill.md Modified New agent-wallet skill section added; enhanced TRC20 and multisig content
docs/McpServer-Skills/SKILLS/Intro.md Modified 7 → 8 skills; new agent-wallet entry
docs/McpServer-Skills/SKILLS/QuickStart.md Modified Security risk table updated; agent-wallet added
docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md Modified 95 → 97 tools count
docs/McpServer-Skills/MCP/TRONMCPServer/ToolList.md Modified Same tool count update; write-tool visibility change documented
docs/Openclaw-extension/QuickStart.md Modified agent-wallet added to skill list; TRONGRID_API_KEY step now optional

Purpose: Reflects new skill count and Agent Wallet as a first-class skill; updates installer UX screenshots.


Detailed Findings


Major

[MJ-01] Undisclosed Breaking Change: Legacy Wallet Env Vars Removed Without Migration Guide

Property Value
Severity Major
Category Documentation / Correctness
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : (entire Step 1 rewrite)

Description

The PR entirely removes documentation for TRON_PRIVATE_KEY, TRON_MNEMONIC, BSC_PRIVATE_KEY, and TRON_ACCOUNT_INDEX wallet modes from both TRON and SUN MCP Server setup guides. Any user with an existing local deployment that relies on these environment variables will have their configuration silently fail after the software update that accompanies this doc change — write tools will start returning errors with no explanation visible in the old documentation they may have bookmarked.

There is no:

  • "v1.1.7 Breaking Changes" notice at the top of the affected pages
  • Migration section explaining how to move from TRON_PRIVATE_KEY to AGENT_WALLET_PRIVATE_KEY
  • Changelog entry in this PR

Code

-#### Option 2: Private Key
-export TRON_PRIVATE_KEY="<your-private-key-hex>"
-
-#### Option 3: Mnemonic Phrase
-export TRON_MNEMONIC="word1 word2 word3 ... word12"

Recommendation

Add a versioned migration notice at the top of the affected deployment docs. Example:

:::caution Breaking change in v1.1.7
`TRON_PRIVATE_KEY`, `TRON_MNEMONIC`, and `BSC_PRIVATE_KEY` environment variables
are no longer supported. Migrate to Agent Wallet using one of the two paths below.
See the [migration guide](#migration-from-env-var-wallet-modes) for step-by-step instructions.
:::

[MJ-02] Behavioural Inconsistency: TRONMCPServer vs SUNMCPServer on Missing Wallet

Property Value
Severity Major
Category Correctness / Documentation
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : ~line 52 vs docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md : ~line 46

Description

The two docs describe different server behaviour when no wallet is configured:

  • TRON MCP Server: "If no wallet is configured, write tools will return an error prompting you to set up a wallet."
  • SUN MCP Server: "If no wallet is configured, the server automatically runs in read-only mode."

These are contradictory descriptions of what should be equivalent functionality. Users running both servers will encounter inconsistency that erodes trust in the documentation. This may also be a genuine software bug masked by the docs if the two servers actually behave differently.

Code

# TRONMCPServer/LocalPrivatizedDeployment.md
+TRON MCP Server uses [Agent Wallet]... If no wallet is configured, write tools will return an error...

# SUNMCPServer/LocalPrivatizedDeployment.md
+SUN MCP Server uses [Agent Wallet]... If no wallet is configured, the server automatically runs in read-only mode.

Recommendation

Align both descriptions to reflect actual behaviour. If TRON MCP Server changed to error-on-write (per FAQ.md v1.1.7 note), then update the SUN MCP Server docs to match — or add a note explaining why the two servers intentionally differ.


[MJ-03] Database Credentials in Example YAML Config Without .gitignore Reminder

Property Value
Severity Major
Category Security
File docs/x402/getting-started/quickstart-for-sellers.md : Self-Hosted Facilitator section, Step 3.3

Description

The new YAML configuration example shows a real database connection string containing a password:

database:
  url: "postgresql+asyncpg://postgres:yourpassword@localhost:5432/x402"

The doc instructs users to populate config/facilitator.config.yaml with their actual password but never tells them to add this file to .gitignore. Users following the guide while working in a Git repository risk accidentally committing their database credentials. The old .env-based approach at least implicitly carried the convention of never committing .env files.

Code

database:
  url: "postgresql+asyncpg://postgres:yourpassword@localhost:5432/x402"

Recommendation

Add an explicit warning immediately after the cp config/facilitator.config.example.yaml config/facilitator.config.yaml step:

:::warning
`config/facilitator.config.yaml` will contain your database password. Add it to
your `.gitignore` before committing:
```bash
echo "config/facilitator.config.yaml" >> .gitignore

:::


---

#### [MJ-04] `AGENT_WALLET_PRIVATE_KEY` Persisted Plaintext to Shell Profile Without Security Warning

| Property | Value |
|----------|-------|
| **Severity** | Major |
| **Category** | Security |
| **File** | `docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md` : Path 2 (~line 95); same pattern in `SUNMCPServer/LocalPrivatizedDeployment.md`, `quickstart-for-agent.md`, `quickstart-for-human.md`, `quickstart-for-sellers.md` |

**Description**

The PR's new "Option B / Path 2" instructs users to persist their raw private key directly into their shell profile (`~/.zshrc` or `~/.bashrc`). This stores the private key as plaintext in a file that is typically backed up, synced (e.g., dotfiles repos), or readable by any process running under the same user. The original docs had an explicit `:::warning` admonition about this risk when documenting `TRON_PRIVATE_KEY`. The replacement docs drop the warning and instead suggest this as a normal workflow with a friendly `:::tip` callout.

**Code**
```bash
# Suggested in the "tip" block:
echo 'export AGENT_WALLET_PRIVATE_KEY=your_private_key' >> ~/.zshrc
echo 'export AGENT_WALLET_PRIVATE_KEY=your_private_key' >> ~/.bashrc

Recommendation

Replace the :::tip with a :::warning admonition that explicitly states the security trade-off:

:::warning Plaintext key in shell profile
Adding a raw private key to `~/.zshrc` or `~/.bashrc` stores it as plaintext.
Any process or script that reads your environment — or anyone with access to your
dotfiles — can extract it. Only use this approach for **dedicated test wallets with
minimal funds**. For production or significant-fund wallets, use Agent Wallet's
encrypted keystore (`agent-wallet start`) instead.
:::

[MJ-05] Python Version Requirement Inconsistency Across Docs

Property Value
Severity Major
Category Correctness / Documentation
File docs/x402/getting-started/quickstart-for-human.md : Prerequisites vs docs/x402/getting-started/quickstart-for-sellers.md : Prerequisites

Description

quickstart-for-human.md bumps the Python requirement from 3.10+ to 3.11+ in this PR, but quickstart-for-sellers.md retains Python 3.10+ in its prerequisites checklist. Users who follow the sellers guide first and use Python 3.10 may encounter issues when following the human/agent quickstart later, with no warning.

Code

# quickstart-for-human.md
-**Python 3.10+** or **Node.js 18+**
+**Python 3.11+** or **Node.js 18+**

# quickstart-for-sellers.md (unchanged — still says 3.10+)
- [ ] **Python 3.10+** or **Node.js 18+** installed

Recommendation

Decide on the canonical minimum Python version and apply it consistently across all x402 quickstart guides. If 3.11 is the new minimum (likely due to asyncio / tomllib changes), update quickstart-for-sellers.md to match.


Minor

[MN-01] USDD Fee Amount in YAML Example Is Unexplained and Potentially Confusing

Property Value
Severity Minor
Category Documentation
File docs/x402/getting-started/quickstart-for-sellers.md : Step 3.3, TRON YAML tab

Description

The YAML example shows USDT: 100 alongside USDD: 100000000000000. The 12-order-of-magnitude difference (100 vs 10^14) is technically correct if USDT uses 6 decimals and USDD uses 18 decimals, but this is never explained. A developer unfamiliar with TRON token decimal conventions may simply copy-paste the USDD value and set a fee vastly larger or smaller than intended.

Code

base_fee:
  USDT: 100                # 0.0001 USDT per settlement (adjust as needed)
  USDD: 100000000000000

Recommendation

Add a comment explaining the decimal conversion:

base_fee:
  USDT: 100                # 0.0001 USDT (USDT uses 6 decimals: 100 / 10^6)
  USDD: 100000000000000    # 0.0001 USDD (USDD uses 18 decimals: 10^14 / 10^18)

[MN-02] agent-wallet Skill Shows High Risk Rating With No Explanation

Property Value
Severity Minor
Category Documentation
File docs/McpServer-Skills/SKILLS/QuickStart.md : Security Risk Assessments table; docs/Openclaw-extension/QuickStart.md : same

Description

Both quickstart guides now show the agent-wallet skill with a High Risk Snyk rating:

│  agent-wallet    Med Risk    1 alert    High Risk

No explanation is provided for why this skill has a High Risk rating. Users may either ignore this (normalising security warnings) or be scared away from installing the skill. The x402-payment skill changed from Med to Med Risk/Safe between the two guides, which is also inconsistent.

Recommendation

Add a footnote or follow-up paragraph explaining what the security scan findings mean for agent-wallet and whether the risk is accepted/mitigated. Example:

> ℹ️ The `agent-wallet` High Risk (Snyk) rating refers to transitive
> dependency vulnerabilities. The core signing and key management code
> does not use the affected packages. Review the full Snyk report at
> [link] before making your own risk assessment.

[MN-03] Node.js Version Bump (18 → 20) Not Highlighted as a Breaking Requirement Change

Property Value
Severity Minor
Category Documentation
File docs/Agent-Wallet/QuickStart.md, docs/Agent-Wallet/Developer/SDK-Guide.md, docs/Agent-Wallet/FAQ.md

Description

The Node.js minimum requirement is raised from 18 to 20 across the Agent Wallet docs. Node.js 18 is still in active LTS support through April 2025, so users on 18 will silently get failures without understanding why. The change is made inline in existing text with no callout. Given the PR targets users who may already have agent-wallet installed with Node 18, a more prominent notice is warranted.

Recommendation

Add a versioned note at the top of the affected pages or in a "What's New" section:

:::note Node.js 20+ required as of agent-wallet v2.x
Node.js 18 is no longer supported. If you are on Node 18, upgrade before proceeding.
:::

[MN-04] AGENT_WALLET_MNEMONIC Env Var Referenced in SUNCli Docs But Not in Agent-Wallet Docs

Property Value
Severity Minor
Category Documentation / Consistency
File docs/McpServer-Skills/Tools/SUNCli/CommandGuide.md : Global Flags, Wallet Configuration section

Description

The SUN CLI command guide references AGENT_WALLET_MNEMONIC as a supported environment variable:

- `AGENT_WALLET_MNEMONIC` — mnemonic phrase

This env var does not appear anywhere in the Agent-Wallet documentation (CLI Reference, SDK Guide, or FAQ) in this PR. If it is a supported feature, it should be documented in Agent-Wallet. If it is not yet supported or is SUNCli-specific, the scope should be clarified.

Recommendation

Either add AGENT_WALLET_MNEMONIC to the Agent-Wallet CLI Reference with usage examples, or add a note in SUNCli's docs clarifying it is a CLI-specific feature.


[MN-05] Anonymous Facilitator Rate Limit (1 req/min) Not Flagged as Impactful for Testing

Property Value
Severity Minor
Category Documentation
File docs/x402/core-concepts/facilitator.md : Rate Limiting section

Description

The new rate limiting table states anonymous users are limited to 1 request per minute on the /settle endpoint. This is extremely restrictive and will break any automated test suite that doesn't configure an API key. The docs do not warn developers setting up for the first time that they will immediately hit this limit during the quickstart workflow.

Code

| **Anonymous** | 1 request / minute | No API Key provided |

Recommendation

Add a callout before the rate limit table:

> ⚠️ **Developers:** The 1 req/min anonymous limit will be hit during
> any automated test run. Apply for an API Key via the
> [Admin Portal](https://admin-facilitator.bankofai.io) before
> running integration tests.

[MN-06] exact_gasfree Activation Flow Has No Recovery / Troubleshooting Docs

Property Value
Severity Minor
Category Documentation / Completeness
File docs/x402/core-concepts/network-and-token-support.md : exact_gasfree Scheme section

Description

The new exact_gasfree scheme requires a one-time "GasFree account activation" step, documented as:

npx tsx x402-payment/src/x402_invoke.ts --gasfree-activate

However, there is no documentation for:

  • What happens if activation fails (network error, insufficient funds)
  • How to check if an account is already activated
  • Whether activation is per-token or per-account
  • What error messages to expect if using the scheme on a non-activated account

Recommendation

Add a "Troubleshooting GasFree" subsection or FAQ entry covering activation failure modes and recovery steps.


Suggestions

[S-01] Consolidate Duplicate Wallet Setup Sections Between TRON and SUN MCP Servers

File: docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md and docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md

Description: The wallet setup sections in these two files are now nearly identical (same Agent Wallet table, same Path 1/Path 2 instructions). Any future updates will need to be applied in two places, risking drift.

Suggestion: Extract the common wallet setup into a shared include file (e.g., _partials/agent-wallet-setup.md) using Docusaurus's MDX import mechanism, then reference it from both deployment guides.


[S-02] Docker Deployment Section Should Note Agent Wallet Cannot Be Used in Read-Only Container

File: docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Option D

Description: The Docker tip says the image runs in "read-only HTTP mode by default" and directs users to Options A/B/C for write operations. It would be helpful to explain why Docker mode is read-only (i.e., the Agent Wallet keystore can't be mounted into the container without additional volume configuration), so users understand the architectural reason rather than treating it as an arbitrary limitation.

Suggestion: Add one sentence: "Docker mode is read-only because mounting an encrypted Agent Wallet keystore into a container requires additional volume and secret configuration beyond the scope of this guide."


[S-03] quickstart-for-sellers.md Self-Hosted Section Should Reference Docker Compose Alternative

File: docs/x402/getting-started/quickstart-for-sellers.md : Section 3

Description: The new self-hosted Facilitator section requires users to manually install PostgreSQL (with detailed OS-specific instructions). A Docker Compose alternative would dramatically reduce setup friction and is now standard practice for self-hosted services.

Suggestion: Add an optional "Option C — Docker Compose" tab alongside the direct install and Railway cloud options.


[S-04] CLI Reference change-password Non-Interactive Warning Duplicates Itself

File: docs/Agent-Wallet/Developer/CLI-Reference.md : change-password section

Description: The new caution block for change-password non-interactive mode warns that -p and --new-password will be recorded in shell history — but this same concern applies to any flag containing sensitive material (e.g., agent-wallet start -p), which is documented elsewhere without a warning. The warning is inconsistently applied.

Suggestion: Either add a general shell-history warning to the top of the CLI Reference, or ensure every section that accepts passwords via flags carries the same caution.


Positive Observations

Area Observation
Bug fix quickstart-for-sellers.md correctly adds request: Request to FastAPI endpoint function signatures — this was a genuine FastAPI usage bug that would cause runtime errors
Security transparency The fallback RPC endpoint note clearly discloses BANK OF AI's infrastructure dependency, SLA limitations, and how to opt out — this is honest and developer-friendly
Docker security Option D's Docker deployment explicitly warns against -e KEY=value and mandates --env-file, with an explanation of why (shell history, docker inspect)
New exact_gasfree docs The GasFree scheme is documented comprehensively with activation CLI commands, account query commands, and clear "no API keys required" note
Structured admonitions Consistent use of :::tip, :::warning, :::caution, :::danger, and :::info throughout, making safety-critical information scannable
SUNCli security notes CommandGuide.md includes a prominent :::caution Private Key Security block for -k/-m flags and a dedicated Security Notes section
PostgreSQL setup Multi-distro PostgreSQL installation instructions (macOS, Ubuntu, Amazon Linux, Arch, Windows) plus pg_hba.conf auth configuration are thorough and cover a common pain point
--dry-run documentation Consistent documentation of --dry-run across SUN CLI commands promotes safe testing practices
Privy wallet type New privy wallet type is well-documented with a clear comparison table and appropriate caveats about API credentials
Facilitator rate limits Publishing the rate limit policy (previously undocumented) reduces user frustration and sets correct expectations

Checklist Results

Category Items Checked Pass Fail N/A Notes
Correctness 8 6 2 0 Version inconsistency (Python 3.10 vs 3.11); TRON vs SUN MCP behaviour mismatch
Security 10 7 3 0 Plaintext key in shell profile tip; no .gitignore for YAML config; no warning on AGENT_WALLET_PRIVATE_KEY persistence
Performance 7 7 0 0 No performance-impacting doc changes
Code Quality 8 7 1 0 Duplicate wallet setup content between TRON/SUN MCP docs
Testing 5 3 0 2 No test files changed; N/A for docs-only PR
Documentation 6 3 3 0 Missing breaking change notice; missing migration guide; AGENT_WALLET_MNEMONIC undocumented in Agent-Wallet
Compatibility 5 3 2 0 Node 18→20 bump not prominently flagged; legacy env vars removed without migration path
Observability 4 4 0 0 Rate limiting and fallback endpoints are now documented

Disclaimer

This is an automated code review. It supplements but does not replace human review. The reviewer analysed only the diff between main and update-mcp-server. All files reviewed are documentation (Markdown). No runtime code, smart contracts, or backend logic was changed in this PR. Runtime behaviour, integration testing, and deployment impact of the referenced software are not covered by this review.


Report generated by Code Review Skill v1.0.0
Date: 2026-04-10

@github-actions
Copy link
Copy Markdown

Code Review Report

Project: BofAI/docs (MCP Server & Agent Wallet Documentation)
PR: main -> update-mcp-server
Review Date: 2026-04-10
Reviewer: AI Code Reviewer (Code Review Skill v1.0.0)


PR Overview

Branch Information

Property Value
From Branch main
To Branch update-mcp-server
Commits 33
Files Changed 62
Lines Added +4,228
Lines Removed -755

Commit History

Hash Message
f50ce16 change python-version
e24ac5c delete caution
71a3720 fix
a82086c add sun-cli
2d193a0 fix
174c30d add setup
d883416 update content
daea552 fix seller example
ffb5377 chang wallet mode
b3fc365 fix agent-wallet
05d402c add sunmcpserver
24bfe40 add inspect
37d478b update x402
408ec4b update x402,skills,agent-wallet,mcp-server
f7f440e adjust content
cc7feb9 add agent-wallet cli-reference
85c1a65 fix gasfree
a080ac3 fix
91f6996 fix
3d44188 update all docs
29ab530 update all docs
0dbacc9 add suncli
64a0c36 fix
53baadb fix
0f53ddb fix
856ed9e Merge branch 'update-mcp-server' of github.com:BofAI/docs into update-mcp-server
0e3cfdd add suncli
2056ef1 Merge branch 'main' into update-mcp-server
7043fb4 update version
0712c70 add suncli
d69c9eb add cuncli
3335240 add gas free
5a8e320 fix
88c765c add sun-cli

Review Summary

Verdict

Verdict: Comment

Findings at a Glance

Critical Major Minor Suggestion
Count 0 3 5 4

Summary

This PR is a substantial documentation update for the BANK OF AI ecosystem, covering four main areas: (1) introduction of the new SUN CLI tool (@bankofai/sun-cli) with four entirely new reference files totaling ~1,267 lines, (2) migration of wallet configuration from raw private key / mnemonic environment variables (TRON_PRIVATE_KEY, TRON_MNEMONIC, BSC_PRIVATE_KEY) to the unified AGENT_WALLET_PRIVATE_KEY + agent-wallet encrypted storage model, (3) addition of Privy cloud-custody wallet support to the agent-wallet SDK, and (4) documentation of a new exact_gasfree payment scheme for TRON alongside self-hosted Facilitator setup instructions including PostgreSQL configuration.

Overall quality is good. The writing is clear, examples are practical, and critical security guidance (encrypted storage over plaintext keys, testnet-first advice, history-exposure warnings for CLI flags) is consistently present. The migration away from plaintext private keys in environment variables is a meaningful security improvement and is well-executed across both English and Chinese localisations.

The main concerns are: a security-sensitive example in the "Import an Existing Private Key" path that instructs users to persist a raw private key into shell profile files without adequate context-appropriate warning; a minor but notable version inconsistency (Python 3.10+ vs Python 3.11+ in the human quickstart); and several internal link fragments that were not updated when filenames changed from bare paths to .md-suffixed paths, which will produce broken anchors in the rendered site.


Change Summary

1. New SUN CLI Documentation (4 new files)

  • docs/McpServer-Skills/Tools/SUNCli/Intro.md — Overview, use cases, comparison with SUN MCP Server
  • docs/McpServer-Skills/Tools/SUNCli/QuickStart.md — Install-to-first-query guide
  • docs/McpServer-Skills/Tools/SUNCli/CommandGuide.md — Complete command reference (~860 lines)
  • docs/McpServer-Skills/Tools/SUNCli/FAQ.md — Troubleshooting and common questions
  • Mirrored in i18n/zh-Hans/ for Chinese localisation
  • sidebars.js and i18n/.../sidebars.js updated to include SUN CLI section

2. Agent Wallet — Wallet Configuration Migration

  • docs/Agent-Wallet/Developer/CLI-Reference.md — Added init, inspect --show-address, resolve-address, change-password non-interactive mode; added Privy wallet type tip; bumped Node.js requirement to ≥ 20
  • docs/Agent-Wallet/Developer/SDK-Guide.md — Node.js ≥ 18 → ≥ 20; added Privy error types to hierarchy
  • docs/Agent-Wallet/Developer/SDK-Cookbook.md — Added table of additional SDK examples
  • docs/Agent-Wallet/FAQ.md — Added privy wallet type to comparison table; Windows support note; Node.js ≥ 20
  • docs/Agent-Wallet/QuickStart.md — Node.js ≥ 18 → ≥ 20

3. MCP Server — Wallet Mode Simplification

  • docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md and SUNMCPServer/LocalPrivatizedDeployment.md — Replaced three-option wallet table (Agent Wallet / Private Key / Mnemonic) with a single Agent Wallet flow, added Docker Option D
  • docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md and SUNMCPServer/FAQ.md — Updated error messages and troubleshooting steps to reflect Agent Wallet-only mode
  • docs/McpServer-Skills/MCP/TRONMCPServer/Intro.md, ToolList.md — Tool count 95 → 97
  • Skills QuickStart and BANKOFAISkill updated to reflect 8th skill (agent-wallet)

4. x402 Payment Scheme Updates

  • docs/x402/core-concepts/network-and-token-support.md — Added exact_gasfree scheme documentation
  • docs/x402/core-concepts/facilitator.md — Added rate limiting section (authenticated 1000 req/min vs anonymous 1 req/min) and payment record scoping
  • docs/x402/getting-started/quickstart-for-sellers.md — Self-hosted Facilitator completely rewritten to reference new x402-facilitator repo with YAML config and PostgreSQL setup
  • docs/x402/getting-started/quickstart-for-human.md and quickstart-for-agent.md — Wallet credential env var migrated from TRON_PRIVATE_KEY/BSC_PRIVATE_KEY to AGENT_WALLET_PRIVATE_KEY; added ExactGasFreeClientMechanism code examples

5. Openclaw Extension

  • docs/Openclaw-extension/QuickStart.md — TRON MCP Server installation step made fully automatic; updated skill count to 8

Detailed Findings

[MJ-01] Persisting Raw Private Key to Shell Profile Without Adequate Warning

Property Value
Severity Major
Category Security
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Path 2 / Option B sections; also mirrored in docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md, docs/x402/getting-started/quickstart-for-agent.md, docs/x402/getting-started/quickstart-for-human.md

Description

The new "Import an Existing Private Key" path (called "Path 2" in TRON MCP Server, "Option B" in SUN MCP Server) instructs users to persist the raw private key directly into their shell profile using echo 'export AGENT_WALLET_PRIVATE_KEY=your_private_key' >> ~/.zshrc. The tip block that follows invites users to verify by running echo $AGENT_WALLET_PRIVATE_KEY, which prints the key to the terminal (visible in scroll-back and potentially logged). While a :::tip block with "never hardcode private keys" advice appears in the SUN CLI docs, the deployment guides that replace the old three-option wallet table provide no danger/warning callout at the point of the echo ... >> ~/.zshrc instruction. The old documentation had an explicit :::warning block for the plaintext private key option; that warning was removed along with the option, but the new path reintroduces the same security exposure without equivalent warning text.

Code

# From TRONMCPServer/LocalPrivatizedDeployment.md Path 2:
export AGENT_WALLET_PRIVATE_KEY=your_private_key_here

:::tip
To make this persist across terminal sessions, add it to your shell configuration file:

echo 'export AGENT_WALLET_PRIVATE_KEY=your_private_key' >> ~/.zshrc   # zsh (macOS default)
echo 'export AGENT_WALLET_PRIVATE_KEY=your_private_key' >> ~/.bashrc  # bash (Linux default)
source ~/.zshrc   # or source ~/.bashrc — takes effect immediately without restarting the terminal

Recommendation

Change the :::tip block to a :::warning or :::caution block, and add explicit guidance:

:::warning Private key security — shell profile
Adding your private key to `~/.zshrc` or `~/.bashrc` stores it in **plaintext on disk**.
Any process that reads your shell config, or anyone with access to your home directory,
can extract it. For long-lived deployments, use agent-wallet encrypted storage instead
(`agent-wallet start` and set `AGENT_WALLET_PASSWORD`). Only use this method for
short-lived test sessions.
:::

[MJ-02] Printing Private Key to Terminal Recommended as a "Success Indicator"

Property Value
Severity Major
Category Security
File docs/x402/getting-started/quickstart-for-agent.md : Step 1; docs/x402/getting-started/quickstart-for-human.md : Step Two

Description

Both quickstart guides include the following pattern as the verification step after setting AGENT_WALLET_PRIVATE_KEY, marking a terminal that prints the key value as the success state:

echo $AGENT_WALLET_PRIVATE_KEY
> ✅ Success indicator: The terminal prints your private key string (not blank)

This guidance actively encourages users to expose their private key in the terminal output, which may be captured in terminal logs, CI/CD job output, screen recordings, or by shoulder surfing. A safer verification is to check that the variable is non-empty without revealing the value.

Code

echo $AGENT_WALLET_PRIVATE_KEY
# > ✅ Success indicator: The terminal prints your private key string (not blank)

Recommendation

# Verify the variable is set without revealing the value:
[[ -n "$AGENT_WALLET_PRIVATE_KEY" ]] && echo "AGENT_WALLET_PRIVATE_KEY is set" || echo "NOT set"
# > ✅ Success indicator: Terminal prints "AGENT_WALLET_PRIVATE_KEY is set"

[MJ-03] Self-Hosted Facilitator Config Includes Password in Connection String Example

Property Value
Severity Major
Category Security / Docs
File docs/x402/getting-started/quickstart-for-sellers.md : Section 3.3 Configure the Service

Description

The YAML configuration example for the self-hosted Facilitator embeds the PostgreSQL password directly in the database connection string with the placeholder yourpassword:

database:
  url: "postgresql+asyncpg://postgres:yourpassword@localhost:5432/x402"

While this is a placeholder, the document does not advise users to set the database URL via an environment variable (e.g., DATABASE_URL) rather than hardcoding it in the YAML file. If the YAML file is accidentally committed to version control, the password is exposed. The document should clarify that the URL, like the private key, should come from an environment variable or a secrets manager, not a config file that could be committed.

Code

database:
  url: "postgresql+asyncpg://postgres:yourpassword@localhost:5432/x402"

Recommendation

Add a note alongside the YAML example:

> **Security note:** Do not commit `config/facilitator.config.yaml` to version control
> if it contains the database password. Consider using an environment variable
> (`DATABASE_URL`) and referencing it in your config, or add the file to `.gitignore`.

[MN-01] Python Version Inconsistency Between Documents

Property Value
Severity Minor
Category Correctness / Docs
File docs/x402/getting-started/quickstart-for-human.md : Prerequisites Checklist

Description

The human quickstart checklist was updated to require Python 3.11+:

- [ ] **Python 3.11+** or **Node.js 18+** installed

However, this same file still shows Node.js 18+ while the Agent Wallet and SDK documents across the same PR update Node.js to ≥ 20. The human quickstart has not been updated for the Node.js version bump, creating an inconsistency. Additionally, the quickstart-for-sellers was updated to require Python 3.11 (python --version # Requires 3.11 or higher) but the human quickstart says 3.11 in one place and the prerequisite comment says 3.10 in spirit (it was changed from 3.10 to 3.11 only in this file's checklist line, while the sellers quickstart also changed). The inconsistency with Node.js 18 in the same checklist item stands out.

Code

- [ ] **Python 3.11+** or **Node.js 18+** installed (depending on your chosen language)

Recommendation

- [ ] **Python 3.11+** or **Node.js 20+** installed (depending on your chosen language)

[MN-02] Broken Anchor Fragment in CLI-Reference Links (Partial Fix)

Property Value
Severity Minor
Category Docs
File docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md and SUNMCPServer/FAQ.md; mirrored zh-Hans files

Description

The PR correctly updated bare cross-document links from ../Agent-Wallet/Intro to ../Agent-Wallet/Intro.md and from CLI-Reference#agent-wallet-reset-reset-all-data to CLI-Reference.md#agent-wallet-reset-reset-all-data. However, the anchor #agent-wallet-reset-reset-all-data is only present in the zh-Hans version of CLI-Reference.md (where it appears as an explicit <a id="..."> tag). The English version of CLI-Reference.md does not have this anchor tag — it was not added in this PR. This means the English links like [CLI Reference → Reset](../../../Agent-Wallet/Developer/CLI-Reference.md#agent-wallet-reset-reset-all-data) will silently fail to navigate to the correct section in the English docs.

Code

<!-- In TRONMCPServer/FAQ.md: -->
Run `agent-wallet reset` to wipe and start over — see [CLI Reference → Reset](../../../Agent-Wallet/Developer/CLI-Reference.md#agent-wallet-reset-reset-all-data)

<!-- In zh-Hans CLI-Reference.md — anchor IS present: -->
<a id="agent-wallet-reset-reset-all-data"></a>
### `agent-wallet reset`(重置所有数据)

<!-- In English CLI-Reference.md — anchor is NOT present -->
### `agent-wallet reset` (Reset All Data)

Recommendation

Add the anchor tag to the English CLI-Reference.md at the Reset section heading:

<a id="agent-wallet-reset-reset-all-data"></a>

### `agent-wallet reset` (Reset All Data)

[MN-03] Docker Deployment (Option D) Missing Security Note About Agent Wallet Private Key

Property Value
Severity Minor
Category Security / Docs
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Option D

Description

The new Docker deployment option correctly uses --env-file and warns against passing secrets with -e KEY=value. However, the example .env.docker file only shows TRONGRID_API_KEY. The document does not mention that if users want write operations from a Docker container, they also need to provide AGENT_WALLET_PRIVATE_KEY (or another wallet credential) in the env file. The tip at the bottom says "Docker image is designed for read-only cloud deployments", but a user who does want to use Docker for write operations has no guidance on how to securely pass wallet credentials into the container (especially since the encrypted keystore approach requires mounting a volume to the container).

Code

# From Option D example:
cat > .env.docker << 'EOF'
TRONGRID_API_KEY=your-key-here
EOF

Recommendation

Add a note below the tip:

> To enable write operations in a Docker container, either:
> - Add `AGENT_WALLET_PRIVATE_KEY=<key>` to `.env.docker` (ensure the file is in `.gitignore`)
> - Mount the agent-wallet directory: add `-v ~/.agent-wallet:/root/.agent-wallet` and
>   pass `AGENT_WALLET_PASSWORD` in the env file
>
> The latter is preferred for production: it keeps the plaintext key off disk
> and uses the encrypted keystore.

[MN-04] exact_gasfree GasFree Account Activation Command Uses tsx Directly

Property Value
Severity Minor
Category Correctness / Docs
File docs/x402/core-concepts/network-and-token-support.md : GasFree Account Management section

Description

The GasFree account management commands reference npx tsx x402-payment/src/x402_invoke.ts directly. This assumes that the user has cloned the repository and is running from the project root. This context is not established at the point where the commands appear in the network-and-token-support reference page, which is a conceptual reference document, not a setup guide. Users reading this page without having set up the x402-payment skill locally would be confused. The path x402-payment/src/x402_invoke.ts also appears to be an implementation detail that may change.

Code

npx tsx x402-payment/src/x402_invoke.ts --gasfree-info
npx tsx x402-payment/src/x402_invoke.ts --gasfree-activate

Recommendation

Add a prerequisite note before the commands:

> The following commands require the `x402-payment` skill to be installed and
> run from its root directory. See the [Skills Quick Start](../../McpServer-Skills/SKILLS/QuickStart.md)
> for installation instructions.

Or, if the skill installs a CLI binary, update to use the binary name instead
of the `npx tsx` invocation.

[MN-05] quickstart-for-human.md Removes .env File Recommendation Without Replacement

Property Value
Severity Minor
Category Security / Docs
File docs/x402/getting-started/quickstart-for-human.md : Step Two

Description

The previous version included a :::tip recommending users create a .env file and add it to .gitignore:

💡 Recommended: Create a `.env` file in your project directory containing `TRON_PRIVATE_KEY=your_key`,
   then add `.env` to `.gitignore` to prevent accidental commits.

This recommendation was removed in the PR. The replacement is to export the variable directly and optionally persist it to the shell profile (which as noted in MJ-01, has its own risks). For developers building with the Python or TypeScript SDK, the .env file pattern (with dotenv / python-dotenv) is a common and appropriate pattern. Removing this guidance leaves a gap.

Code

- > 💡 **Recommended:** Create a `.env` file in your project directory containing `TRON_PRIVATE_KEY=your_key`,
-    then add `.env` to `.gitignore` to prevent accidental commits.

Recommendation

Re-add or update the .env guidance for SDK users:

> 💡 **Tip for SDK projects:** You can also store `AGENT_WALLET_PRIVATE_KEY` in a `.env`
> file in your project root (using `python-dotenv` or `dotenv` for Node.js), then add
> `.env` to `.gitignore` to prevent accidental commits.

[S-01] Suggestion: Consolidate Repeated "Fallback RPC Endpoint" Note

Property Value
Severity Suggestion
Category Quality / Docs
File docs/x402/getting-started/quickstart-for-agent.md, docs/x402/getting-started/quickstart-for-human.md, docs/x402/getting-started/quickstart-for-sellers.md

Description

The identical "Fallback RPC Endpoint" note block appears three times across the three quickstart files, with identical text about TRON_GRID_API_KEY fallback behavior and the BANK OF AI proxy. This is a documentation maintenance concern — if the fallback URL or behavior changes, it needs to be updated in three places. Consider extracting this into a Docusaurus admonition partial or linking from the quickstarts to a single canonical page that describes the fallback behavior.

Recommendation

Create a shared admonition partial (e.g., `_partials/_tron-rpc-fallback.mdx`) and
import it in all three quickstart files using Docusaurus's MDX import feature,
or add a cross-reference to a single canonical page.

[S-02] Suggestion: agent-wallet Skill Security Risk Rating in QuickStart

Property Value
Severity Suggestion
Category Docs
File docs/McpServer-Skills/SKILLS/QuickStart.md, docs/Openclaw-extension/QuickStart.md

Description

The security risk assessment tables now show agent-wallet as High Risk (Snyk) and Med Risk (Gen), while all other skills (except x402-payment) show no risk flags or lower ratings. This is displayed without any explanation. Users who are unfamiliar with security scanners may be confused or alarmed. A brief note explaining that the risk rating reflects the presence of cryptographic and key management dependencies (not a vulnerability) would improve user confidence.

Recommendation

Add a note after the security assessment table:

> ℹ️ The `agent-wallet` skill manages private keys and uses cryptographic libraries,
> which typically trigger higher scanner ratings. The warnings reflect the presence
> of sensitive-operation dependencies, not known vulnerabilities.

[S-03] Suggestion: i18n/zh-Hans sidebars.js Diverges from Root sidebars.js

Property Value
Severity Suggestion
Category Quality
File i18n/zh-Hans/docusaurus-plugin-content-docs/current/sidebars.js

Description

The diff shows that both sidebars.js (root) and the zh-Hans sidebars.js are modified independently to add the SUN CLI section. The two files appear to have slightly different structures (the zh-Hans one adds one extra item in the Skills intro). If this is intentional, that is fine, but maintaining two separate sidebar files risks drift over time. Docusaurus supports locale-specific sidebar overrides but it is worth confirming whether a single sidebar source of truth would be more maintainable.

Recommendation

Consider using Docusaurus's locale sidebar override mechanism and keeping
sidebar structure synchronized through a shared base, annotating any
intentional locale-specific differences with comments.

[S-04] Suggestion: New SUNCli CommandGuide.md Missing swap:exact-input Required Parameters Table

Property Value
Severity Suggestion
Category Docs
File docs/McpServer-Skills/Tools/SUNCli/CommandGuide.md : swap:exact-input section

Description

The swap:exact-input command documentation lists --router and --args as (required) in the description column, but unlike many other commands in the same file, it does not provide a usage example. The swap:quote-raw command is similarly missing an example. Given that these are low-level commands that developers are most likely to get wrong, adding a simple illustrative example would improve the reference.

Recommendation

Add a minimal example for swap:exact-input:

```bash
sun swap:exact-input \
  --router TRouterContractAddress \
  --args '[[...path], amountIn, amountOutMin, deadline]'

---

## Positive Observations

| Area | Observation |
|------|-------------|
| Security posture improvement | Removing all three plaintext wallet modes (TRON_PRIVATE_KEY, TRON_MNEMONIC, BSC_PRIVATE_KEY) and standardizing on AGENT_WALLET_PRIVATE_KEY with explicit guidance toward encrypted storage is a meaningful security improvement across the entire documentation set. |
| Consistent security messaging | Every new SUN CLI section includes a prominent `:::warning` or `:::caution` block about not hardcoding private keys, testnet-first advice, and the `--dry-run` pattern. The "caution" note about `-k`/`-m` flags in the CommandGuide global flags section is particularly well-placed. |
| Docker security guidance | The new Docker Option D explicitly warns against `-e KEY=value` and prescribes `--env-file`, which is the correct pattern. The warning callout is well-positioned directly after the command. |
| Privy integration documentation | The addition of `privy` wallet type is thoroughly documented across CLI reference, SDK guide, FAQ comparison table, and error hierarchy, in both English and Chinese. |
| Bilingual parity | The zh-Hans localisation is updated in sync with the English docs for all major changes, including error type names, wallet type comparisons, and Node.js version requirements. |
| Facilitator rate limiting documentation | The new rate limiting table in `facilitator.md` clearly communicates the differentiated anonymous vs authenticated limits and links to the Admin Portal for API key registration. |
| Tool count accuracy | The tool count update from 95 to 97 is applied consistently across all documents that mention it (Intro, ToolList, OfficialServerAccess, QuickStart). |

---

## Checklist Results

| Category | Items Checked | Pass | Fail | N/A | Notes |
|----------|:---:|:---:|:---:|:---:|-------|
| Correctness | 8 | 6 | 2 | 0 | Node.js version inconsistency in human quickstart; broken anchor in English CLI-Reference |
| Security | 10 | 7 | 3 | 0 | Raw key persistence without warning; key echo as success indicator; DB password in config example |
| Performance | 3 | 3 | 0 | 0 | Pagination present on all list commands; no unbounded queries documented |
| Code Quality | 8 | 6 | 0 | 2 | Repeated RPC fallback note (suggestion only); sidebar duplication (suggestion only) |
| Testing | 4 | 4 | 0 | 0 | N/A — documentation changes; example commands follow correct --dry-run / testnet-first advice |
| Documentation | 12 | 10 | 2 | 0 | Missing anchor tag in English CLI-Reference; GasFree commands lack context for reference page |
| Compatibility | 5 | 5 | 0 | 0 | Node.js 20 requirement consistently updated; Windows support noted with caveats |
| Observability | 3 | 3 | 0 | 0 | Log file guidance, health check endpoint, and tronscanUrl return value documented |

---

## Disclaimer

This is an automated code review. It supplements but does not replace human review.

---

*Report generated by Code Review Skill v1.0.0*
*Date: 2026-04-10*

@github-actions
Copy link
Copy Markdown

Audit Report: PR mainupdate-mcp-server

Generated: 2026-04-10
Repository: /app/reports/docs/pr/20260410-113350/code
PR Branches: remotes/origin/mainremotes/origin/update-mcp-server
Reviewer: Claude Sonnet 4.6 (automated audit)


1. PR Overview

Branch Info

Property Value
Source Branch update-mcp-server
Target Branch main
Total Commits 33
Files Changed 62
Lines Added ~4,189
Lines Removed ~755

Commit Summary (most recent first)

dee690c fix
f50ce16 change python-version
e24ac5c delete caution
71a3720 fix
a82086c add sun-cli
2d193a0 fix
174c30d add setup
d883416 update content
daea552 fix seller example
ffb5377 chang wallet mode
b3fc365 fix agent-wallet
05d402c add sunmcpserver
24bfe40 add inspect
37d478b update x402
408ec4b update x402,skills,agent-wallet,mcp-server
f7f440e adjust content
cc7feb9 add agent-wallet cli-reference
85c1a65 fix gasfree
... (and more)

Files Changed (key files)

File Change Type Lines +/-
docs/McpServer-Skills/Tools/SUNCli/CommandGuide.md New +860
docs/McpServer-Skills/Tools/SUNCli/FAQ.md New +133
docs/McpServer-Skills/Tools/SUNCli/Intro.md New +127
docs/McpServer-Skills/Tools/SUNCli/QuickStart.md New +147
docs/McpServer-Skills/SKILLS/BANKOFAISkill.md New +67
docs/x402/getting-started/quickstart-for-sellers.md Major update +264/-X
docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md Major update +115/-X
docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md Major update +71/-X
docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md Updated +41
docs/McpServer-Skills/MCP/SUNMCPServer/FAQ.md Updated +53
docs/Agent-Wallet/Developer/CLI-Reference.md Updated +89
docs/Agent-Wallet/Developer/SDK-Guide.md Updated +26
docs/Agent-Wallet/FAQ.md Updated +19
docs/Agent-Wallet/QuickStart.md Updated +8
docs/x402/core-concepts/network-and-token-support.md Updated +50
docs/x402/core-concepts/facilitator.md Updated +29
sidebars.js Updated +18
package.json Minor update +1/-1
(i18n/zh-Hans mirrors of all above) Mirrored various

2. Change Summary

2.1 New SUN CLI Documentation (Major New Feature)

Four new pages added under docs/McpServer-Skills/Tools/SUNCli/:

  • Intro.md — Overview comparing SUN CLI vs SUN MCP Server, output modes, supported networks, security notes
  • QuickStart.md — 5-step guide: install, first query, explore, wallet setup, execute swap
  • CommandGuide.md — Full command reference: wallet, price, token, swap, pool, liquidity, position, pair, farm, protocol, transaction, contract (~860 lines)
  • FAQ.md — Troubleshooting: installation, wallet configuration, common errors, AI agent integration

2.2 Wallet Architecture Migration

The MCP server docs (TRON, SUN) have been significantly updated to:

  • Remove three-way wallet mode support (AGENT_WALLET_PASSWORD, TRON_PRIVATE_KEY, TRON_MNEMONIC)
  • Consolidate to Agent Wallet as the only supported wallet system
  • Add AGENT_WALLET_PRIVATE_KEY import path as a secondary option for key import
  • Update error messaging ("Conflicting Wallet Modes" → "Wallet Not Found")
  • Update write-tool behavior: tools now always appear, availability checked at execution time

2.3 Node.js Version Bump

Updated minimum Node.js requirement from >=18 to >=20 across:

  • docs/Agent-Wallet/QuickStart.md
  • docs/Agent-Wallet/Developer/SDK-Guide.md
  • docs/Agent-Wallet/FAQ.md
  • docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md
  • docs/McpServer-Skills/Tools/SUNCli/QuickStart.md and FAQ.md
  • All i18n mirrors

2.4 Agent Wallet CLI Additions

docs/Agent-Wallet/Developer/CLI-Reference.md gains:

  • New agent-wallet init command documentation
  • New agent-wallet resolve-address command documentation
  • New --show-address flag for agent-wallet inspect
  • Non-interactive change-password flags (--password, --new-password, --save-runtime-secrets)
  • New --yes flag for agent-wallet remove
  • Example output snippets for sign msg and sign tx

2.5 Privy Wallet Support

Agent Wallet docs now document a third wallet type (privy):

  • FAQ comparison table extended to include privy
  • CLI-Reference includes a tip block describing Privy setup requirements
  • SDK-Guide error hierarchy adds PrivyConfigError, PrivyRequestError, PrivyRateLimitError, PrivyAuthError

2.6 x402 Protocol Updates

  • network-and-token-support.md adds exact_gasfree as a third payment scheme
  • facilitator.md adds Facilitator API endpoint table including /payments/{payment_id} and scoped query behavior
  • quickstart-for-sellers.md and quickstart-for-agent.md updated with YAML vs wire-protocol network identifier distinction (bsc:mainnet vs eip155:56)
  • sdk-features.md updated

2.7 Skills Documentation

  • New docs/McpServer-Skills/SKILLS/BANKOFAISkill.md — comprehensive skill catalog with skill-by-skill breakdowns, sample prompts, and safety warnings
  • SKILLS/QuickStart.md and SKILLS/Intro.md updated
  • sidebars.js updated with new TOOLS/SUN CLI section

2.8 i18n Mirrors

All English documentation changes are mirrored in i18n/zh-Hans/docusaurus-plugin-content-docs/current/. This roughly doubles the surface area of changes.


3. Detailed Findings

[MAJOR-01] package.json engines.node Not Updated to Match Documentation

Property Value
Severity Major
Category Correctness & Logic / Documentation Consistency
File package.json : Line 55

Description:
The documentation throughout this PR explicitly raises the Node.js minimum requirement from >=18 to >=20. The package.json engines field, however, still specifies "node": ">=18". This creates an inconsistency: the toolchain itself advertises Node 18 compatibility, but all documentation and user-facing guides now require Node 20. Developers following the docs will set up Node 20; contributors or CI pipelines relying on package.json may use Node 18 and experience unexpected behavior if the project's own build tooling relies on Node 20 features.

Code:

"engines": {
  "node": ">=18",
  "yarn": ">=1.22"
}

Recommendation:
Update package.json engines to "node": ">=20" to align with all documentation changes in this PR.


[MAJOR-02] Security Risk: echo $AGENT_WALLET_PRIVATE_KEY Leaks Private Key in Documentation

Property Value
Severity Major
Category Security — Sensitive Data / Input Validation
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Lines 103-107; docs/McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md : lines ~98-102; docs/x402/getting-started/quickstart-for-agent.md : Lines 68-72

Description:
Multiple documentation sections instruct users to verify their private key is set by running echo $AGENT_WALLET_PRIVATE_KEY. This command prints the raw private key to the terminal — including shell history, terminal scrollback, and any screen-sharing or pair-programming sessions. This is contrary to security best practices for sensitive credential verification.

The SUN CLI FAQ correctly demonstrates a safe verification pattern ([[ -n "$AGENT_WALLET_PASSWORD" ]] && echo "Password is set"), but the TRON/SUN MCP deployment guides and the x402 quickstart-for-agent do not follow this pattern.

Code (from TRON LocalPrivatizedDeployment.md):

Verify the environment variable is set:

```bash
echo $AGENT_WALLET_PRIVATE_KEY

**Code (from quickstart-for-agent.md):**
```bash
echo $AGENT_WALLET_PRIVATE_KEY

Success indicator: The terminal prints your private key string (not blank)

Recommendation:
Replace all echo $AGENT_WALLET_PRIVATE_KEY verification examples with a safe, non-revealing check:

# Safe verification — confirms the variable is set without revealing the value
[[ -n "$AGENT_WALLET_PRIVATE_KEY" ]] && echo "Private key is set" || echo "Private key NOT set"

Additionally, add a security caution note explaining why printing the key is discouraged in shared or logged environments.


[MAJOR-03] Inconsistency: TRON MCP FAQ References AGENT_WALLET_PASSWORD for Path 2 (Private Key Import), but AGENT_WALLET_PRIVATE_KEY is the Correct Variable

Property Value
Severity Major
Category Correctness & Logic — API Contract
File docs/McpServer-Skills/MCP/TRONMCPServer/FAQ.md : Lines 54-57

Description:
The TRON MCP Server FAQ section "Write tools appear but return 'Wallet not configured' error" instructs users to "Set AGENT_WALLET_PASSWORD environment variable with your master password." This only covers the encrypted keystore path (Path 1). The LocalPrivatizedDeployment.md introduced a second path — importing a private key via AGENT_WALLET_PRIVATE_KEY — but the FAQ was not updated to mention this option. A user who followed Path 2 (private key import) and hits this error would be given incorrect guidance.

Code:

To enable write operations, configure [Agent Wallet](../../../Agent-Wallet/Intro.md):

- Set `AGENT_WALLET_PASSWORD` environment variable with your master password
- Optionally set `AGENT_WALLET_DIR` if using a custom wallet directory

Recommendation:
Update the FAQ to list both wallet credential options:

  • AGENT_WALLET_PASSWORD — for encrypted keystore wallets
  • AGENT_WALLET_PRIVATE_KEY — for raw private key import

Mirror the same fix in the equivalent SUN MCP FAQ section.


[MAJOR-04] Broken/Inconsistent Internal Link Patterns: Mixed .md-Suffixed and Non-Suffixed Links

Property Value
Severity Major
Category Documentation & Maintainability
File Multiple files

Description:
The diff shows a systematic conversion of internal links from bare paths (e.g., [Agent-Wallet FAQ](../../../Agent-Wallet/FAQ)) to .md-suffixed paths (e.g., [Agent-Wallet FAQ](../../../Agent-Wallet/FAQ.md)). This conversion is incomplete — the BANKOFAISkill.md file and some Skills pages use bare paths without .md extensions in their cross-references. In Docusaurus, both forms can work depending on configuration, but inconsistency within a single PR is a quality concern and may cause build warnings or failures depending on the strict mode settings.

Examples of remaining non-suffixed links in newly added files:

  • BANKOFAISkill.md line 37: [Quick Start](./QuickStart.md#...) — this one uses .md (OK)
  • BANKOFAISkill.md line 323: [FAQ](./Faq.md) — note casing: Faq.md vs the likely actual filename FAQ.md

Code (BANKOFAISkill.md line 323-325):

- Running into issues? → [FAQ](./Faq.md)

Recommendation:
Verify the actual filename for the SKILLS FAQ (likely FAQ.md not Faq.md) and fix the casing. Perform a consistency audit of all internal links in new files to ensure they resolve correctly, especially on case-sensitive Linux filesystems.


[MINOR-01] SUN CLI FAQ: AGENT_WALLET_MNEMONIC Environment Variable Mentioned but Not Documented Elsewhere

Property Value
Severity Minor
Category Documentation & Maintainability — Missing Docs
File docs/McpServer-Skills/Tools/SUNCli/FAQ.md : Lines 29-33

Description:
The SUN CLI FAQ lists three wallet credential sources: AGENT_WALLET_PRIVATE_KEY, AGENT_WALLET_MNEMONIC, and AGENT_WALLET_PASSWORD. However, AGENT_WALLET_MNEMONIC is not mentioned anywhere in the MCP server deployment guides, the Agent Wallet documentation, or the quickstart guides in this PR. This creates an undocumented public API surface. Users may attempt to use it and find no guidance for the expected format (BIP-39 mnemonic phrase) or behavior.

Code:

Write operations (swap, liquidity, contract send) require a wallet. Set exactly one wallet source:

- `AGENT_WALLET_PRIVATE_KEY` — direct private key
- `AGENT_WALLET_MNEMONIC` — mnemonic phrase
- `AGENT_WALLET_PASSWORD` — encrypted wallet via agent-wallet

Recommendation:
Either document AGENT_WALLET_MNEMONIC in the Agent Wallet CLI Reference and deployment guides (including format, derivation path behavior), or remove it from the SUN CLI FAQ if it is not yet supported. Consistency with other docs is essential to avoid user confusion.


[MINOR-02] SUN CLI CommandGuide: --network Flag Used Post-Subcommand in Example (Known Parser Behavior Not Explained Consistently)

Property Value
Severity Minor
Category Documentation & Maintainability
File docs/McpServer-Skills/Tools/SUNCli/FAQ.md : Lines 49-56; docs/McpServer-Skills/Tools/SUNCli/CommandGuide.md : Line 55

Description:
The SUN CLI FAQ correctly explains that --network must appear before the subcommand. However, the CommandGuide section on global flags includes an example:

sun -k your_private_key --network nile --yes swap TRX USDT 1000000

This example places --network before the subcommand — which is correct — but the FAQ description of the same issue says --network as a subcommand-level flag is wrong, without clearly explaining it's a root-level only flag. Some users will be confused. The CommandGuide also does not reinforce this constraint.

Recommendation:
Add a prominent note in the CommandGuide's Global Flags section that all root-level flags must appear before the subcommand. This is described in the FAQ but should also appear where the flags are defined.


[MINOR-03] quickstart-for-agent.md: Private Key Stored in Shell Profile Without Warning About Shell History

Property Value
Severity Minor
Category Security — Sensitive Data
File docs/x402/getting-started/quickstart-for-agent.md : Lines 59-64

Description:
The guide recommends persisting AGENT_WALLET_PRIVATE_KEY by appending to .zshrc/.bashrc using:

echo 'export AGENT_WALLET_PRIVATE_KEY=your_key' >> ~/.zshrc

While the guide does say "Keep your private key only in local environment variables or a .env file", it doesn't mention that the echo command itself (with the literal key as an argument) will be saved to the shell history file. A malicious process or attacker with access to shell history (.bash_history, .zsh_history) can extract the key.

Recommendation:
Add a note to use a text editor to manually add the export line to .zshrc/.bashrc, rather than using echo with the key as an argument. For example:

# Open your shell config in a text editor instead
nano ~/.zshrc
# Add this line manually: export AGENT_WALLET_PRIVATE_KEY=your_key

[MINOR-04] BANKOFAISkill.md: Emoji Used in Section Headers

Property Value
Severity Minor
Category Code Quality — Naming / Style
File docs/McpServer-Skills/SKILLS/BANKOFAISkill.md : Line 28

Description:
The new BANKOFAISkill.md includes emoji in a section header:

### 🔑 Where Do I Get These Keys? How Do I Set Them Up?

While not a technical defect, emoji in section headers can cause issues: they may not render correctly in all contexts (RSS feeds, screen readers, some PDF exports), and they can interfere with anchor link generation in static site generators (Docusaurus may generate anchors like --where-do-i-get-these-keys). This is inconsistent with the coding style of the rest of the documentation.

Recommendation:
Remove the emoji from the section header or confirm that Docusaurus handles anchor generation correctly with emoji, and that it aligns with the project's style guide.


[MINOR-05] Redundant Paragraph in TRONMCPServer/LocalPrivatizedDeployment.md

Property Value
Severity Minor
Category Code Quality — Duplication
File docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md : Lines 53-57

Description:
The "Agent Wallet" section header is immediately followed by a redundant paragraph that repeats the same information already stated in the table above it:

TRON MCP Server uses [Agent Wallet] for wallet management. Private keys are encrypted and stored on local disk, never exposed as plaintext in environment variables. Even if environment variables are leaked, the attacker still needs the encrypted keystore file to access funds. Agent Wallet also supports multi-wallet management and runtime wallet switching via the `select_wallet` tool.

The same text was present in the preceding sentence: "TRON MCP Server uses Agent Wallet for secure wallet management." This duplication adds length without adding clarity.

Recommendation:
Consolidate the introductory paragraph and table. The security explanation can be retained once, ideally in a callout block rather than repeated inline text.


[SUGGESTION-01] quickstart-for-sellers.md: No Step to Verify Facilitator is Running Before Starting API Server

Property Value
Severity Suggestion
Category Documentation & Maintainability — User Experience
File docs/x402/getting-started/quickstart-for-sellers.md

Description:
The self-hosted Facilitator tab in the quickstart guide instructs users to install and configure the Facilitator in Step 3, but does not include a verification step (e.g., curl http://localhost:8001/health) before proceeding to start the API server in Step 2. Because Step 2 is introduced before Step 3, a user who follows steps in order will start the API server pointing at a Facilitator that isn't running yet, leading to confusing connection errors.

Recommendation:
Reorder the steps so Facilitator setup precedes API server startup, or add an explicit "Verify Facilitator is running" step with a curl /health check before the API server is started.


[SUGGESTION-02] SUNCli/CommandGuide.md: Missing Documentation for --dry-run Flag Behavior

Property Value
Severity Suggestion
Category Documentation & Maintainability
File docs/McpServer-Skills/Tools/SUNCli/CommandGuide.md : Lines 27, 59

Description:
The --dry-run flag is listed in the global flags table with the description "Print intent without sending the write action." However, the CommandGuide does not include any example of --dry-run output in the write command sections (swap, liquidity, contract send). Users trying to use dry-run for the first time will not know what to expect.

Recommendation:
Add a concrete --dry-run output example for at least one major write command (e.g., sun --dry-run swap TRX USDT 1000000) showing what the intent preview looks like.


[SUGGESTION-03] Agent-Wallet/FAQ.md: Windows Support Claim Should Reference Minimum Version

Property Value
Severity Suggestion
Category Documentation & Maintainability
File docs/Agent-Wallet/FAQ.md : Lines ~141-143

Description:
The FAQ now states "Windows support was added in v2.3.x." However, no corresponding note is added to the Quick Start or SDK Guide pages that were also updated in this PR. Users discovering Windows support via those entry points will have no version context.

Recommendation:
Add a brief note in QuickStart.md and SDK-Guide.md that Windows support requires v2.3.x or later, pointing to the FAQ for more details.


[SUGGESTION-04] sidebars.js and i18n/.../sidebars.js: TOOLS Section Should Align Category Label Casing

Property Value
Severity Suggestion
Category Code Quality — Naming Consistency
File sidebars.js : Lines 146-163

Description:
The new TOOLS category uses all-caps 'TOOLS' for the label, while sibling categories use mixed case: 'MCP Server', 'SKILLS'. The inconsistency (TOOLS vs SKILLS — one is all-caps, the other is also all-caps, but MCP Server is not) may be intentional for display purposes, but it is worth confirming the style is deliberate.

Recommendation:
Confirm whether the label casing in sidebars.js is intentional, and if so document the convention to keep future additions consistent.


4. Positive Observations

  1. Strong Security Messaging Throughout: The SUN CLI documentation consistently includes :::caution blocks warning about private key exposure via CLI flags. The CommandGuide explicitly advises preferring environment variables or encrypted agent-wallet storage over -k/--private-key. The security principles callout in TRONMCPServer/LocalPrivatizedDeployment.md is prominent and clear.

  2. Excellent Coverage of New SUN CLI Tool: The four new SUN CLI docs (Intro, QuickStart, CommandGuide, FAQ) are comprehensive and well-structured. The CommandGuide (~860 lines) is thorough and well-organized by category. The comparison table between SUN CLI and SUN MCP Server in Intro.md is a useful navigational aid.

  3. Architectural Simplification is Well-Motivated: Removing the three-way wallet mode (Agent Wallet / Private Key / Mnemonic) in favor of a single Agent Wallet system is a sound security improvement. The migration is clearly communicated in both the deployment guides and FAQ, with useful migration instructions.

  4. Consistent i18n Mirroring: All English documentation changes are mirrored in the Chinese (zh-Hans) translation directory. This is a significant maintenance effort that ensures users of both language variants receive up-to-date information simultaneously.

  5. Good Use of Docusaurus Admonitions: The PR makes good use of :::tip, :::caution, :::danger, and :::info blocks to call out important security considerations, recommended paths, and edge cases at appropriate levels of urgency.

  6. Privy Wallet Documentation is Well-Segregated: The Privy wallet type additions in CLI-Reference and FAQ are additive and non-breaking. The tip blocks clearly explain what Privy is and when to use it, without burying it in the main flow.

  7. Link Consistency Improvement: The systematic update from bare paths to .md-suffixed paths in cross-references improves portability and is consistent with Docusaurus best practices for explicit file references.

  8. exact_gasfree Scheme is Clearly Documented: The new payment scheme is well-explained with its key differentiators (zero gas cost for buyers, TRON-only, routed via BANK OF AI facilitator) and includes CLI management commands for GasFree account activation.


5. Checklist Results

Category Status Notes
A. Correctness & Logic ⚠️ Issues Found Node.js version mismatch in package.json; FAQ references wrong env var for Path 2
B. Security ⚠️ Issues Found echo $AGENT_WALLET_PRIVATE_KEY pattern reveals key; echo '...key...' in profile setup goes to shell history
C. Performance ✅ Pass Documentation only; no performance concerns
D. Code Quality ⚠️ Minor Issues Faq.md case issue; redundant paragraph; emoji in header; AGENT_WALLET_MNEMONIC undocumented
E. Testing N/A Documentation PR; no test coverage concerns
F. Documentation & Maintainability ⚠️ Minor Issues Inconsistent link styles; incomplete Windows version context; step ordering in seller quickstart

6. Review Verdict

Verdict: Request Changes

Rationale

This PR is a substantial, well-organized documentation update that introduces a new major tool (SUN CLI), documents a meaningful architectural change (single-wallet-mode consolidation), and keeps both English and Chinese documentation in sync. The quality of the new SUN CLI documentation is high.

However, the PR has two issues that should be fixed before merge:

  1. [MAJOR-01]: The package.json engines.node field is not updated to >=20, creating a verifiable inconsistency between the toolchain definition and all user-facing documentation. This may cause CI/CD or contributor environment issues.

  2. [MAJOR-02]: The echo $AGENT_WALLET_PRIVATE_KEY verification pattern is a real security risk in user-facing documentation. Multiple new pages instruct users to print their private key to the terminal as a setup verification step. This pattern should be replaced with a safe non-revealing check.

  3. [MAJOR-03]: The TRON MCP FAQ's guidance for "Wallet not configured" errors only mentions AGENT_WALLET_PASSWORD but not the newly-introduced AGENT_WALLET_PRIVATE_KEY path, leaving Path 2 users with incorrect troubleshooting steps.

The [MAJOR-04] link casing issue (Faq.md vs FAQ.md) should also be confirmed, as it may cause a 404 on case-sensitive file systems (Linux production environments).

Once these issues are addressed, this PR is ready to merge.

@Will-Guan Will-Guan merged commit a932d7e into main Apr 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants