MCP Catalogs
Homefoundry-mcp-server screenshot

foundry-mcp-server

by PraneshASP·247·Score 48

An MCP server for Solidity developers providing comprehensive Foundry toolchain integration.

developer-toolsai-llmsecurity
37
Forks
5
Open issues
4 mo ago
Last commit
2d ago
Indexed

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:

you:Automating smart contract analysis and debugging in LLM assistants
you:Enabling blockchain development through natural language commands
you:Facilitating onchain operations without switching between tools
you:Is it safe to provide my PRIVATE_KEY to the MCP server?
you:What makes this MCP server unique for Solidity development?

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 README
  • anvil_start

    Start a new Anvil instance

  • anvil_stop

    Stop a running Anvil instance

  • anvil_status

    Check if Anvil is running and get its status

  • cast_call

    Call a contract function (read-only)

  • cast_send

    Send a transaction to a contract function

  • cast_balance

    Check the ETH balance of an address

  • forge_script

    Run a Forge script from the workspace

  • create_solidity_file

    Create or update a Solidity file in the workspace

  • heimdall_disassemble

    Disassemble EVM bytecode into human-readable opcodes

  • heimdall_decompile

    Decompile EVM bytecode to Solidity source code and ABI

  • estimate_gas

    Estimate the gas cost of a transaction

  • convert_eth_units

    Convert between EVM units (wei, gwei, hex)

Comparable tools

hardhat-mcpembark-mcptruffle-mcpsolidity-lspweb3js

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-server

Claude 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

GitHub →

Last updated · Auto-generated from public README + GitHub signals.