
foundry-mcp-server
by PraneshASP·★ 247·Score 48
An MCP server for Solidity developers providing comprehensive Foundry toolchain integration.
Overview
This is a robust MCP server that connects LLM assistants to the Foundry ecosystem, enabling blockchain development and analysis capabilities. It provides extensive tools for interacting with nodes, analyzing smart contracts, performing EVM operations, and managing Solidity code. The server maintains a persistent Forge workspace and supports both local Anvil instances and remote RPC endpoints.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this server if you're working with Solidity development and want AI assistants to directly interact with the Foundry ecosystem for contract analysis, testing, and deployment.
When NOT to choose this
Avoid this server if you need blockchain support for networks other than EVM-compatible ones, or if you're concerned about the security implications of providing private keys to AI systems.
Tools this server exposes
12 tools extracted from the READMEanvil_startStart a new Anvil instance
anvil_stopStop a running Anvil instance
anvil_statusCheck if Anvil is running and get its status
cast_callCall a contract function (read-only)
cast_sendSend a transaction to a contract function
cast_balanceCheck the ETH balance of an address
forge_scriptRun a Forge script from the workspace
create_solidity_fileCreate or update a Solidity file in the workspace
heimdall_disassembleDisassemble EVM bytecode into human-readable opcodes
heimdall_decompileDecompile EVM bytecode to Solidity source code and ABI
estimate_gasEstimate the gas cost of a transaction
convert_eth_unitsConvert between EVM units (wei, gwei, hex)
Comparable tools
Installation
Installation
Prerequisites
- Node.js v18+
- Foundry toolchain (Forge, Cast, Anvil)
- Heimdall-rs (for smart contract analysis)
Using NPM Package
npm install -g @pranesh.asp/foundry-mcp-serverClaude Desktop Configuration
{
"mcpServers": {
"foundry": {
"command": "npx",
"args": ["@pranesh.asp/foundry-mcp-server"],
"env": {
"RPC_URL": "http://localhost:8545",
"PRIVATE_KEY": "0x..."
}
}
}
}FAQ
- Is it safe to provide my PRIVATE_KEY to the MCP server?
- No, do not add keys with mainnet funds. The code uses keys safely, but LLMs can hallucinate and send malicious transactions. Only use for testing/development purposes.
- What makes this MCP server unique for Solidity development?
- It provides a comprehensive set of tools for the entire Solidity development lifecycle - from writing code and managing dependencies to deploying contracts and analyzing transactions - all accessible through MCP clients.
Compare foundry-mcp-server with
Last updated · Auto-generated from public README + GitHub signals.