Blockchain MCP Server DEMO
@darwintree
Overview
What is Blockchain MCP Server DEMO?
A Model Context Protocol (MCP) server for interacting with multiple EVM-compatible blockchains, providing tools and resources for blockchain data access and analysis. It supports Ethereum Mainnet and Conflux eSpace, built with TypeScript, Viem, and Zod.
How to use Blockchain MCP Server DEMO?
Clone the repository, install dependencies with npm install, build with npm run build, and start with npm start. Interact via MCP client tools (e.g., MCP Inspector: npx @modelcontextprotocol/inspector node dist/index.js) using defined tools and resources like callTool("get_transaction", ...) or resource URIs like blockchain://transaction/{hash}.
Key features of Blockchain MCP Server DEMO
- Multi-chain support for Ethereum Mainnet and Conflux eSpace.
- Tools for RPC calls, transactions, addresses, blocks, and chain lists.
- Resource URIs for cross-chain transaction, block, and address lookup.
- Automatic failover between RPC endpoints on network failure.
- Input validation using Zod schemas with TypeScript type safety.
- Extensible configuration to add new EVM chains.
Use cases of Blockchain MCP Server DEMO
- Fetch transaction details across multiple chains with a single call.
- Retrieve address balances and nonce information for a given chain.
- Execute arbitrary Ethereum JSON‑RPC methods (e.g.,
eth_getBalance,eth_call). - Access block data by chain ID and block number.
- List all supported blockchain networks and their RPC endpoints.
FAQ from Blockchain MCP Server DEMO
Which blockchains are supported?
Ethereum Mainnet (chain ID 1) and Conflux eSpace (chain ID 1030). Other EVM chains can be added by modifying the configuration file.
How can I add a new blockchain?
Edit the SUPPORTED_CHAINS object in src/config.ts with the new chain’s RPC URLs, explorer, and native currency details.
What RPC methods are available?
Standard Ethereum JSON‑RPC methods including eth_getBalance, eth_getTransactionByHash, eth_blockNumber, eth_call, eth_estimateGas, and others listed in the README.
How do I test the server without a full MCP client?
Use the MCP Inspector: run npx @modelcontextprotocol/inspector node dist/index.js to explore tools and resources interactively.
Where does the data come from?
The server fetches live data from public RPC endpoints of the supported chains. No data is stored locally.