Skip to main content
Glama
Jrigada

foundry-zksync-mcp

by Jrigada

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jrigada/foundry-zksync-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server