foundry-mcp-server

foundry-mcp-server

3.6

If you are the rightful owner of foundry-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A simple, lightweight and fast MCP server that provides Solidity development capabilities using the Foundry toolchain.

The Foundry MCP Server is a lightweight and efficient Model Context Protocol server designed to integrate with the Foundry toolchain, which includes Forge, Cast, and Anvil. This server facilitates the connection between LLM assistants and the Foundry ecosystem, allowing for seamless interaction with blockchain nodes, smart contract analysis, and execution of EVM operations. It supports the management, deployment, and execution of Solidity code and scripts within a persistent Forge workspace. The server is particularly useful for developers looking to perform on-chain operations and smart contract interactions directly from their development environment.

Features

  • Network Interaction: Manage local Anvil instances and connect to remote networks.
  • Contract Interaction: Call contract functions, send transactions, and analyze transaction traces.
  • Solidity Development: Maintain a Forge workspace, create/edit Solidity files, and deploy contracts.
  • Utility Functions: Calculate contract addresses, estimate gas costs, and convert units.
  • Workspace Management: Persistent storage for Solidity files and dependencies.

Tools

  1. Anvil

    Tools for managing Anvil instances, including start, stop, and status checks.

  2. Cast

    Tools for contract interaction, including function calls, transactions, and logs.

  3. Forge

    Tools for running Forge scripts and managing dependencies.

  4. File Management

    Tools for creating, reading, and listing files in the workspace.

  5. Utilities

    Tools for unit conversion, address computation, and gas estimation.