foundry-mcp-server

MCP.Pizza Chef: PraneshASP

Written for people who work in Solidity, it drives the Foundry command-line tools already on your machine: start a private test blockchain, read a contract's stored values, unpick what a transaction did, estimate fees or run a deployment script. Looking is safe and needs no credentials. Sending a transaction requires a wallet key, and the author warns never to use one holding real money. The bytecode analysis features additionally need Heimdall installed separately. The project calls itself experimental.

Coding
Data

Use This MCP server To

Explain what a suspicious Ethereum transaction actually did Check the balance of a wallet address Spin up a private test blockchain and deploy to it Decode raw transaction data without the contract source Estimate the fee before sending a transaction Look up what an unfamiliar contract function does

README

Foundry MCP Server

A simple, lightweight and fast MCP (Model Context Protocol) server that provides Solidity development capabilities using the Foundry toolchain (Forge, Cast, and Anvil).

Foundry MCP Demo

Overview

This server connects LLM assistants to the Foundry ecosystem, enabling them to:

  • Interact with nodes (local Anvil instances or remote RPC endpoints)
  • Analyze smart contracts and blockchain data
  • Perform common EVM operations using Cast
  • Manage, deploy, and execute Solidity code and scripts
  • Work with a persistent Forge workspace

Features

Network Interaction

  • Start and manage local Anvil instances
  • Connect to any remote network (just specify the RPC)
  • Get network/chain information

Contract Interaction

  • Call contract functions (read-only)
  • Send transactions to contracts (if PRIVATE_KEY is configured)
  • Get transaction receipts
  • Read contract storage
  • Analyze transaction traces
  • Retrieve contract ABIs and sources from block explorers

Solidity Development

  • Maintain a dedicated Forge workspace
  • Create and edit Solidity files
  • Install dependencies
  • Run Forge scripts
  • Deploy contracts

Utility Functions

foundry-mcp-server FAQ

Is this ready for serious use?
The author labels it experimental and the last commit was January 2026. Treat it as a testing helper, not something to trust with real funds.
Do I need a key?
Not for reading. A wallet key is optional and only needed to send transactions, and the author warns against using one that holds real money.
Can I use this to work out what a transaction did?
Yes. Hand it a transaction link and it can fetch the receipt, decode the call and walk through the trace.
How hard is setup?
Developer level. The Foundry command-line tools must already be installed, and Node.js 18 or newer is required.
Do the decompiling and flow-chart features work straight away?
No. Those five options call Heimdall, a separate program you install yourself. Without it they simply fail.
Which apps does it work in?
Claude Desktop, Cursor, Windsurf and Claude Code are all documented, each using a short config snippet.
Is this useful if I do not write code?
Mostly no. It assumes Solidity and Ethereum knowledge, though the transaction explanations are readable by anyone curious about a payment.