跳到正文
Skillpedia
连接器(MCP)7.0k · #13617

bnbchain-mcp

它能做什么

这项技能展示如何将 AI 工具连接到 BNB Chain MCP 服务器,它为智能体提供用于 BNB Chain、opBNB 和其他 EVM 网络的工具。它涵盖只读的区块链查询,以及需要私钥的状态变更操作。

适用场景

  • ✓当你希望 AI 工具在 BNB Chain 上查询区块、余额或合约数据的时候。
  • ✓当你需要智能体在 BNB Chain 上发送代币或写入合约时。
  • ✓当你想通过 MCP 注册智能体身份或使用 BNB Greenfield 的时候。

技能链接

https://github.com/internet-court/internet-court-skill/blob/main/vendored/bnb-chain/bnbchain-mcp/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/internet-court/internet-court-skill/blob/main/vendored/bnb-chain/bnbchain-mcp/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我想把 AI 工具连接到 BNB Chain,以便它查询某个钱包的余额。”

每周 5 个新技能,1 分钟读完。

工作原理

你需要把该服务器添加到 AI 工具的设置文件中。查询无需密钥,但发送代币或写入合约需要私钥,并保存在服务器的环境设置中。之后,智能体使用服务器提供的工具进行读取或写入。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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: npx @bnb-chain/mcp@latest (fetches from npm at runtime). Source: github.com/bnb-chain/bnbchain-mcp.
  • 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 env for state-changing tools (transfers, write_contract, approve_token_spending, ERC-8004 register/set_uri, Greenfield writes). Never log or expose private keys.
  • Read-only vs state-changing: Block/balance/contract-read tools work without a key; transfers and writes require PRIVATE_KEY in the server environment.

1. MCP server config

Add the bnbchain-mcp server to the MCP client config (e.g. Cursor MCP settings, Claude Desktop claude_desktop_config.json).

Default (stdio):

{
  "mcpServers": {
    "bnbchain-mcp": {
      "command": "npx",
      "args": ["-y", "@bnb-chain/mcp@latest"],
      "env": {
        "PRIVATE_KEY": ""
      }
    }
  }
}

SSE mode: "args": ["-y", "@bnb-chain/mcp@latest", "--sse"] (and client SSE URL if required). Local dev server (e.g. bun dev:sse in bnbchain-mcp): "url": "http://localhost:3001/sse" with the same env.

Restart 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 env when state-changing tools are needed; leave empty for read-only. Do not commit or echo keys.

3. Agent registration (ERC-8004)

  1. Register the agent on-chain with the MCP tool register_erc8004_agent (see references/erc8004-tools-reference.md).
  2. Owners can then check registration on 8004scan (mainnet) or 8004scan (testnet).

4. Quick reference — tools and prompts

Network parameter

  • Read-only tools (blocks, balances, contract reads, get_chain_info, etc.): network is optional; default is bsc. Use get_supported_networks to list options.
  • 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.

Tool categories

Category Examples Needs PRIVATE_KEY?
Blocks get_latest_block, get_block_by_number, get_block_by_hash No
Transactions get_transaction, get_transaction_receipt, estimate_gas No (estimate only)
Network get_chain_info, get_supported_networks No
Wallet / balance get_native_balance, get_erc20_balance, get_address_from_private_key Balance: optional address or privateKey
Transfers / writes transfer_native_token, transfer_erc20, transfer_nft, transfer_erc1155, approve_token_spending, write_contract Yes
Contracts read_contract, is_contract No for read
Tokens / NFT get_erc20_token_info, get_nft_info, get_erc1155_token_metadata, check_nft_ownership, get_nft_balance, get_erc1155_balance No for read
ERC-8004 register_erc8004_agent, set_erc8004_agent_uri, get_erc8004_agent, get_erc8004_agent_wallet Register/set_uri: Yes
Greenfield gnfd_* bucket/object/payment tools 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 — Gui
常见问题

只是查询信息也需要私钥吗?

不需要。区块、余额和合约读取都无需私钥。

私钥应放在哪里?

该技能要求只把私钥设置在服务器的环境设置中,并且绝不记录或分享。

服务器是如何启动的?

该技能的设置通过 npx 运行 BNB Chain MCP 包,并为该工具提供一个设置块。

详情

作者的原始描述

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.

repo: internet-court/internet-court-skill

热度

GitHub 星标
7.0k
排名
#13617
许可证
—
更新时间
2026/10/26

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能