🧠 Foundry MCP 项目
该项目是一个模型上下文协议 (MCP) 服务器,旨在与 Foundry 工具交互。它提供了一套工具和实用程序来管理 Foundry 项目、运行测试、构建合约等。
📂 项目结构
🚀 功能
创建 Foundry 项目:初始化新的 Foundry 项目。
建立合约:使用各种选项编译 Solidity 合约。
运行测试:使用详细配置执行测试。
检查合同:检索 ABI、字节码和其他元数据。
运行脚本:执行 Solidity 脚本。
启动本地节点:启动 Anvil 或 Chisel 进行本地以太坊开发。
高级 Cast 命令:使用
cast
执行与以太坊相关的命令。
🛠️ 安装
克隆存储库:
git clone <repository-url>确保 Foundry 工具(
forge
、cast
、anvil
等)已安装并在您的 PATH 中可用。
🏗️ 使用方法
运行 MCP 服务器
要启动 MCP 服务器:
可用工具
MCP 服务器中提供以下工具:
create_project :初始化一个新的 Foundry 项目。
build_project :构建当前的 Foundry 项目。
test_project :在 Foundry 项目中运行测试。
clone_contract :从 Etherscan 克隆合约。
run_script :执行 Solidity 脚本。
run_cast_command :运行
cast
命令。start_anvil_with_options :启动 Anvil 本地以太坊节点。
start_chisel_with_options :启动 Chisel Solidity REPL。
inspect_contract :检查合同元数据。
snapper_project :创建 gas 使用情况快照。
coverage_project :显示测试覆盖率。
📖 文档
MCP Python SDK
有关 MCP Python SDK 的详细使用方法,包括服务器构建、工具、提示和上下文处理,请参阅LLM/python-mcp-sdk.md文件。
🧪 开发
本地调试
以开发模式运行 MCP 服务器:
运行时执行
执行服务器:
📜 许可证
本项目遵循 MIT 许可证。详情请参阅 LICENSE 文件。
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
模型上下文协议服务器,可通过自然语言与 Foundry 工具进行交互,允许用户创建项目、构建合约、运行测试和管理以太坊开发环境。
Related MCP Servers
- AsecurityAlicenseAqualityA comprehensive Model Context Protocol server that provides advanced Node.js development tooling for automating project creation, component generation, package management, and documentation with AI-powered assistance.Last updated -75MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that gives LLMs the ability to interact with Ethereum networks, manage wallets, query blockchain data, and execute smart contract operations through a standardized interface.Last updated -4598MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI agents to interact with 30+ Ethereum-compatible blockchain networks, providing services like token transfers, contract interactions, and ENS resolution through a unified interface.Last updated -282,659320MIT License
- -security-license-qualityComprehensive Model Context Protocol server that enables AI agents to interact with 30+ Ethereum-compatible blockchain networks, supporting token transfers, smart contract interactions, and ENS name resolution through a unified interface.Last updated -1MIT License
Appeared in Searches
- Executing Operations and Maintenance Tasks, Such as Deployment and Upgrades
- A server for EVM (Extended Virtual Machine) MCP
- MCP to Control CAD Tools for Building Models and Automating Manufacturing
- Guidance on Writing Git Commit Messages for Pushing to GitHub
- Automating web browser searches using Chrome