home / mcp / bnbchain mcp server

BNBChain MCP Server

A MCP server for BNB Chain that supports BSC, opBNB, Greenfield, and other popular EVM-compatible networks.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bnb-chain-bnbchain-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@bnb-chain/mcp@latest"
      ],
      "env": {
        "PRIVATE_KEY": "your_private_key_here. (optional)"
      }
    }
  }
}

BNBChain MCP enables you to interact with BNB Chain and other EVM-compatible networks through AI-powered prompts and tooling. It exposes a comprehensive set of modules for blocks, contracts, tokens, transactions, wallets, NFT operations, and more, so you can query, analyze, and manage blockchain activity with natural language guidance.

How to use

You connect your MCP client to the BNBChain MCP server to start querying and interacting with blockchain data through prompts. Use the available prompts to analyze blocks, transactions, addresses, and tokens, or to interact with smart contracts. You can also request network information, balance checks, NFT data, and Greenfield file operations through the same interface.

How to install

Prerequisites: Node.js (v16+ recommended) and a runtime that can execute npm/npx commands. You may also use Bun if you prefer, but ensure your environment supports the required MCP commands.

Step-by-step setup to run MCP locally and connect clients will follow these steps in order.

Notes and troubleshooting

The MCP server supports local (stdio) execution via a command like npx to run the MCP package. Ensure you provide the required environment variable for your wallet private key if you perform transaction operations. The PRIVATE_KEY value is optional for read-only interactions.

Available tools

analyse_block

Analyze a block and provide detailed information about its contents

analyse_transaction

Analyze a specific transaction and extract key metrics and events

analyse_address

Analyze an EVM address to summarize balance, activity, and token holdings

interact_with_contract

Get guidance on interacting with a smart contract, including function calls and data encoding

explain_evm_concept

Explain a core EVM concept in simple terms with practical examples

compare_networks

Compare different EVM-compatible networks on metrics like gas, throughput, and costs

analyse_token

Analyze an ERC20 or NFT token for metadata, balance, and transfers

get_block_by_hash

Retrieve a block by its hash with detailed metadata

get_block_by_number

Retrieve a block by its number with transactions and receipts

get_latest_block

Fetch the most recent block on a given network

get_transaction

Get detailed information about a 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 to a destination address

approve_token_spending

Approve another address to spend your ERC20 tokens

transfer_nft

Transfer an NFT (ERC721) 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 a 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