evm-agent-toolkit
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
Latest Blog Posts
- 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