A Model Context Protocol (MCP) server that provides access to all Foundry CLI tools (forge, cast, anvil, chisel) through a unified interface, plus blockchain RPC discovery and token information.
Features
🛠️ : Full access to all Foundry commands, blockchain RPC discovery, token information, session management, and a unified conversion tool—all in one place
A Model Context Protocol (MCP) server that provides access to all Foundry CLI tools (forge, cast, anvil, chisel) through a unified interface.
Comprehensive Support
🚀 Fast: Minimal overhead, shells out to native Foundry binaries
📋 Full Schema Support: Handles positionals, options, and flags
🔌 MCP Protocol: Standard stdio-based MCP server implementation
🎯 Session Management: Start/stop Anvil nodes and Chisel REPL sessions as background processes
🌐 RPC Discovery: Query 2400+ blockchain networks and their RPC endpoints from chainlist.org
🔍 Chain Search: Find networks by name, symbol, or chain ID
📊 Network Info: Access faucets, explorers, and network metadata
🪙 Token Information: Search and discover ERC20 tokens across Ethereum and L2 chains
🔎 Token Search: Find tokens by name, symbol, or contract address
🌉 Bridge Info: Access cross-chain token bridge information
🔄 Unified Conversions: Single tool for all cast conversion operations (hex, decimal, base, ETH units, text encoding, RLP, etc.)
🔒 Security: Configurable forbidden commands and flags to prevent dangerous operations
Available Tools
Foundry Tools
forge: build, test, script, verify, coverage, snapshot, init, config, etc.
cast: call, send, receipt, wallet, storage, decode, block, tx, etc.
anvil: local Ethereum development node (interactive blocked, use session tools below)
chisel (6): Solidity REPL (interactive blocked, use session tools below)
Session Management Tools (7)
Anvil Session Management - Control background Anvil instances:
anvil_session_start - Start Anvil as a background process (fork, custom port, accounts, block time)
anvil_session_stop - Stop the running Anvil instance
anvil_session_status - Check if Anvil is running and get connection details
Chisel Session Management - Persistent REPL with state:
chisel_session_start - Start a Chisel REPL session
chisel_session_eval - Execute Solidity code (state persists across calls!)
chisel_session_stop - Stop the Chisel session
chisel_session_status - Check if Chisel is running
Blockchain RPC Tools (3)
search_rpc_url - Search for RPC endpoints for any chain with filtering (open-source, no-tracking, websocket/http, limit) search_chains - Search networks by name, symbol, or chain ID list_popular_chains - Quick access to popular networks (Ethereum, Polygon, Arbitrum, etc.)
Token Information Tools (4)
search_tokens - Search for tokens by name or symbol across all supported chains get_token_by_address - Get token information by contract address list_chain_tokens - List all tokens available on a specific blockchain network list_supported_chains - List all blockchain networks supported by the token list
The server supports configurable security restrictions to prevent dangerous operations. This is especially important when exposing Foundry tools through an AI assistant.
How it works: Forbidden commands and flags are filtered out from the tool schema during initialization. This means the AI assistant won't even see these tools/flags - they simply won't appear in the available tools list. This is more secure than runtime validation since it follows the principle of least privilege.
forbidden_commands: Array of command names to block (e.g., "anvil", "forge_script", "cast_send")
forbidden_flags: Array of flag names to block (e.g., "broadcast", "private-key", "mnemonic")
allow_dangerous: Boolean to control hardcoded dangerous restrictions
false (default): Automatically adds hardcoded dangerous commands/flags to your forbidden lists
true: Only uses your explicitly configured forbidden lists
Hardcoded Dangerous Restrictions
When allow_dangerous: false (the default), the following hardcoded restrictions are automatically merged with your config:
Dangerous Commands:
anvil - Local Ethereum node
Dangerous Flags:
broadcast - Sends transactions to networks
private-key - Uses private keys directly
mnemonic - Uses mnemonic phrases directly
legacy - Legacy transaction types
unlock - Unlocks accounts
Note: Your custom forbidden_commands and forbidden_flags are merged with these hardcoded values, so you can add additional restrictions without needing to repeat the defaults.
Usage Examples
Run with default safety restrictions:
foundry-mcp
Run with custom config:
foundry-mcp --config /path/to/config.json
Copy config to default location (updates systemwide defaults):
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
Foundry MCP Rs ต้องใช้ API key ไหม?
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
Foundry MCP Rs ใช้ทรานสปอร์ตแบบใด?
Foundry MCP Rs ทำงานแบบโลคัลผ่าน stdio
Foundry MCP Rs ถูกตรวจสอบล่าสุดเมื่อใด?
ตรวจสอบล่าสุดเมื่อ 2026-10-26 A Model Context Protocol (MCP) server that provides access to all Foundry CLI tools (forge, cast, anvil, chisel) through a unified interface.