Skip to content

Commit f875867

Browse files
committed
docs: 📝 readme
1 parent 438f6f4 commit f875867

File tree

4 files changed

+48
-9
lines changed

4 files changed

+48
-9
lines changed

README.md

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
A simple, lightweight and fast MCP (Model Context Protocol) server that provides Solidity development capabilities using the Foundry toolchain (Forge, Cast, and Anvil).
44

5+
![Foundry MCP Demo](./assets/analysis.mov)
6+
57
## Overview
68

79
This server connects LLM assistants to the Foundry ecosystem, enabling them to:
@@ -54,10 +56,10 @@ The server is designed to be used as an MCP tool provider for MCP Clients. When
5456

5557
#### Requirements
5658

57-
- Node.js v18+
58-
- Foundry toolchain (Forge, Cast, Anvil)
59+
- [Node.js v18+](https://nodejs.org)
60+
- [Foundry toolchain](https://book.getfoundry.sh/) (Forge, Cast, Anvil)
5961

60-
### Setup
62+
### Manual Setup
6163

6264
1. Ensure Foundry tools (Forge, Cast, Anvil) are installed on your system:
6365
```
@@ -67,10 +69,10 @@ The server is designed to be used as an MCP tool provider for MCP Clients. When
6769
2. Clone and build the server.
6870

6971
```sh
70-
bun build
72+
bun i && bun build
7173
```
7274

73-
3. Update your client config:
75+
3. Update your client config (eg: Claude desktop):
7476

7577
```json
7678
"mcpServers": {
@@ -86,6 +88,9 @@ The server is designed to be used as an MCP tool provider for MCP Clients. When
8688
}
8789
```
8890

91+
### Setup using NPM Package
92+
- Coming soon
93+
8994
#### Configuration
9095

9196
The server supports the following environment variables:
@@ -99,13 +104,13 @@ The server maintains a persistent Forge workspace at `~/.mcp-foundry-workspace`
99104

100105
## Tools
101106

102-
### Anvil (Local EVM Node)
107+
### Anvil
103108

104109
- `anvil_start`: Start a new Anvil instance
105110
- `anvil_stop`: Stop a running Anvil instance
106111
- `anvil_status`: Check if Anvil is running and get its status
107112

108-
### Cast (Onchain Operations)
113+
### Cast
109114

110115
- `cast_call`: Call a contract function (read-only)
111116
- `cast_send`: Send a transaction to a contract function
@@ -118,7 +123,7 @@ The server maintains a persistent Forge workspace at `~/.mcp-foundry-workspace`
118123
- `cast_4byte`: Lookup function or event signature from the 4byte directory
119124
- `cast_chain`: Get information about the current chain
120125

121-
### Forge (Development Operations)
126+
### Forge
122127

123128
- `forge_script`: Run a Forge script from the workspace
124129
- `install_dependency`: Install a dependency for the Forge workspace
@@ -132,8 +137,42 @@ The server maintains a persistent Forge workspace at `~/.mcp-foundry-workspace`
132137
### Utilities
133138

134139
- `convert_eth_units`: Convert between EVM units (wei, gwei, hex)
135-
- `generate_wallet`: Generate a new EVM wallet
136140
- `compute_address`: Compute the address of a contract that would be deployed
137141
- `contract_size`: Get the bytecode size of a deployed contract
138142
- `estimate_gas`: Estimate the gas cost of a transaction
139143

144+
## Usage in Claude Desktop App 🎯
145+
146+
Once the installation is complete, and the Claude desktop app is configured, you must completely close and re-open the Claude desktop app to see the tavily-mcp server. You should see a hammer icon in the bottom left of the app, indicating available MCP tools, you can click on the hammer icon to see more details on the available tools.
147+
148+
![Alt text](./assets/tools.png)
149+
150+
Now claude will have complete access to the foundry-mcp server. If you insert the below examples into the Claude desktop app, you should see the foundry-mcp server tools in action.
151+
152+
### Examples
153+
154+
1. **Transaction analysis**:
155+
```
156+
Can you analyze the transaction and explain what it does?
157+
https://etherscan.io/tx/0xcb73ad3116f19358e2e649d4dc801b7ae0590a47b8bb2e57a8e98b6daa5fb14b
158+
```
159+
160+
2. **Querying Balances**:
161+
```
162+
Query the mainnet ETH and USDT balances for the wallet 0x195F46025a6926968a1b3275822096eB12D97E70.
163+
```
164+
3. **Sending transactions**:
165+
```
166+
Transfer 0.5 USDC to 0x195F46025a6926968a1b3275822096eB12D97E70 on Mainnet.
167+
```
168+
169+
4. **Deploying contracts**:
170+
```
171+
Deploy a mock ERC20 contract to a local mainnet forked anvil instance with blocknumber 22230903.
172+
```
173+
174+
175+
## Acknowledgments ✨
176+
177+
- [Model Context Protocol](https://modelcontextprotocol.io) for the MCP specification
178+
- [Anthropic](https://anthropic.com) for Claude Desktop

assets/analysis.mov

12.7 MB
Binary file not shown.

assets/send_tx.png

145 KB
Loading

assets/tools.png

68.6 KB
Loading

0 commit comments

Comments
 (0)