Blockchain MCP Server
A server for blockchain interactions, offering Ethereum vanity address generation, 4byte lookup, ABI encoding, and multi-chain RPC calls.
Blockchain MCP Server
A Model Context Protocol (MCP) based blockchain tools server providing Ethereum vanity address generation and Cast command functionality.
Features
1. Ethereum Vanity Address Generation
- 🎯 Support for specifying address prefix and suffix
- ⚡ Multi-threaded concurrent computation for optimized performance
- 📊 Real-time generation statistics display
- ✅ Address validity verification
2. Cast Command Tools
- 🔍 4byte: Get function signatures from function selectors
- 🔧 4byte-decode: Decode ABI-encoded calldata
- 📦 abi-encode: ABI encode function parameters
- 🔄 abi-decode: ABI decode data
3. RPC Service
- 📞 static-call: Make static calls on any EVM-compatible chain (read-only)
- 💸 send-transaction: Send transactions to smart contracts (requires private key)
- 💰 get-balance: Query address balance
- 🔗 list-chains: List supported chains
Installation and Usage
Install Dependencies
npm install
Build Project
npm run build
Run Server
npm start
Development Mode
npm run dev
Tool Usage Guide
Vanity Address Generation
generate-vanity-address
Generate Ethereum addresses matching specified conditions
Parameters:
prefix(optional): Address prefix, excluding 0xsuffix(optional): Address suffixworkers(optional): Number of concurrent threads, default 4, max 16caseSensitive(optional): Whether case-sensitive, default false
Example:
{
"prefix": "1234",
"suffix": "abcd",
"workers": 8,
"caseSensitive": false
}
validate-ethereum-address
Validate Ethereum address validity
Parameters:
address: Ethereum address to validate
Cast Command Tools
4byte
Get function signatures for the given selector
Parameters:
selector: 4-byte function selector (hexadecimal)
Example:
{
"selector": "0xa9059cbb"
}
4byte-decode
Decode ABI-encoded calldata
Parameters:
calldata: ABI-encoded calldata (hexadecimal)
Example:
{
"calldata": "0xa9059cbb000000000000000000000000..."
}
abi-encode
ABI encode function parameters
Parameters:
types: Parameter types arrayvalues: Parameter values array
Example:
{
"types": ["uint256", "address", "bool"],
"values": [1000, "0x1234567890123456789012345678901234567890", true]
}
abi-encode-with-signature
Complete function call ABI encoding (with function selector)
Parameters:
functionSignature: Function signaturevalues: Parameter values array
Example:
{
"functionSignature": "transfer(address,uint256)",
"values": ["0x1234567890123456789012345678901234567890", 1000]
}
abi-decode
Decode ABI-encoded data
Parameters:
types: Parameter types arraydata: Hexadecimal data to decode
Example:
{
"types": ["uint256", "address"],
"data": "0x00000000000000000000000000000000000000000000000000000000000003e8"
}
RPC Service Tools
list-chains
List all supported EVM-compatible chains
Parameters: None
get-balance
Query address balance on specified chain
Parameters:
chain: Chain identifier (e.g., "ethereum", "polygon", "bsc")address: Address to queryblockTag(optional): Block tag, default "latest"
Example:
{
"chain": "ethereum",
"address": "0x1234567890123456789012345678901234567890"
}
static-call
Make static calls to smart contracts (read-only operations)
Parameters:
chain: Chain identifierto: Contract addressdata: ABI-encoded function call datablockTag(optional): Block tag, default "latest"
Example:
{
"chain": "ethereum",
"to": "0xA0b86a33E6441068C73f4Ea6cB24b80b52bF97F4",
"data": "0x70a08231000000000000000000000000123456789012345678901234567890123456789"
}
send-transaction
Send transactions to smart contracts (requires private key)
Parameters:
chain: Chain identifierto: Contract addressdata: ABI-encoded function call datavalue(optional): ETH amount to send (wei)gasLimit(optional): Gas limitgasPrice(optional): Gas price (wei)privateKey: Sender's private key
Example:
{
"chain": "sepolia",
"to": "0x1234567890123456789012345678901234567890",
"data": "0xa9059cbb000000000000000000000000...",
"value": "0",
"privateKey": "0x..."
}
Performance Optimization
Vanity Address Generation Performance Tips
- Shorter prefixes generate faster
- Suffixes are slightly easier than prefixes
- Recommended to use 4-8 worker threads for optimal performance
- Avoid specifying both long prefix and long suffix simultaneously
Expected Generation Time
- 4 hex characters: seconds to minutes
- 5 hex characters: minutes to tens of minutes
- 6 hex characters: hours
- 7+ characters: may take very long time
Supported Blockchain Networks
Mainnet
- Ethereum: ethereum (Chain ID: 1)
- Polygon: polygon (Chain ID: 137)
- BSC: bsc (Chain ID: 56)
- Arbitrum: arbitrum (Chain ID: 42161)
- Optimism: optimism (Chain ID: 10)
- Avalanche: avalanche (Chain ID: 43114)
- Fantom: fantom (Chain ID: 250)
Testnet
- Sepolia: sepolia (Chain ID: 11155111)
All networks use public RPC endpoints to ensure stability and accessibility.
Tech Stack
- TypeScript: Type-safe JavaScript
- MCP SDK: Model Context Protocol implementation
- Ethers.js: Ethereum library
- Node.js Worker Threads: Multi-threaded concurrent computation
- 4byte.directory API: Function signature database
Security Considerations
⚠️ Important Notes:
- Generated private keys have complete control over assets
- Always keep private keys secure and never share them with anyone
- Recommend generating important addresses in offline environments
- This tool is for learning and testing purposes only
Installation via NPM
You can install this MCP server globally:
npm install -g blockchain-mcp-server
Or use it with npx:
npx blockchain-mcp-server
MCP Configuration
Add to your MCP client configuration:
{
"mcpServers": {
"blockchain": {
"command": "npx",
"args": ["blockchain-mcp-server"]
}
}
}
License
MIT License
Servidores relacionados
Scout Monitoring MCP
patrocinadorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
patrocinadorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Airflow MCP Server
Control Apache Airflow via its API using JWT authentication.
MCP Hot-Reload
A Hot Module Replacement (HMR) proxy server for MCP servers that automatically restarts on file changes, buffers messages, and manages connections.
LastSaaS
SaaS boilerplate / starter kit: comprehensive, Stripe billing, product management, multi-tenant; agentic controls via MCP
Limetest
A lightweight, AI-powered end-to-end testing framework for CI workflows. Requires an OpenAI API key.
Osmosis Agent Toolkit
An MCP server for the Osmosis Agent Toolkit, enabling interactions with the Osmosis blockchain.
Jenkins Server MCP
A tool for interacting with Jenkins CI/CD servers, requiring environment variables for configuration.
Cedardiff
Edit files using CEDARScript, a SQL-like language for code manipulation.
Software Planning Tool
Facilitates software development planning through an interactive and structured approach.
Buildable
Official MCP server for Buildable AI-powered development platform. Enables AI assistants to manage tasks, track progress, get project context, and collaborate with humans on software projects.
ForgeCraft
MCP server that generates production-grade engineering standards (SOLID, testing, architecture, CI/CD) for AI coding assistants