evm-agent-toolkit
The EVM Agent Toolkit MCP server provides autonomous agents with deterministic, schema-validated tools for EVM smart contract development, turning noisy CLI output into clean, reliable JSON.
Security Scanning (
evm_scan_vulnerabilities): Run Slither static analysis to detect severity-rated vulnerabilities (High/Medium/Low/Informational) with code snippets, line numbers, and source file references. Supports filtering by severity.Gas Profiling (
evm_analyze_gas_profile): Runforge test --gas-reportto get structured per-contract and per-function gas consumption data including min, max, average, median, and call counts.Compiler Diagnostics (
evm_compile_and_diagnose): Runforge buildand receive structured diagnostics on failure — including file, line/column numbers, error messages, and code snippets.Transaction Simulation (
evm_simulate_transaction): Simulate read-onlyeth_calltransactions against an EVM node usingcast call, returning decoded return data or revert reasons without submitting a real transaction.Storage Layout Inspection (
evm_inspect_storage_layout): Inspect contract storage slot assignments (slot index, byte offset, type, size) — essential for proxy upgrade safety and storage collision checks.Call Tracing (
evm_trace_call): Execute a call withcast call --traceand get a full structured call tree with gas costs, call types (staticcall, delegatecall), emitted events, and revert frames.Calldata Decoding (
evm_decode_calldata): Decode hex calldata into function signatures and typed argument values — offline with a known signature, or via the 4byte selector database for unknown ones.Test Running (
evm_run_tests): Runforge testwith optional filters and get per-suite, per-test results including fuzz run counts, gas usage, and exact counterexample calldata for failing fuzz/invariant tests.Toolchain Version Check (
evm_toolchain_versions): Report installed status and exact versions ofslither,forge, andcast— useful for verifying prerequisites before an analysis session.Skill Workflows (Prompts): Execute pre-defined workflows for contract auditing, gas optimization, and arbitrage analysis.
EVM MCP Server
An MCP (Model Context Protocol) server that gives autonomous coding agents deterministic, schema-validated tools for EVM smart contract development — security scanning, gas profiling, compiler diagnostics, and transaction simulation.
Why This Exists
Raw CLI output from tools like Slither and Foundry is noisy, non-deterministic, and often causes LLMs to hallucinate. This server intercepts the output, validates it through Zod schemas, and returns clean JSON that any agent can reliably parse.
Related MCP server: foundry-mcp
Tools
Tool | Annotations | Description |
|
| Run Slither analysis. Returns severity-rated findings with extracted code snippets. Supports |
|
| Run |
|
| Run |
|
| Run |
|
| Run |
|
| Run |
|
| Decode hex calldata via |
|
| Run |
|
| Report installed/missing status and exact versions of |
Resources
URI | Description |
| Security vulnerability pattern library |
| Gas optimization pattern library |
| Arbitrage strategy reference |
Prompts
Skill workflows exposed as MCP prompts for clients without native skill support. Each embeds the full SKILL.md workflow.
Prompt | Args | Description |
|
| Severity-rated security audit (vulnerability-scanning workflow) |
|
| Measured gas-optimization pass (gas-optimization workflow) |
|
| Opportunity ledger net of fees/gas/slippage (arbitrage-analysis workflow) |
Architecture
evm-agent-toolkit/
├── src/
│ ├── mcp/ # MCP server entry point (stdio transport)
│ ├── tools/ # Zod-validated CLI output parsers
│ │ ├── slither.ts # Slither JSON → SanitizedFinding[]
│ │ ├── forge.ts # Forge gas tables → ContractGas[]
│ │ ├── compiler.ts # Forge build errors → CompilerDiagnostic[]
│ │ ├── simulator.ts# Cast call output → SimulatorDiagnostic
│ │ ├── storage.ts # Forge storage layout → StorageEntry[]
│ │ ├── trace.ts # Cast call traces → TraceEvent[]
│ │ ├── decoder.ts # Cast calldata decode → DecodedCalldata
│ │ ├── testrunner.ts # Forge test output → TestSuite[]
│ │ └── versions.ts # Toolchain --version output → ToolVersion
│ ├── rules/ # Agent system prompt injections
│ └── hooks/ # Lifecycle hooks (UserPromptSubmit, Statusline)
├── tests/ # Vitest unit tests for all parsers
├── bench/ # Performance benchmarks
├── evals/ # Agent evaluation framework (vulnerable contracts + eval XML)
├── skills/ # Markdown reference libraries
├── .claude-plugin/ # Claude Code plugin manifest
└── gemini-extension.json # Antigravity plugin manifestSetup
npm install
npm run buildAgent Configuration
This is a stdio MCP server. It is spawned by the MCP client, not started manually.
Claude Desktop / Cursor:
{
"mcpServers": {
"evm-agent-toolkit": {
"command": "npx",
"args": ["-y", "@0xendale/evm-agent-toolkit"]
}
}
}Prerequisites: slither, forge, and cast must be installed on the host machine.
Development
npm run dev # Watch mode with tsx
npm run test # Run all unit tests
npm run bench # Run parser benchmarks
npm run build # Compile TypeScript → build/Performance
Parser throughput (measured on Apple Silicon):
Parser | Iterations | Time | Per-call |
Slither (100 detectors) | 1,000 | ~109ms | ~0.1ms |
Forge Gas Table | 10,000 | ~32ms | ~0.003ms |
License
MIT
Maintenance
Related MCP Servers
- Alicense-qualityBmaintenanceAn MCP server for coordinating a permissionless swarm of AI agents to discover, investigate, and synthesize on-chain anomalies across EVM chains. Agents authenticate via off-chain ECDSA and earn reputation through useful contributions.Last updatedMIT
- Alicense-qualityCmaintenanceAn MCP server providing 80+ tools for Foundry Ethereum development, enabling AI assistants to compile, test, deploy smart contracts, interact with EVM chains, and manage local nodes via Forge, Cast, Anvil, and Chisel.Last updated22MIT
- Alicense-qualityDmaintenanceMCP server providing AI assistants with tools for advanced EVM smart contract analysis, including proxy detection, implementation resolution, and security analysis.Last updated1MIT
- Flicense-qualityCmaintenanceA security-first MCP server that provides LLMs with structured tools for filesystem, process, search, build/test/lint, IDE integration, and more.Last updated1
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/0xendale/evm-agent-toolkit'
If you have feedback or need assistance with the MCP directory API, please join our Discord server