bnbchain-mcp
Original:🇺🇸 English
Translated
BNB Chain MCP server connection and tool usage. Covers npx @bnb-chain/mcp@latest, PRIVATE_KEY and RPC, and every MCP tool — blocks, transactions, contracts, ERC20/NFT transfers, wallet, ERC-8004 agent registration, Greenfield. Use when connecting to bnbchain-mcp, querying or transacting on BNB Chain/opBNB/EVM, registering as ERC-8004 agent, or using Greenfield.
19installs
Added on
NPX Install
npx skill4agent add bnb-chain/bnbchain-skills bnbchain-mcpTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →BNB Chain MCP Skill
How to connect to the BNB Chain MCP server and use its tools: blocks, transactions, contracts, tokens, NFTs, wallet, ERC-8004 agents, and Greenfield. Use this skill when working with BNB Chain / opBNB / EVM or Greenfield via MCP.
Connection and credentials
- Run the server: (fetches from npm at runtime). Source: github.com/bnb-chain/bnbchain-mcp.
npx @bnb-chain/mcp@latest - RPC: Default chains use built-in RPC; no config unless self-hosting or custom RPC.
- PRIVATE_KEY: Omit or leave empty for read-only (blocks, balances, contract reads). Set in the MCP server for state-changing tools (transfers,
env,write_contract, ERC-8004 register/set_uri, Greenfield writes). Never log or expose private keys.approve_token_spending - Read-only vs state-changing: Block/balance/contract-read tools work without a key; transfers and writes require in the server environment.
PRIVATE_KEY
1. MCP server config
Add the server to the MCP client config (e.g. Cursor MCP settings, Claude Desktop ).
bnbchain-mcpclaude_desktop_config.jsonDefault (stdio):
json
{
"mcpServers": {
"bnbchain-mcp": {
"command": "npx",
"args": ["-y", "@bnb-chain/mcp@latest"],
"env": {
"PRIVATE_KEY": ""
}
}
}
}SSE mode: (and client SSE URL if required). Local dev server (e.g. in bnbchain-mcp): with the same .
"args": ["-y", "@bnb-chain/mcp@latest", "--sse"]bun dev:sse"url": "http://localhost:3001/sse"envRestart or reload the MCP client after changing config so the server starts.
2. Credentials and environment
- RPC: Built-in for default chains.
- PRIVATE_KEY: Set in the server’s when state-changing tools are needed; leave empty for read-only. Do not commit or echo keys.
env
3. Agent registration (ERC-8004)
- Register the agent on-chain with the MCP tool (see references/erc8004-tools-reference.md).
register_erc8004_agent - Owners can then check registration on 8004scan (mainnet) or 8004scan (testnet).
4. Quick reference — tools and prompts
Network parameter
Most EVM tools accept (optional): chain name or ID, e.g. , , , . Default is . Use to list supported networks.
networkbscopbnbethereumbasebscget_supported_networksTool categories
| Category | Examples | Needs PRIVATE_KEY? |
|---|---|---|
| Blocks | | No |
| Transactions | | No (estimate only) |
| Network | | No |
| Wallet / balance | | Balance: optional address or privateKey |
| Transfers / writes | | Yes |
| Contracts | | No for read |
| Tokens / NFT | | No for read |
| ERC-8004 | | Register/set_uri: Yes |
| Greenfield | | Writes: Yes |
Prompts (MCP prompts)
Use the MCP prompt names when the user wants analysis or guidance:
- analyze_block — Analyze a block and its contents
- analyze_transaction — Analyze a specific transaction
- analyze_address — Analyze an EVM address
- interact_with_contract — Guidance on interacting with a smart contract
- explain_evm_concept — Explain an EVM concept
- compare_networks — Compare EVM-compatible networks
- analyze_token — Analyze an ERC20 or NFT token
- how_to_register_mcp_as_erc8004_agent — Guidance on registering MCP as ERC-8004 agent
5. Reference files (per-tool usage)
For parameter names, examples, and detailed usage of each tool, use:
| Reference | Content |
|---|---|
| references/evm-tools-reference.md | Blocks, transactions, network, wallet, contracts, tokens, NFT — all EVM tools |
| references/erc8004-tools-reference.md | register_erc8004_agent, set_erc8004_agent_uri, get_erc8004_agent, get_erc8004_agent_wallet |
| references/greenfield-tools-reference.md | Buckets, objects, folders, payment accounts — all Greenfield tools |
| references/prompts-reference.md | All MCP prompts and when to use them |
6. Safety and best practices
- Confirm before sending transactions: For ,
transfer_*, orwrite_contract, confirm recipient, amount, and network before calling the tool.approve_token_spending - Prefer testnet when the network is unspecified for writes or agent registration.
- Private keys: Only in MCP server ; never in chat or logs.
env - ERC-8004 agentURI: JSON metadata per the Agent Metadata Profile (name, description, image, services e.g. MCP endpoint).
Documentation links
- BNB Chain MCP repo: https://github.com/bnb-chain/bnbchain-mcp
- npm:
npx @bnb-chain/mcp@latest - ERC-8004 (Identity Registry); Agent Metadata Profile for agentURI format.