Foundry

v1.0.0Databasesstable

An MCP server that allows AI assistants to interact with Foundry datasets, ontology objects, and functions through natural language queries and commands.

aiblockchainmcp-serversolidity
Share:
249
Stars
0
Downloads
0
Weekly
0/5

What is Foundry?

Foundry is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server that allows ai assistants to interact with foundry datasets, ontology objects, and functions through natural language queries and commands.

An MCP server that allows AI assistants to interact with Foundry datasets, ontology objects, and functions through natural language queries and commands.

This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • An MCP server that allows AI assistants to interact with Fou

Use Cases

Query Foundry datasets with natural language
Access ontology objects
Execute Foundry functions
PraneshASP

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.0.0
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx foundry-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Foundry

The Foundry MCP Server gives AI assistants direct access to the Foundry smart contract development toolchain — including Forge, Cast, and Anvil — through natural language commands, enabling developers to compile and test Solidity contracts, query blockchain state, send transactions, and analyze contract bytecode without leaving their AI client. It also integrates Heimdall-rs for advanced reverse engineering tasks like bytecode decompilation, control flow graph generation, and transaction inspection. Blockchain developers and security researchers use it to accelerate smart contract workflows by expressing complex Cast or Forge operations as plain English instructions.

Prerequisites

  • Node.js v18 or higher installed
  • Foundry toolchain installed: Forge, Cast, and Anvil (install via curl -L https://foundry.paradigm.xyz | bash && foundryup)
  • Heimdall-rs installed for bytecode analysis features (https://github.com/Jon-Becker/heimdall-rs)
  • An MCP client such as Claude Desktop or Claude Code
  • Optional: RPC_URL for connecting to a live network; PRIVATE_KEY only for testnets — never use mainnet keys
1

Install the Foundry toolchain

Install Foundry (Forge, Cast, Anvil) using the official installer. Run foundryup after installation to download the latest binaries.

curl -L https://foundry.paradigm.xyz | bash
foundryup

# Verify
forge --version
cast --version
anvil --version
2

Install the Foundry MCP Server

Install the MCP server package globally via npm or use npx for on-demand execution without a global install.

# Global install
npm install -g @pranesh.asp/foundry-mcp-server

# Or use directly with npx
npx @pranesh.asp/foundry-mcp-server
3

Add to Claude Code via CLI

Register the server with Claude Code using the mcp add-json command with your RPC URL and optional private key for testnet use.

claude mcp add-json foundry-mcp-server '{
  "type": "stdio",
  "command": "npx",
  "args": ["@pranesh.asp/foundry-mcp-server"],
  "env": {
    "RPC_URL": "https://rpc.ankr.com/eth_sepolia",
    "PRIVATE_KEY": ""
  }
}'
4

Start a local Anvil instance for testing

Use the MCP server's Anvil tool to start a local Ethereum node for safe contract testing without spending real funds.

# Via the MCP tool (ask Claude):
# "Start a local Anvil instance"

# Or directly:
anvil
5

Install Heimdall-rs for bytecode analysis

Heimdall-rs enables decompilation, disassembly, and control flow graph generation. Follow the installation instructions from the Heimdall GitHub repository.

# Install via cargo
cargo install heimdall-rs

# Or use the install script from:
# https://github.com/Jon-Becker/heimdall-rs

Foundry Examples

Client configuration

Claude Desktop configuration for the Foundry MCP Server. Set RPC_URL to your preferred testnet endpoint. Leave PRIVATE_KEY empty unless needed for testnet transactions.

{
  "mcpServers": {
    "foundry-mcp-server": {
      "command": "npx",
      "args": ["@pranesh.asp/foundry-mcp-server"],
      "env": {
        "RPC_URL": "https://rpc.ankr.com/eth_sepolia",
        "PRIVATE_KEY": ""
      }
    }
  }
}

Prompts to try

Natural language prompts for Foundry operations via the MCP server

- "Start a local Anvil instance and show me the test accounts"
- "Check the ETH balance of address 0x742d35Cc6634C0532925a3b8D4C9C7b2"
- "Deploy the contract at contracts/MyToken.sol to the local Anvil instance"
- "Decompile the bytecode at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 using Heimdall"
- "Run the forge test suite and show me any failing tests"

Troubleshooting Foundry

forge, cast, or anvil not found in PATH

After running foundryup, add ~/.foundry/bin to your PATH: export PATH="$PATH:$HOME/.foundry/bin". Add this line to ~/.bashrc or ~/.zshrc to make it permanent, then restart your terminal.

RPC connection errors or network timeouts

Verify RPC_URL is a valid endpoint for your target network. For local testing, start Anvil first (anvil command) and use http://127.0.0.1:8545 as the RPC_URL. For public testnets, use Alchemy, Infura, or Ankr RPC endpoints.

Heimdall analysis tools not available

Heimdall-rs must be installed separately from Foundry. Install it via cargo install heimdall-rs. If cargo is not available, install Rust first from https://rustup.rs, then retry.

Frequently Asked Questions about Foundry

What is Foundry?

Foundry is a Model Context Protocol (MCP) server that mcp server that allows ai assistants to interact with foundry datasets, ontology objects, and functions through natural language queries and commands. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Foundry?

Follow the installation instructions on the Foundry GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Foundry?

Foundry works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Foundry free to use?

Yes, Foundry is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Databases MCP Servers

Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "foundry-mcp-server": { "command": "npx", "args": ["-y", "foundry-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Foundry?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides