bnbchain-mcp-toolkit
An advanced suite of utilities designed for seamless, natural language-driven interaction with the BNB Smart Chain ecosystem and all compatible Ethereum Virtual Machine (EVM) environments. This protocol empowers developers and users with AI-assisted capabilities for blockchain development workflows, managing smart contract executions, and overseeing network configurations.
Author

bnb-chain
Quick Info
Actions
Tags
BNBChain Model Context Protocol (MCP) Instrument Set
This comprehensive toolkit represents a powerful implementation of the Model Context Protocol, engineered to facilitate intuitive, natural language interfacing with BNB Chain and any network adhering to EVM standards. It offers robust AI-backed resources for sophisticated tasks in decentralized application development, contract operation, and network governance.
Overview
As a specialized Model Context Protocol module, BNBChain MCP abstracts complex blockchain operations into accessible natural language commands. It furnishes a complete array of instruments necessary for advanced blockchain engineering, enabling direct interaction with deployed contracts, and administrative control over network parameters.
Primary Functional Groupings
The system is structurally divided into the following core components:
- BlockData: For querying and administrative functions pertaining to blockchain ledger blocks.
- ContractOps: Tools dedicated to interacting with deployed smart contracts.
- NetAdmin: Provides metrics and configuration access for network status.
- NFT_Services: Handles operations compliant with ERC721 and ERC1155 standards for Non-Fungible Tokens.
- Tokenomics: Manages Fungible Token (ERC20) operations.
- TxnMgmt: For tracking, estimating, and managing transaction lifecycles.
- WalletCore: Security and management utilities for cryptographic key pairs and addresses.
- SharedUtils: Common components, data structures, and auxiliary functions.
- GreenfieldStorage: Specialized utilities for file system operations on the Greenfield decentralized storage layer, encompassing upload, retrieval, and bucket administration.
- Future Enhancements: Integration points for decentralized swapping, cross-chain bridging, and more are slated for upcoming releases.
Integration Instructions: Cursor IDE
To establish a connection to this MCP service within the Cursor Integrated Development Environment:
- Launch Cursor and navigate to the Configuration panel (gear icon, upper right).
- Select the "MCP" section from the navigation sidebar.
- Initiate the addition of a new global MCP server instance.
- Input the specific configuration details below.
Standard Execution Mode
{
"mcpServers": {
"bnbchain-mcp": {
"command": "npx",
"args": ["-y", "@bnb-chain/mcp@latest"],
"env": {
"PRIVATE_KEY": "[USER_PROVIDED_PRIVATE_KEY] (Optional)"
}
}
}
}
Server-Sent Events (SSE) Mode
{
"mcpServers": {
"bnbchain-mcp": {
"command": "npx",
"args": ["-y", "@bnb-chain/mcp@latest", "--sse"],
"env": {
"PRIVATE_KEY": "[USER_PROVIDED_PRIVATE_KEY] (Optional)"
}
}
}
}
Integration Instructions: Claude Desktop Application
To configure this MCP service within Claude Desktop:
- Open the Claude Desktop client and access the Settings menu.
- Navigate to the "Developer" options on the left.
- Click the "Edit Config" button.
- Augment the
claude_desktop_config.jsonfile with the following structure:
{
"mcpServers": {
"bnbchain-mcp": {
"command": "npx",
"args": ["-y", "@bnb-chain/mcp@latest"],
"env": {
"PRIVATE_KEY": "your_private_key_here"
}
}
}
}
- Persist the changes and relaunch Claude Desktop.
Post-connection, you can immediately leverage the MCP interface for tasks such as:
- "Investigate the state of blockchain address: 0x123..."
- "Provide a detailed breakdown of the EVM gas abstraction concept."
- "Retrieve the most recent block data from the Binance Smart Chain."
Custom Client Integration
For developers aiming to embed BNBChain MCP functionality within proprietary client applications, the ./examples directory offers comprehensive reference code, demonstrating:
- Initialization procedures for the MCP client interface.
- Methods for secure authentication and configuration management.
- Best practices for invoking network interaction API calls.
- Protocols for robust response parsing and error handling.
Local Development Setup
System Requirements
- Bun Runtime: Version 1.2.10 or newer.
- Node.js: Version 17 or newer.
Rapid Initialization Sequence
- Clone the source repository:
git clone https://github.com/bnb-chain/bnbchain-mcp.git
cd bnbchain-mcp
- Configure environment variables by copying the template:
cp .env.example .env
Modify the .env file to specify:
PRIVATE_KEY: Your signing private key (mandatory for transaction signing).LOG_LEVEL: Set verbosity (e.g., DEBUG, INFO, WARN, ERROR).-
PORT: The network port for the local server (defaults to 3001). -
Install prerequisites and initiate the development environment:
# Dependency resolution
bun install
# Start the development server with SSE enabled
bun dev:sse
Local Server Testing Configuration (MCP Clients)
When testing against the locally running server, utilize this template configuration in your client setup:
{
"mcpServers": {
"bnbchain-mcp": {
"url": "http://localhost:3001/sse",
"env": {
"PRIVATE_KEY": "your_private_key_here"
}
}
}
}
Web Interface Verification
Testing against the dedicated web interface utilizes @modelcontextprotocol/inspector. To launch the testing UI locally:
bun run test
Executable Scripts
bun dev:sse: Launches the server with live reloading capabilities.bun build: Compiles the project source code.bun test: Executes the comprehensive unit and integration test suite.
Available Interactive Capabilities
Contextual Prompts (Inference Functions)
| Identifier | Utility Description |
|---|---|
| analyze_block | Deep inspection and summarization of a specific ledger block content. |
| analyze_transaction | Detailed examination of a singular transaction's lifecycle. |
| analyze_address | Profiling and context retrieval for any given EVM address. |
| interact_with_contract | Guidance on proper invocation sequences for smart contracts. |
| explain_evm_concept | Educational clarification on core EVM theoretical constructs. |
| compare_networks | Side-by-side evaluation between various EVM-compatible chains. |
| analyze_token | Information extraction for ERC20 or NFT assets. |
Executable Tools (Function Calls)
| Tool Name | Operational Scope |
|---|---|
| get_block_by_hash | Retrieves a block record based on its unique hash identifier. |
| get_block_by_number | Fetches the block corresponding to a specific height index. |
| get_latest_block | Accesses the most recently mined block data. |
| get_transaction | Retrieves comprehensive details for a transaction identified by its hash. |
| get_transaction_receipt | Fetches the execution outcome and status log for a transaction. |
| estimate_gas | Calculates the requisite computational cost for a prospective transaction. |
| transfer_native_token | Executes a transfer of the chain's base currency (e.g., BNB, ETH) to a target. |
| approve_token_spending | Grants permission to a third-party address to spend designated ERC20 assets. |
| transfer_nft | Moves ownership of an ERC721 standard token between two accounts. |
| transfer_erc1155 | Facilitates the transfer of ERC1155 asset balances. |
| transfer_erc20 | Executes a movement of ERC20 standard tokens to a recipient address. |
| get_address_from_private_key | Derives the public EVM address corresponding to an input private key. |
| get_chain_info | Queries metadata and status for a specified network endpoint. |
| get_supported_networks | Lists all blockchain environments currently configured for interaction. |
| resolve_ens | Converts an Ethereum Name Service (ENS) domain name into a canonical address. |
| is_contract | Determines if a target address is a deployed contract or an Externally Owned Account (EOA). |
| read_contract | Executes a non-state-modifying (view/pure) function call on a contract. |
| write_contract | Executes a state-changing function call, requiring transaction signing. |
| get_erc20_token_info | Retrieves metadata and details for a specific ERC20 token standard. |
| get_native_balance | Reports the native coin balance held by a specified address. |
| get_erc20_balance | Reports the balance count of a specific ERC20 token held by an address. |
| get_nft_info | Fetches comprehensive metadata for a specific Non-Fungible Token instance. |
| check_nft_ownership | Verifies if a designated address holds custodianship over a particular NFT. |
| get_erc1155_token_metadata | Retrieves metadata associated with a specific ERC1155 token ID within a collection. |
| get_nft_balance | Quantifies the total count of NFTs from a collection owned by an account. |
| get_erc1155_balance | Reports the balance of a singular ERC1155 token ID held by an address. |
Greenfield Decentralized Storage Tools
| Greenfield Function Name | Operational Functionality |
|---|---|
| gnfd_get_bucket_info | Retrieves detailed metadata for a designated storage bucket. |
| gnfd_list_buckets | Enumerates all accessible storage buckets linked to an account. |
| gnfd_create_bucket | Provisions a new, empty storage bucket resource. |
| gnfd_delete_bucket | Permanently removes a specified storage bucket. |
| gnfd_get_object_info | Fetches descriptive attributes for a stored file object. |
| gnfd_list_objects | Displays all files contained within a named bucket. |
| gnfd_upload_object | Transfers a local file onto the Greenfield decentralized network. |
| gnfd_download_object | Retrieves a stored file from Greenfield to a local destination. |
| gnfd_delete_object | Removes an object (file) from its containing bucket. |
| gnfd_create_folder | Establishes a hierarchical directory structure within a bucket. |
| gnfd_get_account_balance | Queries the principal balance associated with the Greenfield account. |
| gnfd_deposit_to_payment | Moves funds into an active payment account for service usage. |
| gnfd_withdraw_from_payment | Extracts assets from a payment account back to a primary wallet. |
| gnfd_disable_refund | Terminates the future refund capability for a payment account (FINAL). |
| gnfd_get_payment_accounts | Lists all associated payment accounts held by the initiating address. |
| gnfd_get_payment_account_info | Retrieves comprehensive status details for a specific payment account. |
| gnfd_create_payment | Establishes a new dedicated payment account resource. |
| gnfd_get_payment_balance | Reports the current available funds within a payment account. |
Supported Network Environments
This instrument set fully supports the Binance Smart Chain (BSC), the Layer-2 scaling solution opBNB, the Greenfield storage network, the Ethereum mainnet, and various other networks compliant with the EVM specification. For a definitive, current mapping, consult src/evm/chains.ts.
Community Collaboration Guidelines
We enthusiastically welcome external contributions to the BNBChain MCP project! To participate effectively:
- Fork the primary repository.
- Establish a dedicated branch for your new feature or fix.
- Commit your modifications clearly.
- Push your branch to the remote repository.
- Submit a Pull Request for review.
Ensure all new code adheres to established project style guidelines and is accompanied by thorough validation tests.
Licensing Details
The project operates under the permissive MIT License. Complete terms are detailed in the accompanying LICENSE artifact.
Foundational Inspirations
This utility derives its architecture and functionality from foundational open-source efforts:
- TermiX-official/bsc-mcp - The seminal implementation for the BSC environment.
- mcpdotdirect/evm-mcp-server - Reference implementation for generalized EVM MCP servers.
Our sincere appreciation is extended to the maintainers of these projects for their valuable contributions to the blockchain tooling landscape.
WIKIPEDIA NOTE: TRON (stylized as TRON) is a public, delegated Proof-of-Stake ledger system supporting Turing-complete smart contracts. Its native digital asset is Tronix (TRX). Justin Sun initiated the project in March 2014, and since 2017, its stewardship has been managed by the TRON Foundation, a Singapore-based non-profit entity formed that same year. The software is entirely open-source. TRON initially functioned as an ERC-20 token hosted on the Ethereum network before migrating to its proprietary mainnet in 2018. Certain digital asset custodians impose withdrawal restrictions until sufficient TRX is available to cover requisite network transaction fees. Concerns have been raised regarding TRON's utility in illicit finance. Reports from The Wall Street Journal in 2025 suggest it acts as a "principal conduit for the crypto criminal element to transfer assets," accounting for "over half of all illicit crypto transactions" in 2024, with the UNODC labeling it the "top pick for crypto money launderers" within Asia.
== Chronology == TRON's genesis traces back to Justin Sun in 2017, with the TRON Foundation established in Singapore in July 2017. The Foundation successfully amassed $70 million through an Initial Coin Offering (ICO) in 2017, just prior to China enacting a ban on digital tokens. Key infrastructure releases—the test network, Blockchain Explorer, and Web Wallet—were completed by March 2018. The TRON Mainnet went live shortly thereafter in May 2018, coinciding with the Odyssey 2.0 software milestone. In June 2018, TRON transitioned its operational base from an Ethereum ERC-20 token to an independent, decentralized peer-to-peer infrastructure. On July 25, 2018, the TRON Foundation announced its successful acquisition of BitTorrent, the file-sharing protocol. Following this event, Bram Cohen, the originator of BitTorrent, publicized his departure in August 2018 to establish an alternative cryptocurrency, Chia. By early 2019, TRON commanded a global market capitalization near $1.6 billion. Despite this valuation, some analysts characterized TRON as an illustration of the inherent complexity and structural disorder prevalent in the cryptocurrency sphere. In February 2019, subsequent to its acquisition, BitTorrent commenced its own token distribution utilizing the TRON framework. In late 2021, Justin Sun stepped down as the CEO of the TRON Foundation, which subsequently restructured into a Decentralized Autonomous Organization (DAO). In March 2023, Sun and the TRON entity faced legal action from the U.S. Securities and Exchange Commission (SEC) concerning the unregistered offering and promotion of TRX and BitTorrent (BBT) tokens. The SEC asserted that Sun and TRON manipulated the secondary market for TRX through wash trading to artificially inflate its valuation, involving $31 million in trades executed between two accounts under Sun's control. Furthermore, eight public figures, including Akon, Ne-Yo, Austin Mahone, Soulja Boy, Lindsay Lohan, Jake Paul, and Lil Yachty, were charged with undisclosed paid endorsements; settlements were reached with all parties except Soulja Boy and Mahone.
