← Back to Skills Marketplace
0xlucasliao

bnbchain

by 0xlucasliao · GitHub ↗ · vv1.0.2
cross-platform ✓ Security Clean
432
Downloads
0
Stars
1
Active Installs
4
Versions
Install in OpenClaw
/install bnbchain
Description
Interact with the BNB Chain Model Context Protocol (MCP) server. Blocks, contracts, tokens, NFTs, wallet, Greenfield, and ERC-8004 agent tools. Use npx @bnb-...
README (SKILL.md)

BNB Chain MCP Skill

This skill allows you to interact with the BNB Chain MCP server to retrieve data and perform actions on BNB Chain and other EVM-compatible networks.


Before you install

  • Credentials: Signing keys and RPC endpoints are supplied by you (see Credentials and environment below). Never paste private keys into a UI or an env var you don’t control. To reduce risk, agents can generate their own wallet (and use it for registration or testnet actions) instead of using an existing user wallet. Ask the skill author or documentation how they are stored and who can access them.
  • Install mechanism: Use npx @bnb-chain/mcp@latest to run the MCP server; it fetches from the npm registry at runtime. If you prefer to audit first, install the package locally and review the source code before use.
  • Read-only vs state-changing: Many tools are read-only (blocks, balances, contract reads). Tools such as transfer_*, write_contract, approve_token_spending, and ERC-8004 registration require a PRIVATE_KEY and perform on-chain transactions. If you want read-only use only, do not supply a private key and avoid invoking state-changing tools.
  • Sandbox and testnet: Run in a restricted environment when possible. Use a testnet wallet with no mainnet funds when testing transactions or registration.
  • Install manifest and env: Required and optional environment variables are listed below. Verify there is no hidden credential collection; the MCP server uses only the env you explicitly provide (e.g. in your MCP client config).

1. How to connect

Use npx @bnb-chain/mcp@latest to connect to the BNB Chain MCP server.


2. Credentials and environment

  • RPC / network: The MCP server uses public or configured RPC endpoints for supported chains (BSC, opBNB, Greenfield, etc.). You do not need to supply RPC URLs for default chains unless you self-host or override.
  • Private key (optional): State-changing tools (transfer_native_token, transfer_erc20, transfer_nft, write_contract, register_erc8004_agent, set_erc8004_agent_uri, Greenfield writes, etc.) require a PRIVATE_KEY in the environment where the MCP server runs (e.g. in your Cursor/Claude MCP config). The key is used only to sign transactions; it is not stored or logged by the server. If PRIVATE_KEY is not set, those tools will fail; read-only tools (get block, get balance, read_contract, etc.) work without it.
  • Where to set: Configure PRIVATE_KEY in the same place you configure the MCP server (e.g. env in mcpServers.bnbchain-mcp in your client’s config). Never commit keys to version control or share them with untrusted parties.
  • Summary: No credentials are required for read-only use. For transfers, contract writes, or agent registration, you must supply PRIVATE_KEY in the MCP server’s environment; the agent or client does not collect or store it beyond what you configure.

3. Agent registration

First: Register yourself on-chain using the MCP tool register_erc8004_agent (see ERC-8004 Agent tools below). Then owners can check registration on the scan site:


4. Available Prompts and Tools

(From BNBChain MCP README.)

Prompts

Name Description
analyze_block Analyze a block and provide detailed information about its contents
analyze_transaction Analyze a specific transaction
analyze_address Analyze an EVM address
interact_with_contract Get guidance on interacting with a smart contract
explain_evm_concept Get an explanation of an EVM concept
compare_networks Compare different EVM-compatible networks
analyze_token Analyze an ERC20 or NFT token
how_to_register_mcp_as_erc8004_agent Get guidance on registering an MCP server as an ERC-8004 agent

Tools

Read-only tools (no PRIVATE_KEY needed): block/transaction/balance/contract-read queries, get_*, read_contract, is_contract, etc. State-changing tools (require PRIVATE_KEY in env): transfer_*, approve_token_spending, write_contract, ERC-8004 register/set_uri, Greenfield create/upload/delete, etc.

Network parameter

Most EVM tools accept network (e.g. bsc, opbnb, ethereum, base). Use get_supported_networks to list options.

  • Read-only tools (blocks, balances, contract reads, get_chain_info, etc.): network is optional; default is bsc.
  • Write operations (transfer_native_token, transfer_erc20, transfer_nft, transfer_erc1155, approve_token_spending, write_contract, register_erc8004_agent, set_erc8004_agent_uri, Greenfield writes): network is REQUIRED. There is no default for writes. If the user does not specify the network, you MUST ask before calling the tool. Do not assume or default to mainnet (bsc); accidental mainnet execution causes irreversible financial loss.
Name Description
get_block_by_hash Get a block by hash
get_block_by_number Get a block by number
get_latest_block Get the latest block
get_transaction Get detailed information about a specific transaction by its hash
get_transaction_receipt Get a transaction receipt by its hash
estimate_gas Estimate the gas cost for a transaction
transfer_native_token Transfer native tokens (BNB, ETH, MATIC, etc.) to an address
approve_token_spending Approve another address to spend your ERC20 tokens
transfer_nft Transfer an NFT (ERC721 token) from one address to another
transfer_erc1155 Transfer ERC1155 tokens to another address
transfer_erc20 Transfer ERC20 tokens to an address
get_address_from_private_key Get the EVM address derived from a private key
get_chain_info Get chain information for a specific network
get_supported_networks Get list of supported networks
resolve_ens Resolve an ENS name to an EVM address
is_contract Check if an address is a smart contract or an EOA
read_contract Read data from a smart contract (view/pure function)
write_contract Write data to a smart contract (state-changing function)
get_erc20_token_info Get ERC20 token information
get_native_balance Get native token balance for an address
get_erc20_balance Get ERC20 token balance for an address
get_nft_info Get detailed information about a specific NFT
check_nft_ownership Check if an address owns a specific NFT
get_erc1155_token_metadata Get the metadata for an ERC1155 token
get_nft_balance Get the total number of NFTs owned by an address from a specific collection
get_erc1155_balance Get the balance of a specific ERC1155 token ID owned by an address

ERC-8004 Agent tools

Register and resolve AI agents on the ERC-8004 Identity Registry. Supported networks: BSC (56), BSC Testnet (97), Ethereum, Base, Polygon, and their testnets where the official registry is deployed. The agentURI should point to a JSON metadata file following the Agent Metadata Profile.

Name Description
register_erc8004_agent Register yourself on the ERC-8004 Identity Registry (do this before checking the scan site); returns agent ID
set_erc8004_agent_uri Update the metadata URI for an existing ERC-8004 agent (owner only)
get_erc8004_agent Get agent info (owner and tokenURI) from the Identity Registry
get_erc8004_agent_wallet Get the verified payment wallet for an agent (for x402 / payments)

Greenfield tools

Name Description
gnfd_get_bucket_info Get detailed information about a specific bucket
gnfd_list_buckets List all buckets owned by an address
gnfd_create_bucket Create a new bucket
gnfd_delete_bucket Delete a bucket
gnfd_get_object_info Get detailed information about a specific object
gnfd_list_objects List all objects in a bucket
gnfd_upload_object Upload an object to a bucket
gnfd_download_object Download an object from a bucket
gnfd_delete_object Delete an object from a bucket
gnfd_create_folder Create a folder in a bucket
gnfd_get_account_balance Get the balance for an account
gnfd_deposit_to_payment Deposit funds into a payment account
gnfd_withdraw_from_payment Withdraw funds from a payment account
gnfd_disable_refund Disable refund for a payment account (IRREVERSIBLE)
gnfd_get_payment_accounts List all payment accounts owned by an address
gnfd_get_payment_account_info Get detailed information about a payment account
gnfd_create_payment Create a new payment account
gnfd_get_payment_balance Get payment account balance

5. Safety and best practices

  1. Confirm before sending transactions: For transfer_*, write_contract, or approve_token_spending, confirm recipient, amount, and network before calling the tool.
  2. Network required for writes: For any write (transfers, write_contract, approve_token_spending, ERC-8004 register/set_uri, Greenfield writes), you MUST have an explicit network from the user. If not specified, ask — do not default to mainnet. Do not use advisory language like "prefer testnet" as a substitute; the constraint is: no network specified → do not call the write tool until the user confirms.
  3. Private keys: Only in MCP server env; never in chat or logs.
Usage Guidance
This skill appears to do what it says, but exercise standard caution: 1) Audit the npm package (https://github.com/bnb-chain/bnbchain-mcp) or install it locally rather than blindly running npx @bnb-chain/mcp@latest; runtime package fetches can run arbitrary code. 2) For any state-changing operation you will need to provide a PRIVATE_KEY — never paste or upload your mainnet private key to an environment you don't control. Prefer a testnet or ephemeral wallet and confirm the network before signing transactions. 3) Consider pinning a specific package version and reviewing the source for any unexpected logging/transmission of secrets. 4) When in doubt, run the MCP server in a sandboxed environment and inspect network activity and logs before using real funds.
Capability Analysis
Type: OpenClaw Skill Name: bnbchain Version: v1.0.2 The skill bundle is designed to interact with blockchain networks, which inherently involves sensitive operations like transferring funds and managing private keys. However, the `SKILL.md` provides extensive safety instructions for the AI agent, explicitly guiding it to confirm transactions, require explicit network selection for write operations (to prevent accidental mainnet transactions), and handle private keys securely via environment variables for the MCP server, not directly by the agent or in logs. There are no instructions for data exfiltration, unauthorized execution, or any other malicious activity. The use of `npx @bnb-chain/mcp@latest` is a standard way to invoke a Node.js tool, and the skill bundle itself does not introduce a supply chain attack, but rather points to a dependency.
Capability Assessment
Purpose & Capability
Name/description (BNB Chain MCP) match the runtime instructions: the SKILL.md documents read-only queries and state-changing actions on BNB/EVM networks. No unrelated credentials or unrelated binaries are requested. Requiring a private key for state-changing actions is expected for this class of skill.
Instruction Scope
Instructions stay within the MCP domain: how to run the MCP client via npx, which tools are read-only vs state-changing, and when PRIVATE_KEY is needed. The doc repeatedly warns not to paste keys and to use testnet. It also claims the server "does not store or log" PRIVATE_KEY — that's a developer claim you should verify by auditing the package source before supplying a key.
Install Mechanism
There is no registry install spec in the skill bundle; the SKILL.md tells users to run npx @bnb-chain/mcp@latest which pulls the package from npm at runtime. Fetching and executing code at runtime is a moderate risk — acceptable for developer tooling but you should audit the npm package (or install locally) before running, and consider pinning to a specific version.
Credentials
No environment variables are required for read-only use. PRIVATE_KEY is documented as optional and only necessary for state-changing operations — this is proportional. The skill does not request unrelated secrets or multiple unrelated credentials. Users must take care to provide keys only in secure, controlled envs and preferably use testnet wallets for trials.
Persistence & Privilege
Skill does not request persistent privileges: always:false, no install spec, and no files included. It does not attempt to modify other skills or system-wide configs. Runtime use of npx will create local npm cache artifacts as normal but the skill itself requests no persistent platform privileges.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install bnbchain
  3. After installation, invoke the skill by name or use /bnbchain
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
vv1.0.2
- Added documentation about the required usage of the `network` parameter for write operations, including safety instructions to prevent accidental execution on mainnet. - Clarified that for write tools, `network` is REQUIRED and there is no default; users must be prompted if it is not specified. - Included a note that read-only tools default to `bsc` for the `network` parameter, while write actions require explicit network choice. - Provided guidance to use `get_supported_networks` to discover available network options.
v1.0.2
- Documentation updated in SKILL.md to clarify installation instructions. - Install mechanism section now emphasizes the use of `npx @bnb-chain/mcp@latest` and local audit option. - Removed duplicate or redundant version pinning advice. - No functional or behavioral changes to the skill—documentation only.
v1.0.1
- Added extensive information about handling credentials, installation methods, and private key safety. - Clarified which tools are read-only versus state-changing and when a PRIVATE_KEY is required. - Provided security best practices for using the skill in sandboxed or testnet environments. - Included a detailed section on configuring environment variables, emphasizing safe handling and privacy. - Recommended pinning package versions or reviewing source code before use for improved security.
v1.0.0
- Initial release of the BNB Chain MCP skill, version 1.0.3. - Enables interaction with the BNB Chain Model Context Protocol (MCP) server for accessing data and tools across BNB Chain and EVM-compatible networks. - Provides tools for blocks, transactions, contracts, tokens (ERC20, ERC721, ERC1155), NFTs, wallet management, and Greenfield storage operations. - Includes support for registering and managing ERC-8004 AI agents on various supported networks. - Detailed documentation of available prompts and tools included for developer reference.
Metadata
Slug bnbchain
Version v1.0.2
License
All-time Installs 1
Active Installs 1
Total Versions 4
Frequently Asked Questions

What is bnbchain?

Interact with the BNB Chain Model Context Protocol (MCP) server. Blocks, contracts, tokens, NFTs, wallet, Greenfield, and ERC-8004 agent tools. Use npx @bnb-... It is an AI Agent Skill for Claude Code / OpenClaw, with 432 downloads so far.

How do I install bnbchain?

Run "/install bnbchain" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is bnbchain free?

Yes, bnbchain is completely free (open-source). You can download, install and use it at no cost.

Which platforms does bnbchain support?

bnbchain is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created bnbchain?

It is built and maintained by 0xlucasliao (@0xlucasliao); the current version is vv1.0.2.

💬 Comments