
praneshasp/foundry-mcp-server
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
praneshasp/foundry-mcp-server는 https://github.com/praneshasp/foundry-mcp-server.에서 가져온 MCP 서버 후보입니다.
개요
praneshasp/foundry-mcp-server는 https://github.com/praneshasp/foundry-mcp-server.에서 가져온 MCP 서버 후보입니다.
개요(AI 번역)
Foundry 툴체인(Forge, Cast, Anvil)을 사용하여 Solidity 개발 기능을 제공하는 간단하고 가볍고 빠른 MCP(모델 컨텍스트 프로토콜) 서버입니다.
개요
이 서버는 LLM 어시스턴트를 파운드리 생태계와 연결하여 다음과 같은 기능을 가능하게 합니다:
- 노드(로컬 Anvil 인스턴스 또는 원격 RPC 엔드포인트)와의 상호작용
- 스마트 계약 및 블록체인 데이터 분석
- Cast를 이용한 일반적인 EVM 작업 수행
- Solidity 코드 및 스크립트를 관리, 배포 및 실행
- 지속 가능한 Forge 작업 공간 작업
특징
네트워크 상호작용
- 로컬 Anvil 인스턴스 시작 및 관리
- 원격 네트워크에 연결(RPC만 지정)
- 네트워크/체인 정보 얻기
계약 상호작용
- 계약 함수 호출 (읽기 전용)
- 거래를 계약으로 전송 (
PRIVATE_KEY가 설정된 경우) - 거래 영수증 확보
- 계약 저장소 읽기
- 거래 추적 분석
- 블록 탐색기에서 계약 ABI와 소스 검색
솔리드티 개발
- 전용 Forge 작업 공간을 유지하기
- Solidity 파일 생성 및 편집
- 의존성 설치
- Run Forge 스크립트
- 배포 계약
유틸리티 함수
- 계약 주소 계산
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Foundry MCP Server
A simple, lightweight and fast MCP (Model Context Protocol) server that provides Solidity development capabilities using the Foundry toolchain (Forge, Cast, and Anvil).
Overview
This server connects LLM assistants to the Foundry ecosystem, enabling them to:
- Interact with nodes (local Anvil instances or remote RPC endpoints)
- Analyze smart contracts and blockchain data
- Perform common EVM operations using Cast
- Manage, deploy, and execute Solidity code and scripts
- Work with a persistent Forge workspace
Features
Network Interaction
- Start and manage local Anvil instances
- Connect to any remote network (just specify the RPC)
- Get network/chain information
Contract Interaction
- Call contract functions (read-only)
- Send transactions to contracts (if
PRIVATE_KEYis configured) - Get transaction receipts
- Read contract storage
- Analyze transaction traces
- Retrieve contract ABIs and sources from block explorers
Solidity Development
- Maintain a dedicated Forge workspace
- Create and edit Solidity files
- Install dependencies
- Run Forge scripts
- Deploy contracts
Utility Functions
- Calculate contract addresses
- Check contract bytecode size
- Estimate gas costs
- Convert between units (hex to decimals, etc.,)
- Generate wallets
- Get event logs
- Lookup function and event signatures
Smart Contract Analysis (Heimdall)
- Disassemble EVM bytecode into human-readable opcodes
- Decode raw calldata without requiring ABI
- Decompile EVM bytecode to Solidity source code and ABI
- Generate visual control flow graphs for EVM bytecode
- Detailed transaction inspection with calldata decoding and trace analysis
Usage
The server is designed to be used as an MCP tool provider for MCP Clients. When connected to a client, it enables the clients(claude desktop, cursor, client, etc.,) to perform Solidity and onchain operations directly.
Requirements
- Node.js v18+
- Foundry toolchain (Forge, Cast, Anvil)
- Heimdall-rs (for smart contract analysis)
Manual Setup
-
Ensure Foundry tools (Forge, Cast, Anvil) are installed on your system:
curl -L https://foundry.paradigm.xyz | bash foundryup -
Clone and build the server.
bun i && bun build ./src/index.ts --outdir ./dist --target node -
Update your client config (eg: Claude desktop):
"mcpServers": {
"foundry": {
"command": "node",
"args": [
"path/to/foundry-mcp-server/dist/index.js"
],
"env" :{
"PRIVATE_KEY": "0x1234",
}
}
}
[!NOTE]
PRIVATE_KEYis optional
Setup using NPM Package
You can now install and run the server directly using npm:
Global Installation
npm install -g @pranesh.asp/foundry-mcp-server
Direct Usage with npx
설치
npx @pranesh.asp/foundry-mcp-server