Blockchain MCP Server

Blockchain MCP Server

blockchain-mcp-server•bydarwintree

A Model Context Protocol server that provides tools and resources for accessing and analyzing data across EVM-compatible blockchains.

License: MIT License•Runtime: Awaiting documentation review•Category: finance crypto

WHAT IT DOES

  • •Exposes tools for retrieving supported chains, RPC methods, latest blocks, transactions, address information, and block data.
  • •Provides MCP resources for transaction, block, address, and chain data using blockchain URI schemes.
  • •Supports standard Ethereum JSON-RPC methods such as balance, transaction, block, gas, and chain ID queries.
  • •Includes error handling with automatic failover between RPC endpoints and Zod-based input validation.

BEST FOR

  • •Querying cross-chain transaction details from AI assistants.
  • •Retrieving address balances and contract code across multiple EVM networks.
  • •Fetching block information for specific chains and block numbers.

ABOUT BLOCKCHAIN-MCP-SERVER

Blockchain MCP Server is cataloged as an MCP server attributed to darwintree. A Model Context Protocol server that provides tools and resources for accessing and analyzing data across EVM-compatible blockchains. It is categorized under finance crypto. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Blockchain MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Which blockchains does the server support?

The server supports Ethereum Mainnet and Conflux eSpace as active networks, with the demo header also describing multi-chain EVM support.

Can RPC endpoints be customized?

Yes, the server connects using public RPC endpoints by default, and endpoints can be customized in the config file.

Upstream README

View this exact version on GitHub

README.md · e415df23205e · Fetched 2026-11-13 14:05:57 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Blockchain MCP Server DEMO

A comprehensive Model Context Protocol (MCP) server for interacting with multiple EVM-compatible blockchains. This server provides tools and resources for blockchain data access and analysis.

Features

🔗 Multi-Chain Support

  • Ethereum Mainnet (Chain ID: 1)
  • Conflux eSpace (Chain ID: 1030)

🛠️ Tools (POST-like endpoints)

  1. get_chains - Get list of supported blockchain networks
  2. get_rpc_methods - Get supported RPC method list
  3. call_rpc - Execute arbitrary RPC method calls
  4. get_latest_block - Get latest block number for a chain
  5. get_transaction - Get transaction details by hash
  6. get_address - Get address balance and information
  7. get_block - Get block information by number

📚 Resources (GET-like endpoints)

  1. blockchain://transaction/{hash} - Fetch transaction details (cross-chain search)
  2. blockchain://block/{chainId}/{number} - Fetch block information
  3. blockchain://address/{chainId}/{address} - Fetch address information and balance
  4. blockchain://chains - List all supported blockchain networks

Technology Stack

  • TypeScript - Type-safe development
  • Viem - Modern Ethereum library with excellent TypeScript support
  • Model Context Protocol (MCP) - Standardized AI-blockchain communication
  • Zod - Runtime type validation

Installation

  1. Clone the repository:
git clone <repository-url>
cd blockchain-mcp-server
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Start the server:
npm start

Usage Examples

Tools

Get supported chains

// 获取所有支持的区块链网络
await callTool("get_chains", {});

Get transaction information

// 获取交易信息
await callTool("get_transaction", {
  hash: "0x1234567890abcdef...",
  chainId: 1  // optional, will search all chains if not provided
});

Get address information

// 获取地址信息
await callTool("get_address", {
  address: "0x742de6d65963b2c3a5e8e3b8c7cb56c6f78e0c00",
  chainId: 1
});

Execute RPC call

// 获取以太坊主网最新区块号
await callTool("call_rpc", {
  method: "eth_blockNumber",
  params: [],
  chainId: 1
});

// 获取地址余额
await callTool("call_rpc", {
  method: "eth_getBalance", 
  params: ["0x742de6d65963b2c3a5e8e3b8c7cb56c6f78e0c00", "latest"],
  chainId: 1
});

Resources

Access transaction data

// 跨链查询交易 (will search all supported chains)
const txResource = await getResource("blockchain://transaction/0x1234567890abcdef...");

Access block data

// 获取以太坊主网特定区块
const block = await getResource("blockchain://block/1/19000000");

// 获取Polygon特定区块
const polygonBlock = await getResource("blockchain://block/137/12345678");

Access address data

// 获取地址信息
const addressInfo = await getResource("blockchain://address/1/0x742de6d65963b2c3a5e8e3b8c7cb56c6f78e0c00");

Access supported chains

// 获取所有支持的区块链网络
const chains = await getResource("blockchain://chains");

Supported RPC Methods

The server supports the following standard Ethereum JSON-RPC methods:

  • eth_getBalance - Get account balance
  • eth_getTransactionByHash - Get transaction by hash
  • eth_getTransactionReceipt - Get transaction receipt
  • eth_getBlockByNumber - Get block by number
  • eth_getBlockByHash - Get block by hash
  • eth_getTransactionCount - Get account nonce
  • eth_getCode - Get contract code
  • eth_call - Execute contract call
  • eth_estimateGas - Estimate gas for transaction
  • eth_gasPrice - Get current gas price
  • eth_blockNumber - Get latest block number
  • eth_chainId - Get chain ID
  • net_version - Get network version
  • web3_clientVersion - Get client version

API Reference

Tools

get_chains

Returns a list of all supported blockchain networks.

Parameters: None

Response:

[
  {
    "chainId": 1,
    "name": "Ethereum Mainnet",
    "symbol": "ETH",
    "rpcUrls": [...],
    "blockExplorerUrls": [...],
    "nativeCurrency": {...}
  }
]

get_transaction

Get detailed transaction information.

Parameters:

  • hash (string): Transaction hash
  • chainId (number, optional): Chain ID to search on

Response:

{
  "hash": "0x...",
  "blockNumber": 19000000,
  "from": "0x...",
  "to": "0x...",
  "value": "1.0",
  "gasPrice": "0.00002",
  "gasUsed": "21000",
  "chainId": 1,
  "status": 1
}

get_address

Get address balance and information.

Parameters:

  • address (string): Ethereum address
  • chainId (number): Chain ID

Response:

{
  "address": "0x...",
  "balance": "10.5",
  "nonce": 42,
  "code": null,
  "chainId": 1
}

call_rpc

Execute arbitrary RPC method calls.

Parameters:

  • method (string): RPC method name
  • params (array, optional): Method parameters
  • chainId (number, optional): Chain ID (default: 1)

Response: Raw RPC response

Error Handling

The server includes comprehensive error handling:

  • Network failures: Automatic failover between RPC endpoints
  • Invalid parameters: Input validation using Zod schemas
  • Chain unavailability: Graceful handling when chains are down
  • Transaction not found: Cross-chain search with clear error messages

Architecture

src/
├── index.ts              # Main MCP server implementation
├── blockchain-service.ts # Blockchain interaction service (using viem)
├── config.ts            # Chain configurations and constants
└── types.ts             # TypeScript interfaces and schemas

Key Components

  1. BlockchainService: Manages connections to multiple EVM chains using viem clients
  2. MCP Server: Exposes tools and resources following MCP specification
  3. Type Safety: Full TypeScript support with Zod validation and viem's excellent types
  4. Multi-chain Support: Seamless interaction across different networks

Why Viem?

This project uses viem instead of ethers for several advantages:

  • Better TypeScript Support: Native TypeScript with strict typing
  • Modern API: Functional approach with better tree-shaking
  • Performance: Optimized for speed and bundle size
  • Reliability: Built-in retry logic and better error handling
  • Future-proof: Actively maintained with cutting-edge features

Testing

You can test the server using the MCP Inspector:

npx @modelcontextprotocol/inspector node dist/index.js

Configuration

The server automatically connects to multiple blockchain networks using public RPC endpoints. You can customize RPC endpoints by modifying the src/config.ts file.

Adding New Chains

To add support for new EVM-compatible chains, update the SUPPORTED_CHAINS object in src/config.ts:

export const SUPPORTED_CHAINS: Record<number, ChainConfig> = {
  // ... existing chains
  
  // New chain example
  YOUR_CHAIN_ID: {
    chainId: YOUR_CHAIN_ID,
    name: "Your Chain Name",
    symbol: "TOKEN",
    rpcUrls: [
      "https://rpc.yourchain.com",
      "https://backup-rpc.yourchain.com"
    ],
    blockExplorerUrls: ["https://explorer.yourchain.com"],
    nativeCurrency: {
      name: "Your Token",
      symbol: "TOKEN",
      decimals: 18
    }
  }
};

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

For questions or issues, please open an issue on the GitHub repository.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Blockchain MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/blockchain-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related finance crypto MCP Servers

Alternative and complementary servers in the same category

View all in finance crypto →
USA Spending MCP Server
usaspending-mcp-server•thsmale

A stateless streamable HTTP MCP server for interacting with the official source of government spending data.

Repository stats unavailable
Finance & Analytics
Fortnox MCP server — More AI
more-ai-chatgpt-claude-mcp-fortnox•amor3

A hosted, remote MCP server for Fortnox that lets AI assistants answer questions from a company's bookkeeping and propose changes for approval before writing them.

0
Finance & Analytics

OptimistFi is a read-only remote MCP server that provides perpetual futures market data, perps prop firm rules and pricing, and US equity investment research.

Repository stats unavailable
Finance & Analytics