Foundry MCP Server
Manage your Foundry projects effortlessly. Create, build, and test Solidity contracts while inspecting metadata and executing scripts with ease. Streamline your Ethereum development workflow with powerful tools at your fingertips.
Installation
Installing for Claude Desktop
Manual Configuration Required
This MCP server requires manual configuration. Run the command below to open your configuration file:
npx mcpbar@latest edit -c claude
This will open your configuration file where you can add the Foundry MCP Server MCP server manually.
๐ง 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
Installing via Smithery
To install Foundry MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @lhemerly/foundry-mcp --client claude
Manual Installation
-
Clone the repository:
git clone <repository-url>
-
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.
Stars
1Forks
0Last commit
1 month agoRepository age
3 monthsLicense
MIT
Auto-fetched from GitHub .
MCP servers similar to Foundry MCP Server:

ย
Stars
Forks
Last commit

ย
Stars
Forks
Last commit

ย
Stars
Forks
Last commit