{
  "markdown": "# EVM MCP Server\n\n[![smithery badge](https://smithery.ai/badge/0xendale/evm-agent-toolkit)](https://smithery.ai/servers/0xendale/evm-agent-toolkit)\n\n[![evm-agent-toolkit MCP server](https://glama.ai/mcp/servers/0xendale/evm-agent-toolkit/badges/card.svg)](https://glama.ai/mcp/servers/0xendale/evm-agent-toolkit)\n\nAn 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.\n\n## Why This Exists\n\nRaw 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.\n\n## Tools\n\n| Tool | Annotations | Description |\n|------|-------------|-------------|\n| `evm_scan_vulnerabilities` | `readOnly`, `idempotent` | Run Slither analysis. Returns severity-rated findings with extracted code snippets. Supports `severityFilter` and `maxFindings`. |\n| `evm_analyze_gas_profile` | `readOnly`, `idempotent` | Run `forge test --gas-report`. Returns structured per-function gas data. |\n| `evm_compile_and_diagnose` | `readOnly`, `idempotent` | Run `forge build`. Returns structured compiler diagnostics on failure. |\n| `evm_simulate_transaction` | `readOnly`, `idempotent` | Run `cast call`. Returns decoded return data or revert reasons. |\n| `evm_inspect_storage_layout` | `readOnly`, `idempotent` | Run `forge inspect storage-layout`. Returns slot/offset/type per state variable — proxy-collision and packing checks. |\n| `evm_trace_call` | `readOnly`, `idempotent` | Run `cast call --trace`. Returns structured call tree with gas, call types, events, and revert frames. |\n| `evm_decode_calldata` | `readOnly`, `idempotent` | Decode hex calldata via `cast calldata-decode` (offline with signature) or `cast 4byte-decode` (selector lookup). |\n| `evm_run_tests` | `readOnly` | Run `forge test` (optional `matchTest`/`matchPath`). Returns per-suite results with gas, fuzz runs, and failure counterexamples. |\n| `evm_toolchain_versions` | `readOnly`, `idempotent` | Report installed/missing status and exact versions of `slither`, `forge`, `cast`. |\n\n## Resources\n\n| URI | Description |\n|-----|-------------|\n| `evm://patterns/vulnerabilities` | Security vulnerability pattern library |\n| `evm://gas/optimizations` | Gas optimization pattern library |\n| `evm://patterns/arbitrage` | Arbitrage strategy reference |\n\n## Prompts\n\nSkill workflows exposed as MCP prompts for clients without native skill support. Each embeds the full SKILL.md workflow.\n\n| Prompt | Args | Description |\n|--------|------|-------------|\n| `audit_contract` | `contractPath` | Severity-rated security audit (vulnerability-scanning workflow) |\n| `optimize_gas` | `projectPath` | Measured gas-optimization pass (gas-optimization workflow) |\n| `analyze_arbitrage` | `scenario` | Opportunity ledger net of fees/gas/slippage (arbitrage-analysis workflow) |\n\n## Architecture\n\n```text\nevm-agent-toolkit/\n├── src/\n│   ├── mcp/            # MCP server entry point (stdio transport)\n│   ├── tools/          # Zod-validated CLI output parsers\n│   │   ├── slither.ts  # Slither JSON → SanitizedFinding[]\n│   │   ├── forge.ts    # Forge gas tables → ContractGas[]\n│   │   ├── compiler.ts # Forge build errors → CompilerDiagnostic[]\n│   │   ├── simulator.ts# Cast call output → SimulatorDiagnostic\n│   │   ├── storage.ts  # Forge storage layout → StorageEntry[]\n│   │   ├── trace.ts    # Cast call traces → TraceEvent[]\n│   │   ├── decoder.ts  # Cast calldata decode → DecodedCalldata\n│   │   ├── testrunner.ts # Forge test output → TestSuite[]\n│   │   └── versions.ts # Toolchain --version output → ToolVersion\n│   ├── rules/          # Agent system prompt injections\n│   └── hooks/          # Lifecycle hooks (UserPromptSubmit, Statusline)\n├── tests/              # Vitest unit tests for all parsers\n├── bench/              # Performance benchmarks\n├── evals/              # Agent evaluation framework (vulnerable contracts + eval XML)\n├── skills/             # Markdown reference libraries\n├── .claude-plugin/     # Claude Code plugin manifest\n└── gemini-extension.json # Antigravity plugin manifest\n```\n\n## Setup\n\n```bash\nnpm install\nnpm run build\n```\n\n## Agent Configuration\n\nThis is a stdio MCP server. It is spawned by the MCP client, not started manually.\n\n**Claude Desktop / Cursor:**\n```json\n{\n  \"mcpServers\": {\n    \"evm-agent-toolkit\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@0xendale/evm-agent-toolkit\"]\n    }\n  }\n}\n```\n\n**Prerequisites:** `slither`, `forge`, and `cast` must be installed on the host machine.\n\n## Development\n\n```bash\nnpm run dev       # Watch mode with tsx\nnpm run test      # Run all unit tests\nnpm run bench     # Run parser benchmarks\nnpm run build     # Compile TypeScript → build/\n```\n\n## Performance\n\nParser throughput (measured on Apple Silicon):\n\n| Parser | Iterations | Time | Per-call |\n|--------|-----------|------|----------|\n| Slither (100 detectors) | 1,000 | ~109ms | ~0.1ms |\n| Forge Gas Table | 10,000 | ~32ms | ~0.003ms |\n\n## License\n\nMIT\n",
  "bytes": 5187,
  "sha": "5cfe0e7665bc36849faca239a993bcd84d0ab096b514ab31f1452000db7b15d5",
  "repo_slug": "0xendale/evm-agent-toolkit",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_0xendale_evm_agent_toolkit_b0083a95/readme"
}