BNBChain

BNBChain

Official
bnb-chain

Connects AI assistants to BNB Chain and other EVM-compatible blockchain networks for querying blocks, interacting with smart contracts, managing tokens/NFTs, and performing wallet operations.

Enables direct interaction with BNB Chain and other EVM-compatible networks for blockchain operations including block exploration, smart contract interaction, token management, wallet operations, and Greenfield storage functionality.

51307 views23Local (stdio)

What it does

  • Query blockchain blocks and transaction data
  • Interact with smart contracts on EVM networks
  • Manage ERC20 tokens and NFT operations
  • Perform wallet operations and transaction management
  • Upload and manage files on Greenfield network
  • Register and resolve on-chain AI agent identities

Best for

DApp developers building on BNB ChainBlockchain analysts querying network dataWeb3 developers managing smart contractsProjects needing decentralized storage via Greenfield
Supports multiple EVM-compatible networksIncludes Greenfield decentralized storagePrivate key handling stays client-side

About BNBChain

BNBChain is an official MCP server published by bnb-chain that provides AI assistants with tools and capabilities via the Model Context Protocol. Interact with BNBChain for block exploration, smart contracts, token, wallet operations, and Greenfield storage across E It is categorized under developer tools.

How to install

You can install BNBChain in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

License

BNBChain is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

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.

bnbchain-mcp MCP server

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.

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)"
      }
    }
  }
}

SSE mode

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

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"
      }
    }
  }
}
  1. 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

Quick Start

  1. Clone the repository:
git clone https://github.com/bnb-chain/bnbchain-mcp.git
cd bnbchain-mcp
  1. 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)
  1. Install dependencies and start development server:
# Install project dependencies
bun install

# Start the development server
bun dev:sse

Testing with MCP Clients

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"
      }
    }
  }
}

Testing with Web UI

We use @modelcontextprotocol/inspector for testing. Launch the test UI:

bun run test

Available Scripts

  • bun dev:sse: Start development server with hot reload
  • bun build: Build the project
  • bun test: Run test suite

Available Prompts and Tools

Prompts

NameDescription
analyze_blockAnalyze a block and provide detailed information about its contents
analyze_transactionAnalyze a specific transaction
analyze_addressAnalyze an EVM address
interact_with_contractGet guidance on interacting with a smart contract
explain_evm_conceptGet an explanation of an EVM concept
compare_networksCompare different EVM-compatible networks
analyze_tokenAnalyze an ERC20 or NFT token
how_to_register_mcp_as_erc8004_agentGet guidance on registering an MCP server as an ERC-8004 agent

Tools

NameDescription
get_block_by_hashGet a block by hash
get_block_by_numberGet a block by number
get_latest_blockGet the latest block
get_transactionGet detailed information about a specific transaction by its hash
get_transaction_receiptGet a transaction receipt by its hash
estimate_gasEstimate the gas cost for a transaction
transfer_native_tokenTransfer native tokens (BNB, ETH, MATIC, etc.) to an address
approve_token_spendingApprove another address to spend your ERC20 tokens
transfer_nftTransfer an NFT (ERC721 token) from one address to another
transfer_erc1155Transfer ERC1155 tokens to another address
transfer_erc20Transfer ERC20 tokens to an address
get_address_from_private_keyGet the EVM address derived from a private key
get_chain_infoGet chain information for a specific network
get_supported_networksGet list of supported networks
resolve_ensResolve an ENS name to an EVM address
is_contractCheck if an address is a smart contract or an externally owned account (EOA)
read_contractRead data from a smart contract by calling a view/pure function
write_contractWrite data to a smart contract by calling a state-changing function
get_erc20_token_infoGet ERC20 token information
get_native_balanceGet native token balance for an address
get_erc20_balanceGet ERC20 token balance for an address
get_nft_infoGet detailed information about a specific NFT
check_nft_ownershipCheck if an address owns a specific NFT
get_erc1155_token_metadataGet the metadata for an ERC1155 token
get_nft_balanceGet the total number of NFTs owned by an address from a specific collection
get_erc1155_balanceGet the balance of a specific ERC1155 token ID owned by an address

ERC-8004 Agent tools

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 | Descr


README truncated. View full README on GitHub.

Alternatives

Related Skills

Browse all skills
ui-design-system

UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.

6
cli-builder

Guide for building TypeScript CLIs with Bun. Use when creating command-line tools, adding subcommands to existing CLIs, or building developer tooling. Covers argument parsing, subcommand patterns, output formatting, and distribution.

2
openai-knowledge

Use when working with the OpenAI API (Responses API) or OpenAI platform features (tools, streaming, Realtime API, auth, models, rate limits, MCP) and you need authoritative, up-to-date documentation (schemas, examples, limits, edge cases). Prefer the OpenAI Developer Documentation MCP server tools when available; otherwise guide the user to enable `openaiDeveloperDocs`.

0
api-documenter

Master API documentation with OpenAPI 3.1, AI-powered tools, and modern developer experience practices. Create interactive docs, generate SDKs, and build comprehensive developer portals. Use PROACTIVELY for API documentation or developer portal creation.

0
ydc-ai-sdk-integration

Integrate Vercel AI SDK applications with You.com tools (web search, AI agent, content extraction). Use when developer mentions AI SDK, Vercel AI SDK, generateText, streamText, or You.com integration with AI SDK.

0
mcp-developer

Use when building MCP servers or clients that connect AI systems with external tools and data sources. Invoke for MCP protocol compliance, TypeScript/Python SDKs, resource providers, tool functions.

0