foundry-zksync-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| initB | Scaffold a new foundry project and add [profile.default.zksync] config (forge init) |
| installB | Install dependencies for a foundry project (forge install) |
| cleanA | Remove build artifacts (out/ and zkout/) from a foundry project (forge clean) |
| compileA | Compile a foundry-zksync project (forge build --zksync). Check foundry.toml for [profile.X.zksync] sections — if zkSync sources live under a specific profile (e.g. 'zksync'), pass that as the profile argument. |
| testA | Run tests in a foundry-zksync project (forge test --zksync). Check foundry.toml for [profile.X] sections — if the test directory differs per profile (e.g. profile 'zksync' has test = 'zksync/tests'), pass the correct profile argument. |
| run_scriptC | Run a forge script targeting zkSync (forge script --zksync) |
| deployB | Deploy a contract to a zkSync network (forge create --zksync). Returns structured output with contract address, tx hash, and deployer. |
| verifyB | Verify a deployed contract on a block explorer (forge verify-contract --zksync). Supports Etherscan (requires API key) and zkSync Explorer (no key needed). |
| gas_reportA | Run tests and generate a gas usage report (forge test --zksync --gas-report). Note: zkSync gas values are aggregate-only (no computation/pubdata breakdown). |
| snapshotB | Create or compare gas snapshots (forge snapshot --zksync). Use diff=true to compare against existing .gas-snapshot, check=true to fail on changes. |
| read_foundry_tomlA | Read and return the contents of foundry.toml from a project. Useful for inspecting profiles, zkSync config, library links, and other settings. |
| explainA | Explain raw output from foundry-zksync: error messages, logs, or transactions. Matches against a knowledge base of known zkSync gotchas and returns actionable advice. Use context='general' for background on what foundry-zksync is and how it works. |
| cast_abi_encodeB | ABI-encode values for a given Solidity function/constructor signature (cast abi-encode) |
| cast_abi_decodeA | Decode ABI-encoded hex data back into human-readable values (cast abi-decode) |
| cast_calldata_decodeA | Decode raw transaction calldata (with 4-byte selector) into function arguments (cast calldata-decode) |
| cast_callA | Read-only call to a deployed contract — no gas spent, no state change (cast call) |
| cast_sendB | Send a state-changing transaction to a deployed contract (cast send) |
| cast_balanceB | Query the ETH balance of an address (cast balance) |
| cast_nonceA | Query the transaction nonce of an address (cast nonce). Note: on zkSync this returns the TX nonce only, not the deploy nonce. |
| get_zksync_docsA | Look up foundry-zksync documentation by topic. Returns URLs to the foundry-zksync book for installation, config, testing, deployment, cheatcodes, nonces, factory deps, paymasters, verification, and more. Use topic='list' to see all available topics. |
| anvil_zksyncA | Start or check a local anvil-zksync development node. Supports forking from mainnet/testnet. Default port: 8011. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 21 tools
Each tool has a clearly distinct purpose: node management, ABI operations, contract interactions, compilation, deployment, testing, documentation, etc. No two tools overlap in function; even decoding tools differ in input type.
Tools follow a mix of patterns: some are single verbs (compile, deploy), others are prefixed with 'cast_' for Foundry commands, and a few are descriptive (get_zksync_docs, read_foundry_toml). While not a strict verb_noun pattern throughout, naming is intuitive and predictable.
With 21 tools, the server covers the full lifecycle of foundry-zksync development without being overwhelming. Each tool serves a necessary role, and the count is well-scoped for the domain.
The tool set covers all major operations: project setup, compilation, deployment, testing, gas analysis, script execution, contract interaction, ABI handling, verification, and documentation. No critical gaps are apparent for typical foundry-zksync workflows.