Foundry MCP Project

Integrations

  • Provides tools for Ethereum blockchain development through Foundry, including creating projects, compiling contracts, running tests, launching local nodes, and executing blockchain commands

  • Offers comprehensive Solidity development support including contract compilation, inspection, testing, and running a Solidity REPL (Chisel) for interactive development

🧠 Foundry MCP Project

This project is a Model Context Protocol (MCP) server designed to interact with Foundry tools. It provides a set of tools and utilities to manage Foundry projects, run tests, build contracts, and more.


📂 Project Structure

pyproject.toml # Project configuration file README.md # Project documentation uv.lock # Dependency lock file LLM/ # Documentation and SDK usage src/eth_wh_mcp/ # Source code for the MCP server

🚀 Features

  • Create Foundry Projects: Initialize new Foundry projects.
  • Build Contracts: Compile Solidity contracts with various options.
  • Run Tests: Execute tests with detailed configuration.
  • Inspect Contracts: Retrieve ABI, bytecode, and other metadata.
  • Run Scripts: Execute Solidity scripts.
  • Start Local Nodes: Launch Anvil or Chisel for local Ethereum development.
  • Advanced Cast Commands: Execute Ethereum-related commands using cast.

🛠️ Installation

  1. Clone the repository:
    git clone <repository-url>
  2. Ensure Foundry tools (forge, cast, anvil, etc.) are installed and available in your PATH.

🏗️ Usage

Running the MCP Server

To start the MCP server:

python src/eth_wh_mcp/main.py

Available Tools

The following tools are available in the MCP server:

  • create_project: Initialize a new Foundry project.
  • build_project: Build the current Foundry project.
  • test_project: Run tests in the Foundry project.
  • clone_contract: Clone a contract from Etherscan.
  • run_script: Execute a Solidity script.
  • run_cast_command: Run a cast command.
  • start_anvil_with_options: Start the Anvil local Ethereum node.
  • start_chisel_with_options: Start the Chisel Solidity REPL.
  • inspect_contract: Inspect contract metadata.
  • snapshot_project: Create a gas usage snapshot.
  • coverage_project: Display test coverage.

📖 Documentation

MCP Python SDK

Refer to the LLM/python-mcp-sdk.md file for detailed usage of the MCP Python SDK, including server construction, tools, prompts, and context handling.


🧪 Development

Local Debugging

Run the MCP server in development mode:

mcp dev src/eth_wh_mcp/main.py --with-editable .

Runtime Execution

To execute the server:

python src/eth_wh_mcp/main.py

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

A Model Context Protocol server that enables interaction with Foundry tools through natural language, allowing users to create projects, build contracts, run tests, and manage Ethereum development environments.

  1. 📂 Project Structure
    1. 🚀 Features
      1. 🛠️ Installation
        1. 🏗️ Usage
          1. Running the MCP Server
          2. Available Tools
        2. 📖 Documentation
          1. MCP Python SDK
        3. 🧪 Development
          1. Local Debugging
          2. Runtime Execution
        4. 📜 License

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that allows management and execution of Blender Python scripts, enabling users to create, edit and run scripts in a headless Blender environment through natural language interfaces.
            Last updated -
            4
            Python
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that provides tools for code modification and generation via Large Language Models, allowing users to create, modify, rewrite, and delete files using structured XML instructions.
            Last updated -
            12
            Python
            MIT License
            • Linux
            • Apple
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that enables interaction with Shortcut (formerly Clubhouse) project management tool, allowing users to view and search projects, stories, epics, and objectives, as well as create new items through natural language.
            Last updated -
            3
            Python
            • Apple
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that enables users to create, check status, and get details of projects on Loveable.dev, a platform for quickly creating applications.
            Last updated -
            JavaScript
            ISC License
            • Apple

          View all related MCP servers

          ID: goycurk2e6