BNBChain MCP (Model Context Protocol)
About
A MCP server for BNB Chain that supports BSC, opBNB, Greenfield, and other popular EVM-compatible networks.
Details
- Author
- bnb-chain
- GitHub stars
- 61
- Downloads
- 227
- Categories
- Cloud Service, Other, Finance
Jump to
- Query blocks, transactions, and native/ERC20 balances
- Transfer native tokens, ERC20, NFTs, and ERC1155 tokens
- Interact with smart contracts (read/write)
- Support for Greenfield file operations and ERC-8004 AI agent identities
- Preview-then-confirm flow for all transfer and payment tools
- Available as stdio or SSE transport
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
BNBChain MCP (Model Context Protocol)Command (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install and configure with your MCP client (Cursor, Claude Desktop) by adding a JSON entry that runs npx -y @bnb-chain/mcp@latest with optional environment variables PRIVATE_KEY and BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION. For local development, clone the repo, install dependencies with bun install, and run bun dev:sse.
register_erc8004_agent
Register an agent on the ERC-8004 Identity Registry. Mints an on-chain agent identity (NFT) and returns the agent ID. Use BSC or BSC Testnet; the agentURI should point to a JSON metadata file (AgentURI format) with name, description, image, and services (e.g. MCP endpoint).
set_erc8004_agent_uri
Update the metadata URI for an existing ERC-8004 agent. Caller must be the owner of the agent NFT.
get_erc8004_agent
Get agent info from the ERC-8004 Identity Registry: owner address and tokenURI (metadata URI).
get_erc8004_agent_wallet
Get the verified payment wallet address for an ERC-8004 agent (for x402 / agent payments). Set on-chain via setAgentWallet; defaults to owner on registration.
get_block_by_hash
Get block metadata by hash. Returns number, hash, timestamp, gasUsed, transaction count, and optionally transaction hashes (not full tx data).
get_block_by_number
Get block metadata by number. Returns number, hash, timestamp, gasUsed, transaction count, and optionally transaction hashes (not full tx data).
get_latest_block
Get the latest block metadata. Returns number, hash, timestamp, gasUsed, transaction count, and optionally transaction hashes (not full tx data).
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. Response is truncated if it exceeds maxResponseSize bytes.
write_contract
Write data to a smart contract by calling a state-changing function. By default returns a preview and confirmToken—call confirm_transfer with the token to execute. Set skipConfirmation=true or BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION=true to execute immediately.
get_chain_info
Get chain information for a specific network
get_supported_networks
Get list of supported networks
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
create_erc20_token
Create a new ERC20 token
get_transaction
Get detailed information about a specific transaction by its hash. Includes sender, recipient, value, data, and more.
estimate_gas
Estimate the gas cost for a transaction
get_address_from_private_key
Get the EVM address derived from a private key
transfer_native_token
Transfer native tokens (BNB, ETH, MATIC, etc.) to an address. By default returns a preview and confirmToken—call confirm_transfer with the token to execute. Set skipConfirmation=true or BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION=true to execute immediately.
approve_token_spending
Approve another address (e.g. a DeFi protocol or exchange) to spend your ERC20 tokens. Use the exact amount needed. WARNING: Large or unlimited approvals increase risk. By default returns a preview—call confirm_transfer to execute. Set skipConfirmation=true or BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION=true to execute immediately.
transfer_erc20
Transfer ERC20 tokens to an address. By default returns a preview and confirmToken—call confirm_transfer to execute. Set skipConfirmation=true or BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION=true to execute immediately.
get_nft_info
Get detailed information about a specific NFT (ERC721 token), including collection name, symbol, token URI, and current owner if available.
get_erc1155_token_metadata
Get the metadata for an ERC1155 token (multi-token standard used for both fungible and non-fungible tokens). The metadata typically points to JSON metadata about the token.
transfer_nft
Transfer an NFT to an address. By default returns a preview and confirmToken—call confirm_transfer to execute. Set skipConfirmation=true or BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION=true to execute immediately.
transfer_erc1155
Transfer ERC1155 tokens to another address. By default returns a preview and confirmToken—call confirm_transfer to execute. Set skipConfirmation=true or BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION=true to execute immediately.
gnfd_get_account_balance
Get the balance for an account
gnfd_get_all_sps
Get a list of all storage providers in the Greenfield network
gnfd_create_bucket
Create a new bucket in Greenfield storage
gnfd_create_file
Upload a file to a Greenfield bucket
gnfd_create_folder
Create a folder in a Greenfield bucket
gnfd_list_buckets
List buckets owned by the account with pagination. Returns totalCount and hasMore for paging.
gnfd_list_objects
List objects in a bucket with pagination. Returns totalCount and hasMore for paging.
gnfd_delete_object
Delete an object from a bucket
gnfd_delete_bucket
Delete a bucket
gnfd_get_bucket_info
Get detailed information about a bucket
gnfd_get_bucket_full_info
Get bucket basic information and quota usage
gnfd_get_object_info
Get detailed information about an object in a bucket
gnfd_download_object
Download an object from a bucket
gnfd_get_payment_accounts
Get the payment accounts for a given address
gnfd_create_payment_account
Create a new payment account. By default returns a preview and confirmToken—call confirm_transfer to execute. Set skipConfirmation=true or BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION=true to execute immediately.
gnfd_deposit_to_payment
Deposit funds into a payment account. By default returns a preview and confirmToken—call confirm_transfer to execute. Set skipConfirmation=true or BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION=true to execute immediately.
gnfd_withdraw_from_payment
Withdraw funds from a payment account. By default returns a preview and confirmToken—call confirm_transfer to execute. Set skipConfirmation=true or BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION=true to execute immediately.
gnfd_get_payment_account_info
Get the info for a payment account
confirm_transfer
Execute a pending transfer or payment that was returned as a preview. Pass the confirmToken from the preview response and your privateKey. The token expires after 5 minutes.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"bnbchain mcp (model context protocol)": {
"bnbchain-mcp": {
"command": "npx",
"args": [
"-y",
"@bnb-chain/mcp@latest"
],
"env": {
"PRIVATE_KEY": "your_private_key_here. (optional)",
"BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION": "false"
}
}
}
}
}
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"
}
}
}
BNBChain MCP (Model Context Protocol)
A powerful toolkit for interacting with BNB Chain and other EVM-compatible networks through natural language processing and AI assistance.
<a href="https://glama.ai/mcp/servers/@bnb-chain/bnbchain-mcp">
</a>
Description
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.
Core Modules
The project is organized into several core modules:
- Blocks: Query and manage blockchain blocks
- Contracts: Interact with smart contracts
- Network: Network information and management
- NFT: NFT (ERC721/ERC1155) operations
- Tokens: Token (ERC20) operations
- Transactions: Transaction management
- Wallet: Wallet operations and management
- Common: Shared utilities and types
- Greenfield: Support file management operations on Greenfield network including, uploading, downloading, and managing files and buckets
- Additional features coming soon (Greenfield, Swap, Bridge, etc.)
- Agents (ERC-8004): Register and resolve on-chain AI agent identities (ERC-8004 Trustless Agents) on BSC and BSC Testnet
Important Notes
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 confirmation
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.
- Default behavior: Calling a transfer or payment tool returns a preview (recipient, amount, network, etc.) and a short-lived confirmToken. No transaction is sent. To execute, call the confirm_transfer tool with that confirmToken and your privateKey. The token expires after 5 minutes.
- Skipping confirmation (per call): Pass 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.
- Skipping confirmation (server-wide): Set the environment variable 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:
1. Call transfer_native_token with toAddress, amount, network (and optionally privateKey). Do not set skipConfirmation.
2. The server returns { preview: { toAddress, amount, network }, confirmToken: "...", message: "..." }.
3. Review the preview, then call confirm_transfer with confirmToken and privateKey to execute the transfer.
Integration with Cursor
To connect to the MCP server from Cursor:
1. Open Cursor and go to Settings (gear icon in the top right)
2. Click on "MCP" in the left sidebar
3. Click "Add new global MCP server"
4. Enter the following details:
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"
}
}
}
}
- PRIVATE_KEY: Optional. Prefer setting here instead of passing in tool parameters.
- BNBCHAIN_MCP_SKIP_TRANSFER_CONFIRMATION: Optional. Set to "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"
}
}
}
}
Integration with Claude Desktop
To connect to the MCP server from Claude Desktop:
1. Open Claude Desktop and go to Settings
2. Click on "Developer" in the left sidebar
3. Click the "Edit Config" Button
4. Add the following configuration to the 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.
5. Save the file and restart Claude Desktop
Once connected, you can use all the MCP prompts and tools directly in your Claude Desktop conversations. For example:
- "Analyze this address: 0x123..."
- "Explain the EVM concept of gas"
- "Check the latest block on BSC"
Integration with Other Clients
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:
- How to set up the MCP client
- Authentication and configuration
- Making API calls to interact with blockchain networks
- Handling responses and errors
- Best practices for integration
Local Development
Prerequisites
- bun v1.2.10 or higher
- Node.js v17 or higher
Quick Start
1. Clone the repository:
git clone https://github.com/bnb-chain/bnbchain-mcp.git
cd bnbchain-mcp
2. Set up environment variables:
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)
3. Install dependencies and start development server:
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




