
Web3 Assistant MCP
โ 1from LaplaceMan
A secure, multi-chain toolkit for interacting with blockchain smart contracts.
๐ฅ๐ฅ๐ฅโ VerifiedAccount requiredNeeds API keys
Web3 Assistant MCP
A secure blockchain smart contract interaction toolkit with multi-chain support.
Key Features
- ๐ Smart Contract ABI Analysis
- ๐ก Contract Method Invocation (view/nonpayable/payable)
- ๐ Local Wallet Address Management
- ๐ Multi-chain Support
Project Structure
web3-assistant-mcp/
โโโ src/
โ โโโ common/
โ โ โโโ clients/ # Blockchain client implementations
โ โ โโโ constants/ # Network configurations
โ โ โโโ services/ # Core services (contract, wallet)
โ โ โโโ utils/ # Helper functions
โ โโโ tools/ # MCP tool implementations
โ โโโ types/ # TypeScript type definitions
โโโ test/ # Test suites
โโโ .env.example # Environment template
โโโ smithery.yaml # MCP server configurationMCP Tools Documentation
๐ analyze_contract_abi - ABI Analysis
{
"abi": "[Contract ABI JSON string]"
}Features:
- Parse contract ABI and list callable methods
- Auto-detect method types (view/pure/payable)
- Input/output parameter types
- State mutability
๐ call_contract - Contract Interaction
{
"abi": "[Method ABI]",
"networkName": "base|baseSepolia",
"contractAddress": "0x...",
"functionName": "methodName",
"args": ["param1", param2],
"value": 0.001 // ETH amount for payable methods (in ETH)
}Supported Operations:
- Read contract state (view/pure)
- Send transactions (nonpayable)
- Token transfers (payable)
๐ local_wallet_address - Wallet Address
No parameters required:
{
"address": "0x..."
}Security Guidelines
- Private Key Management: Configure via environment variables
- Transaction Verification: Confirm details for payable methods
- Gas Limits: Automatic safe gas calculation
Copy & paste โ that's it
pnpm installBefore it works, you'll need: ALCHEMY_KEYINFURA_KEYANKR_KEYPRIVATE_KEY
Quick Start
Prerequisites
- Node.js 18+
- pnpm
- Configure environment variables (copy .env.example):
cp .env.example .envInstallation
pnpm installBuild
pnpm buildMCP Configuration Example
{
"mcpServers": {
"web3-assistant": {
"command": "node",
"args": [
"***/dist/index.js"
],
"env": {
"ALCHEMY_KEY": "your_alchemy_key",
"INFURA_KEY": "your_infura_key",
"ANKR_KEY": "your_ankr_key",
"PRIVATE_KEY": "your_wallet_private_key"
}
}
}
}Path Note: When using MCP locally, replace *** with the absolute path to your MCP server directory.
Network Configuration
Pre-configured networks in src/common/constants/networks:
mainnet: Ethereum Mainnetsepolia: Ethereum Sepoliabase: Base MainnetbaseSepolia: Base Testnet
No common issues documented yet. If you hit a problem, the repository's GitHub Issues page is the best place to look.