eth-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@eth-mcp Build me a swapping app with a 1% tax token on Base"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
eth-mcp
MCP server that enables AI agents to build and deploy Ethereum applications using Scaffold-ETH.
The AI is the planner. The MCP server is the executor.
Quick Start
Add to your Cursor MCP config (~/.cursor/mcp.json):
{
"mcpServers": {
"eth-mcp": {
"command": "npx",
"args": ["-y", "eth-mcp@latest"]
}
}
}Restart Cursor. Done! Now ask your AI:
"Build me a swapping app with a 1% tax token on Base"
Related MCP server: multivon-mcp
What This Does
eth-mcp is a Model Context Protocol (MCP) server that:
Clones and configures Scaffold-ETH projects - Foundry + Next.js stack
Manages long-running processes - Anvil fork, contract deployment, frontend
Provides file access - Read/write project files
Exposes logs and status - Resources for agent polling
Includes Web3 knowledge - Guides for incentive design and Solidity patterns
DeFi address registry - Token and protocol addresses across 5 chains
DeFi yield tools - Query live APY/TVL data from DefiLlama
This enables AI agents to go from natural language to running dApp without manual intervention.
Recommended MCP Stack
eth-mcp is designed to work alongside companion MCP servers for a complete Ethereum development experience. We strongly recommend installing all three:
MCP Server | Purpose | Essential For |
eth-mcp | Build, deploy, run local dev | Core functionality |
mcp-server-ens | ENS name resolution | Resolving .eth names (vitalik.eth → 0x...) |
@blockscout/mcp-server | Blockchain exploration | Tx analysis, contract ABIs, on-chain data |
Full Configuration (Recommended)
Add all three to your ~/.cursor/mcp.json:
{
"mcpServers": {
"eth-mcp": {
"command": "npx",
"args": ["-y", "eth-mcp@latest"]
},
"ens": {
"command": "npx",
"args": ["-y", "mcp-server-ens"]
},
"blockscout": {
"command": "npx",
"args": ["-y", "@blockscout/mcp-server"]
}
}
}Division of Responsibilities
Task | eth-mcp | ENS MCP | Blockscout |
Scaffold project | ✅ | ||
Deploy contracts | ✅ | ||
Run local fork | ✅ | ||
Start frontend | ✅ | ||
Resolve vitalik.eth | ✅ | ||
Get ENS records (avatar, socials) | ✅ | ||
Check mainnet balances | ✅ | ||
Analyze transactions | ✅ | ||
Get contract ABIs | ✅ | ||
Look up token addresses | ✅ (registry) | ✅ (live) | |
Query live yield data | ✅ |
Example Workflow
1. Use ENS MCP to resolve "vitalik.eth" to get the address
2. Use Blockscout to check their USDC balance and recent transactions
3. Use eth-mcp to scaffold a project that interacts with their address
4. Use eth-mcp to write and deploy contracts locally
5. Use Blockscout to verify mainnet state your fork is based on
6. Use eth-mcp to start frontend and testWhy All Three?
eth-mcp handles the local development loop: scaffolding, forking, deploying, hot-reloading
ENS MCP handles name resolution: converting human-readable .eth names to addresses
Blockscout handles blockchain exploration: reading mainnet state, analyzing transactions, fetching ABIs
The AI agent orchestrates all three, choosing the right tool for each task.
Alternative Installation (from source)
# Clone the repo
git clone https://github.com/austintgriffith/eth-mcp
cd eth-mcp
# Install dependencies
npm install
# Build
npm run buildConfigure MCP Client (local)
Add to your MCP settings:
{
"mcpServers": {
"eth-mcp": {
"command": "node",
"args": ["/path/to/eth-mcp/dist/index.js"]
}
}
}MCP Tools
Stack Management
Tool | Description |
| Clone Scaffold-ETH, configure for chain |
| Install dependencies (yarn install) |
| Start components: fork, deploy, frontend |
| Stop running components |
| Get health report and URLs |
Process Management
Tool | Description |
| List all managed processes |
| Get stdout/stderr for a process |
| Stop a specific process |
Project Files
Tool | Description |
| Read a project file |
| Write content to a file |
| List directory contents |
MCP Resources
Resources for polling status and logs:
Resource URI | Description |
| Current stack health |
| Stack configuration |
| Anvil fork output |
| Anvil fork errors |
| Next.js output |
| Next.js errors |
| Deployed contract addresses |
Example Agent Workflow
Here's how an AI agent would build a tax token swap app:
Agent: "Build a swapping app with a 1% tax token on Base"
1. stack_init({ template: "scaffold-eth", chain: "base", workspacePath: "/tmp/tax-swap" })
→ Clones scaffold-eth-2, configures for Base
2. stack_install()
→ Runs yarn install
3. project_writeFile({ path: "packages/foundry/contracts/TaxToken.sol", content: "..." })
→ Creates the tax token contract
4. project_writeFile({ path: "packages/foundry/script/Deploy.s.sol", content: "..." })
→ Updates deploy script
5. stack_start({ components: ["fork", "deploy", "frontend"] })
→ Starts Anvil fork of Base
→ Deploys contracts
→ Starts Next.js
6. stack_status()
→ Returns: { urls: { rpc: "http://localhost:8545", frontend: "http://localhost:3000" } }
7. project_writeFile({ path: "packages/nextjs/app/page.tsx", content: "..." })
→ Creates swap UI on home page
Result: Running app at http://localhost:3000Supported Chains
Chain | ID | Fork RPC |
mainnet | 1 | Public RPC |
base | 8453 | Public RPC |
optimism | 10 | Public RPC |
arbitrum | 42161 | Public RPC |
polygon | 137 | Public RPC |
sepolia | 11155111 | Public RPC |
Documentation for AI Agents
The docs/ folder contains guides that help AI agents understand Web3 development:
WEB3_DEVELOPMENT_GUIDE.md - Mental model shift, incentive thinking, security patterns
SOLIDITY_PATTERNS.md - Common contract patterns and templates
DEFI_BUILDING_BLOCKS.md - DeFi primitives and composability
AI agents should read these before building complex applications.
Protocol Packs
Example protocol integrations in protocol-packs/:
uniswap-v4-tax-swap
Placeholder implementation of:
TaxToken.sol- ERC-20 with 1% transfer taxTaxSwapHook.sol- Uniswap V4 hook for tax handlingSwapUI.tsx- React swap interface
This shows structure, not full implementation. V4 is still in development.
Safety
The server enforces several safety constraints:
Command Allowlist:
Only
git,yarn,npm,pnpm,npx,forge,anvil,cast,node
Private Key Protection:
Sanitizes output to remove private keys
Blocks access to
.envfilesFilters sensitive environment variables
No Mainnet Writes:
Local development only
Fork-based testing
Architecture
┌─────────────────────────────────────────────────────────────┐
│ AI Agent │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ "Build me a swapping app with a 1% tax token" │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────┬───────────────────────────────────┘
│ MCP Protocol
┌─────────────────────────▼───────────────────────────────────┐
│ eth-mcp │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Stack │ │ Process │ │ Project │ │Resources │ │
│ │ Tools │ │ Manager │ │ Tools │ │ │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
└───────┼─────────────┼─────────────┼─────────────┼──────────┘
│ │ │ │
┌───────▼─────────────▼─────────────▼─────────────▼──────────┐
│ Workspace │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ scaffold-eth-2 │ │
│ │ ┌───────────────┐ ┌───────────────────────────┐ │ │
│ │ │ Foundry │ │ Next.js │ │ │
│ │ │ (Contracts) │ │ (Frontend) │ │ │
│ │ └───────────────┘ └───────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────┐ ┌─────────────────────────────────┐ │
│ │ Anvil Fork │ │ http://localhost:3000 │ │
│ │ (Base chain) │ │ (Running app) │ │
│ └─────────────────┘ └─────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘Development
# Watch mode
npm run dev
# Type check
npm run typecheck
# Run server directly
npm startLimitations (v1)
Local development only (no mainnet deployment)
Single workspace at a time
Basic error recovery
Placeholder protocol pack implementations
License
MIT
Available Tools
34 toolsaddresses_findTokenA
Search for a token symbol across all chains. Useful when you need to find where a token exists. Returns all chains where the token is available with addresses.
Inputs: symbol (required).
addresses_getProtocolA
Get contract addresses for a DeFi protocol on a specific chain. Examples:
uniswapV3 on Base: returns factory, router, quoterV2, positionManager
aaveV3 on Arbitrum: returns pool, poolDataProvider, oracle
moonwell on Base: returns comptroller, mWETH, mUSDbC, flagshipETH vault
Supported protocols by chain:
All chains: uniswapV3, uniswapV4, aaveV3, chainlink, permit2, universalRouter, multicall, create2, safe, entryPoint, oneInch, zeroX, pyth
Base: aerodrome, moonwell, morpho, chainlinkAutomation
Optimism: velodrome
Arbitrum: gmx, camelot, pendle
Mainnet: uniswapV2, sushiswap, curve, lido, compoundV3, eigenLayer, morphoBlue
Infrastructure (same address all chains):
permit2: Universal token approvals (0x000000000022D473030F116dDEE9F6B43aC78BA3)
multicall: Batch read calls (0xcA11bde05977b3631167028862bE2a173976CA11)
entryPoint: ERC-4337 Account Abstraction (v06, v07)
safe: Gnosis Safe multisig (proxyFactory, singleton)
Inputs: chain (required), protocol (required).
addresses_getTokenA
Get a token's contract address on a specific chain. Examples:
WETH on Base: returns 0x4200000000000000000000000000000000000006
USDC on Arbitrum: returns 0xaf88d065e77c8cC2239327C5EDb3A432268e5831
wstETH on Optimism: returns 0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb
Supported chains: mainnet, base, optimism, arbitrum, polygon Common tokens: WETH, USDC, USDT, DAI, WBTC, wstETH, rETH, cbETH
Inputs: chain (required), symbol (required).
addresses_getWhaleA
Get whale addresses for funding test wallets with tokens on Anvil forks.
WHEN TO USE: When users need tokens (USDC, WETH, DAI) to test their DeFi apps.
Returns protocol contract addresses (Morpho, Aave) that hold large token balances. Protocol contracts are more reliable than EOAs because they hold funds as their core function.
Also returns one-shot cast commands to transfer tokens from the whale to a recipient.
Example usage flow:
User builds a USDC vault on Base
Call addresses_getWhale({ chain: "base", token: "USDC" })
Get Morpho Blue whale (0xBBBB...) with ~131M USDC
Provide user with cast commands to fund their wallet
Inputs: chain (required), token (required), amount, recipient.
addresses_listProtocolsA
List all known DeFi protocols and their addresses on a specific chain.
Inputs: chain (required).
addresses_listTokensA
List all known token addresses on a specific chain. Returns symbols, addresses, decimals for all tokens in the registry.
Inputs: chain (required).
addresses_listWhalesA
List all available token whales on a specific chain. Shows which tokens have known whale addresses for funding test wallets.
Inputs: chain (required).
defi_compareYieldsA
Compare yields for a specific asset across protocols on a chain. Useful for finding the best place to deposit a specific token. Example: Compare USDC yields on Base to find best lending rate.
Inputs: asset (required), chain (required), minTvl.
defi_getProtocolTVLA
Get Total Value Locked (TVL) for a DeFi protocol across all chains. Use to assess protocol health and trustworthiness. Higher TVL generally means more battle-tested.
Inputs: protocol (required).
defi_getTopProtocolsA
Get top DeFi protocols by TVL on a specific chain. Useful for discovering what protocols are most used on a chain.
Inputs: chain (required), limit, category.
defi_getYieldsA
Query DefiLlama for top yield opportunities. Filter by chain, protocol, or asset. Returns APY, TVL, and pool details. Examples:
Get all yields on Base: { chain: "base" }
Get Aave yields: { protocol: "aave-v3" }
Get USDC yields on Arbitrum: { chain: "arbitrum", asset: "USDC" }
Inputs: asset, chain, limit, minTvl, +1 more.
education_explainLessonA
Get the full explanation and code examples for a specific lesson.
Use this when a developer wants to understand the "why" behind a warning, or when you need to show them correct vs incorrect code patterns.
Includes:
Deep explanation of the concept
Code example of what NOT to do (common mistake)
Code example of the RIGHT way
Links to related documentation
Inputs: lessonId (required).
education_getChecklistA
Get an interactive checklist of Web3 considerations for a specific category.
Use this to walk developers through important concepts as teaching moments.
Categories:
tokens: Decimals, approvals, transfers (CRITICAL: USDC has 6 decimals!)
math: Percentages, rounding, precision (CRITICAL: No floats in Solidity!)
automation: Triggers, keepers, incentives (CRITICAL: Nothing is automatic!)
security: Reentrancy, access control, oracles
vaults: ERC-4626, share accounting, inflation attacks
defi: MEV, slippage, liquidity, protocol integration
all: Get all lessons
Returns questions with short warnings. Use education_explainLesson for deep dives.
Inputs: category (required).
education_getCriticalLessonsA
Get all CRITICAL severity lessons - the most important gotchas that cause major bugs.
These are the lessons that, if ignored, lead to:
Loss of user funds
Contract exploits
Catastrophic failures
ALWAYS review critical lessons before deploying any contract.
Inputs: no named parameters.
education_listCategoriesA
List all available lesson categories with descriptions.
Use this to understand what topics are covered and help developers choose which checklist to work through.
Inputs: no named parameters.
education_suggestLessonsA
Given a project description or plan, suggest which lessons are most relevant.
Use this at the START of a project to identify potential pitfalls early.
Example inputs:
"Build a USDC vault with 5% APY"
"Create a token swap aggregator"
"Make a staking contract with daily rewards"
Returns the most relevant lessons based on keywords, prioritized by severity.
Inputs: description (required), limit.
frontend_lintDesignA
Scan frontend files for banned design patterns (purple gradients, glassmorphism, etc.).
Use this tool to verify frontend code follows eth-mcp design guidelines BEFORE finishing any frontend work.
Scans for:
Purple/violet/indigo/lavender colors (BANNED)
Gradient backgrounds (BANNED)
Glassmorphism/blur effects (BANNED)
Excessive shadows > shadow-md (BANNED)
Purple-adjacent gradient combinations (BANNED)
Returns errors and warnings with line numbers and suggested fixes.
Inputs: path (required).
frontend_validateAllA
Scan entire frontend for ALL critical rule violations.
This tool performs a comprehensive scan of your frontend code for:
CRITICAL (would block writes):
Hardcoded contract addresses (use useDeployedContractInfo instead)
Raw wagmi hooks (use scaffold-eth hooks)
Infinite token approvals (security risk!)
Old hook names (useScaffoldContractRead → useScaffoldReadContract)
Dangerous config changes (onlyLocalBurnerWallet: false)
WARNINGS (non-blocking):
Inline ABI definitions (should use deployedContracts/externalContracts)
Generic hardcoded addresses (may be intentional)
Use this tool to audit your codebase before deployment or to find existing issues.
Inputs: path, includeWarnings.
process_listA
List all managed processes and their status. Shows process ID, command, status, PID, and start time.
Inputs: no named parameters.
process_logsB
Get stdout and stderr logs for a managed process. Use tail parameter to get only the last N lines.
Inputs: id (required), tail.
process_stopC
Stop a specific managed process by ID.
Inputs: id (required).
project_listFilesA
List files in a project directory. Path should be relative to the project root. Use to explore the project structure.
Inputs: path, recursive.
project_readFileA
Read a file from the Scaffold-ETH project. Path should be relative to the project root. Cannot read .env files or files containing private keys.
Inputs: path (required).
project_writeFileA
Write content to a file in the Scaffold-ETH project. Path should be relative to the project root. Cannot write to .env files or write content containing private keys. Creates parent directories if they don't exist.
IMPORTANT: After writing frontend files, you MUST review the code against critical rules. The response will include a REVIEW_REQUIRED section with instructions.
Inputs: path (required), content (required).
stack_checkAccountA
INTERACTIVE COMMAND - Returns instructions for the user to run manually.
'yarn account' shows the deployer address and balances but MAY prompt for the keystore password. AI tools should NOT run this command as it may hang waiting for password input.
This tool returns step-by-step instructions for the user to run in their terminal.
Inputs: no named parameters.
stack_checkProductionReadinessA
Check if the project is ready for production deployment.
CRITICAL: Call this BEFORE deploying to Vercel or any production hosting.
This tool verifies:
RPC Configuration - Checks if NEXT_PUBLIC_ALCHEMY_API_KEY is set (required for non-Ethereum chains)
Environment files - Checks if .env.local exists with required variables
Chain compatibility - Warns about chains that need custom RPC
For chains like Base, Optimism, Arbitrum, Polygon:
Public RPCs (mainnet.base.org) WILL fail with 429 rate limits in production
You MUST set up your own RPC via Alchemy (free tier available)
Returns a pass/fail checklist with specific instructions for any failed items.
Inputs: no named parameters.
stack_configureExternalContractsA
Configure external contracts for the Scaffold-ETH debug UI.
Adds contract addresses and ABIs to packages/nextjs/contracts/externalContracts.ts so you can interact with external protocols (USDC, Aave, Uniswap) in the debug UI.
WHEN TO USE: When building projects that interact with external contracts:
Token interactions: "build a USDC vault" → add USDC with type: "ERC20"
DeFi integrations: "integrate with Aave" → add Aave pool with type: "AaveV3Pool"
DEX swaps: "swap on Uniswap" → add router with type: "UniswapV3Router"
BUNDLED ABIs (no external fetch needed):
ERC20: Standard tokens (USDC, DAI, WETH, etc.)
ERC721: NFT contracts
ERC4626: Tokenized vaults
AaveV3Pool: Aave lending pool
AaveV3PoolDataProvider: Aave data queries
UniswapV3Router: Uniswap V3 swaps
UniswapV3Quoter: Swap quotes
UniswapV2Router: V2-style DEX swaps
If a contract type is not bundled and no ABI is provided:
Try using Blockscout MCP to fetch the ABI
Or instruct the user to get the ABI from Etherscan/Blockscout manually
CHAIN IDs: Adds entries for BOTH 31337 (local fork) AND the real chainId, so contracts work during local dev and after mainnet deployment.
Inputs: contracts (required), chain.
stack_generateAccountA
INTERACTIVE COMMAND - Returns instructions for the user to run manually.
'yarn generate' creates an encrypted deployer keystore but REQUIRES interactive password input. AI tools CANNOT run this command - it will hang waiting for input.
This tool returns step-by-step instructions for the user to run in their terminal.
Inputs: no named parameters.
stack_initA
Initialize a new Scaffold-ETH 2 project with Foundry, configured for a specific mainnet chain.
IMPORTANT: The chain parameter specifies which MAINNET to fork for local development. All development happens on a LOCAL Anvil fork (chainId 31337) - you never deploy directly to mainnet from here.
Supported chains: mainnet, base, optimism, arbitrum, polygon. NO TESTNETS - use fork workflow instead (fork gives you real mainnet state for free).
Development workflow after init:
stack_install() - Install dependencies
stack_start(["fork"]) - Runs: yarn fork --network
stack_start(["deploy"]) - Deploy to LOCAL fork (free!)
stack_start(["frontend"]) - Start frontend connected to local fork
When ready: yarn generate && yarn deploy --network for mainnet
The workspace path should be an empty directory. Requires Foundry CLI tools (forge, anvil) - call stack_install_foundry first if not installed.
Inputs: chain (required), template (required), workspacePath (required).
stack_installA
Install dependencies for the Scaffold-ETH project. This runs 'yarn install' in the workspace. Must run stack.init first.
Inputs: no named parameters.
stack_install_foundryA
Install the Foundry toolchain (forge, anvil, cast, chisel). Call this tool if stack_init or stack_start fails with "Foundry not installed" error. This downloads and runs the official Foundry installer (foundryup). Requires curl and bash to be available.
Inputs: no named parameters.
stack_startA
Start one or more stack components for LOCAL development.
Components:
fork: Start LOCAL Anvil fork of the chain configured during stack_init (chainId 31337) RUNS: yarn fork --network Example: If you initialized with chain "base", this runs: yarn fork --network base Anvil understands chain names and resolves them to RPC URLs automatically. This creates a local copy of mainnet state - all testing happens here for FREE.
deploy: Deploy contracts to the LOCAL fork (NOT to mainnet!) This is safe and costs nothing - iterate as many times as needed.
frontend: Start the Next.js dev server connected to the local fork
IMPORTANT: All deployment via this tool goes to localhost:8545 (the local fork). This is the development workflow - test everything locally before mainnet.
For MAINNET deployment (after testing):
yarn generate - Create deployer wallet
yarn deploy --network - Deploy to real mainnet
You can start multiple components at once. Order matters: fork should start before deploy.
Inputs: components (required).
stack_statusA
Get the current status of the Scaffold-ETH stack. Returns initialization state, component status, URLs, and deployed contracts.
Inputs: no named parameters.
stack_stopB
Stop one or more running stack components (fork, frontend).
Inputs: components (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 34 tools
Each tool clearly targets a distinct aspect of the scafford-eth workflow, education, DeFi data, or address lookups. Even similar-sounding tools like addresses_getToken and addresses_findToken have different purposes (exact address vs. cross-chain search), eliminating confusion.
All tool names follow a consistent 'category_verb_noun' pattern using snake_case (e.g., education_explainLesson, stack_start, defi_getProtocolTVL). This makes the tool surface highly predictable and easy for an AI to navigate.
34 tools is on the high side, but each tool serves a necessary function within the multi-faceted scaffold-eth domain (stack management, education, DeFi, addresses, frontend, project files, processes). A few tools could be merged (e.g., stack_start could combine fork/deploy/frontend into one param), but the granularity aids clarity.
The tool set covers the full local development workflow: init, install, start/stop components, configure external contracts, check production readiness, and even education and linting. The only notable gap is automated mainnet deployment, which is intentionally left as manual instructions, so the surface feels slightly incomplete for a truly end-to-end pipeline.
Maintenance
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server for the Z1N Protocol - on-chain identity for AI agents on Polygon
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceAn MCP server providing tools for AI agents to mint ERC-20 tokens across multiple blockchains.22MIT

multivon-mcpofficial
AlicenseAqualityBmaintenanceMCP server that gives AI coding agents direct access to evaluation tools.23Apache 2.0- AlicenseAqualityDmaintenanceAn MCP server that gives autonomous coding agents deterministic, schema-validated tools for EVM smart contract development — security scanning, gas profiling, compiler diagnostics, and transaction simulation.91MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI agents real-time access to DeFi across multiple chains, enabling non-custodial crypto trading, portfolio queries, and transaction execution.7MIT