by bnb-chain
Provides a Model Context Protocol server enabling AI‑driven interaction with BNB Chain and other EVM‑compatible networks, offering block queries, contract calls, token transfers, NFT management, and Greenfield file operations.
Bnbchain Mcp implements a Model Context Protocol server that allows natural‑language and AI assistants to query and operate on BNB Chain, BSC, opBNB, Greenfield, Ethereum and other major EVM‑compatible networks. It exposes a rich set of prompts and tools for block analysis, transaction inspection, address insights, token/NFT handling, contract interaction, and Greenfield storage management.
bun
or Node.js is available, then run the server with npx
:
{
"mcpServers": {
"bnbchain-mcp": {
"command": "npx",
"args": ["-y", "@bnb-chain/mcp@latest"],
"env": { "PRIVATE_KEY": "your_private_key_here" }
}
}
}
bun dev:sse
for hot‑reload development or bun start
after building.command
/args
configuration.get_latest_block
, transfer_erc20
, gnfd_upload_object
, etc., via the MCP endpoint.analyze_block
, explain_evm_concept
)npx
‑based launch, configurable via environment variables (private key, log level, port)Q: Do I need a private key to run the server? A: A private key is optional; it is required only for transaction‑signing operations such as token transfers or contract writes.
Q: Which networks are supported out of the box?
A: BSC, opBNB, Greenfield, Ethereum and any other EVM‑compatible chain defined in src/evm/chains.ts
.
Q: Can I use the server without SSE?
A: Yes. Omit the --sse
flag in the args
array to run in standard HTTP mode.
Q: How do I add a new network?
A: Extend the chains.ts
file with the network’s RPC endpoint and chain ID, then restart the server.
Q: Is the server production‑ready? A: It is MIT‑licensed and used in several AI‑assistant integrations; for production deployments configure appropriate logging, rate limiting, and secure storage of the private key.
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:
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)"
}
}
}
}
SSE mode
{
"mcpServers": {
"bnbchain-mcp": {
"command": "npx",
"args": ["-y", "@bnb-chain/mcp@latest", "--sse"],
"env": {
"PRIVATE_KEY": "your_private_key_here. (optional)"
}
}
}
}
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"
}
}
}
}
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 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 suiteName | 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 |
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 |
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 a bucket |
gnfd_create_folder | Create a folder in a bucket |
gnfd_get_account_balance | Get the balance for an account |
gnfd_deposit_to_payment | Deposit funds into a payment account |
gnfd_withdraw_from_payment | Withdraw funds from a payment account |
gnfd_disable_refund | Disable refund for a payment account (IRREVERSIBLE) |
gnfd_get_payment_accounts | List all payment accounts owned by an address |
gnfd_get_payment_account_info | Get detailed information about a payment account |
gnfd_create_payment | Create a new payment account |
gnfd_get_payment_balance | Get payment account balance |
Supports BSC, opBNB, Greenfield, Ethereum, and other major EVM-compatible networks. For more details, see src/evm/chains.ts
.
We welcome contributions to BNBChain MCP! Here's how you can help:
Please ensure your code follows our coding standards and includes appropriate tests.
This project is licensed under the MIT License - see the LICENSE file for details.
This project is built upon and inspired by the following open-source projects:
We extend our gratitude to the original authors for their contributions to the blockchain ecosystem.
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "bnbchain-mcp": { "command": "npx", "args": [ "-y", "@bnb-chain/mcp@latest" ], "env": { "PRIVATE_KEY": "your_private_key_here" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.