A powerful toolkit for interacting with BNB Chain and other EVM-compatible networks through natural language processing and AI assistance.
BNBChain MCP is a Model Context Protocol implementation that enables seamless interaction with blockchain networks through AI-powered interfaces. It provides a comprehensive set of tools and resources for blockchain development, smart contract interaction, and network management.
The project is organized into several core modules:
We do not recommend deploying this MCP Server on the public internet. (1) The SSE endpoint has no authentication—anyone who can reach it can use the server. (2) There is no centralized service that custodies private keys or funds; keys and signing are the responsibility of the client. If you still need to deploy it publicly, add an authentication layer in front (e.g. API keys, JWT, or a reverse proxy with auth), or deploy a keyless version that only exposes read-only or non-sensitive tools.
Credentials: Prefer setting PRIVATE_KEY in the MCP server environment. Do not pass the private key in tool parameters when avoidable, as it may be stored in conversation history, client logs, or request logs and lead to exposure.
Transfer and payment tools (e.g. transfer_native_token, transfer_erc20, approve_token_spending, transfer_nft, transfer_erc1155, gnfd_deposit_to_payment, gnfd_withdraw_from_payment, gnfd_create_payment_account) use a preview-then-confirm flow by default so that no funds move until the user explicitly confirms.
confirm_transfer tool with that confirmToken and your privateKey. The token expires after 5 minutes.skipConfirmation: true in the tool arguments when the caller has already confirmed or when running in an automated script. The tool will then execute immediately and return the transaction result.BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION=true so that all transfer/payment tools execute immediately without returning a preview. Use this for headless or scripted environments where you do not need a confirmation step.Example flow with confirmation:
transfer_native_token with toAddress, amount, network (and optionally privateKey). Do not set skipConfirmation.{ preview: { toAddress, amount, network }, confirmToken: "...", message: "..." }.confirm_transfer with confirmToken and privateKey to execute the transfer.To connect to the MCP server from Cursor:
Default mode
{
"mcpServers": {
"bnbchain-mcp": {
"command": "npx",
"args": ["-y", "@bnb-chain/mcp@latest"],
"env": {
"PRIVATE_KEY": "your_private_key_here. (optional)",
"BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION": "false"
}
}
}
}
"true" to make all transfer/payment tools execute immediately (no preview step). Default "false" uses the preview-then-confirm flow.SSE mode
{
"mcpServers": {
"bnbchain-mcp": {
"command": "npx",
"args": ["-y", "@bnb-chain/mcp@latest", "--sse"],
"env": {
"PRIVATE_KEY": "your_private_key_here. (optional)",
"BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION": "false"
}
}
}
}
To connect to the MCP server from Claude Desktop:
claude_desktop_config.json file:{
"mcpServers": {
"bnbchain-mcp": {
"command": "npx",
"args": ["-y", "@bnb-chain/mcp@latest"],
"env": {
"PRIVATE_KEY": "your_private_key_here",
"BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION": "false"
}
}
}
}
Optional env: BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION=true to execute transfers immediately without preview/confirm.
Once connected, you can use all the MCP prompts and tools directly in your Claude Desktop conversations. For example:
If you want to integrate BNBChain MCP into your own client, please check out the examples directory for more detailed information and reference implementations.
The examples demonstrate:
git clone https://github.com/bnb-chain/bnbchain-mcp.git
cd bnbchain-mcp
cp .env.example .env
Edit .env file with your configuration:
PRIVATE_KEY: Your wallet private key (required for transaction operations)LOG_LEVEL: Set logging level (DEBUG, INFO, WARN, ERROR)PORT: Server port number (default: 3001)
Install dependencies and start development server:
# Install project dependencies
bun install
# Start the development server
bun dev:sse
Configure the local server in your MCP clients using this template:
{
"mcpServers": {
"bnbchain-mcp": {
"url": "http://localhost:3001/sse",
"env": {
"PRIVATE_KEY": "your_private_key_here"
}
}
}
}
We use @modelcontextprotocol/inspector for testing. Launch the test UI:
bun run test
bun dev:sse: Start development server with hot reloadbun build: Build the projectbun test: Run test suite| 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 |
| 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 externally owned account (EOA) |
| read_contract | Read data from a smart contract by calling a view/pure function |
| write_contract | Write data to a smart contract by calling a 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 |
Register and resolve AI agents on the ERC-8004 Identity Registry (Trustless Agents). 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, image, and services such as MCP endpoint).
| Name | Description |
|---|---|
| register_erc8004_agent | Register an agent on the ERC-8004 Identity Registry; 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) |
| 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 |
$ claude mcp add bnbchain-mcp \
-- python -m otcore.mcp_server <graph>