MCP Contract Auditor
Fetch, analyze, and generate audit reports for smart contracts deployed on BNB Chain via Blockscout API.
Fetch, analyze, and generate audit reports for smart contracts deployed on Ethereum via Blockscout API.
Fetch, analyze, and generate audit reports for smart contracts deployed on Optimism via Blockscout API.
Fetch, analyze, and generate audit reports for smart contracts deployed on Polygon via Blockscout API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Contract Auditor audit 0x1234...abcd on Ethereum"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
š MCP Contract Auditor
Smart Contract Security Audit MCP Server ā Fetch, analyze, and generate audit reports for EVM smart contracts.
Built for CyOps Arena Hackathon by Carlys17.
Features
Tool | Description |
| š Full audit ā fetch source, scan vulns, analyze holders, generate report |
| Fetch verified contract source code & ABI from Blockscout |
| Scan Solidity source for 15+ vulnerability patterns |
| Analyze token holder distribution & centralization risk |
| List all supported EVM chains |
Related MCP server: solidity-sentinel
Supported Chains
Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Chain, Gnosis, Avalanche, zkSync Era, Celo ā all via Blockscout API (no API key required).
Vulnerability Detection
Category | Patterns Detected |
š“ Reentrancy | Classic reentrancy, cross-function reentrancy |
š Access Control | Missing modifiers, tx.origin auth |
š External Calls | Unchecked low-level calls, delegatecall, selfdestruct |
š” Integer | Overflow/underflow (pre-0.8), unchecked arithmetic |
š” Denial of Service | Unbounded loops, forced ether |
š” ERC-20 | Missing return values, approve race condition |
šµ Informational | Floating pragma, inline assembly, timestamp dependence |
Installation
# Clone
git clone https://github.com/Carlys17/mcp-contract-auditor.git
cd mcp-contract-auditor
# Install dependencies
npm install
# Build
npm run build
# Run
npm startUsage with Claude Desktop
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"contract-auditor": {
"command": "node",
"args": ["/path/to/mcp-contract-auditor/dist/index.js"]
}
}
}Example Usage
Full Audit
audit_contract(
address: "0x1234...abcd",
chain: "ethereum",
include_holder_analysis: true
)Quick Vulnerability Scan
scan_vulns(
source_code: "pragma solidity ^0.8.0; contract Foo { ... }",
contract_name: "Foo"
)Check Token Holders
check_holders(
address: "0x1234...abcd",
chain: "base"
)Architecture
mcp-contract-auditor/
āāā src/
ā āāā index.ts # MCP server entry (5 tools)
ā āāā types.ts # Type definitions
ā āāā tools/
ā ā āāā analyze-vulnerabilities.ts # 15+ vuln detectors
ā ā āāā holder-analysis.ts # Token holder analysis
ā ā āāā generate-report.ts # Markdown report generator
ā āāā utils/
ā āāā blockscout.ts # Blockscout API client
ā āāā chains.ts # EVM chain configs
āāā package.json
āāā tsconfig.jsonHow It Works
Fetch ā Retrieves verified contract source code from Blockscout API
Analyze ā Runs 15+ pattern-based vulnerability detectors on the source
Holder Check ā Fetches token holder data and calculates Gini coefficient
Report ā Generates a structured markdown audit report with severity ratings
Disclaimer
This is an automated static analysis tool. It uses pattern matching and heuristics ā it is NOT a substitute for a professional manual security audit. Always conduct thorough manual review before deploying contracts with real funds.
License
MIT
Built with ā¤ļø for CyOps Arena Ć MiniMax M3 Hackathon
Available Tools
5 toolsaudit_contractA
š FULL AUDIT: Fetch contract source, scan for vulnerabilities, analyze holders, generate report. One-stop smart contract audit.
Inputs: address (required), chain (required), include_holder_analysis.
check_holdersB
Analyze token holder distribution for centralization and rug-pull risk
Inputs: address (required), chain (required).
fetch_contractA
Fetch verified smart contract source code and ABI from Blockscout
Inputs: address (required), chain (required).
list_chainsA
List all supported EVM chains for contract auditing
Inputs: no named parameters.
scan_vulnsC
Scan Solidity source code for common security vulnerabilities (reentrancy, overflow, access control, etc.)
Inputs: source_code (required), contract_name.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 5 tools
Tools are largely distinct with clear purposes. However, `audit_contract` is a composite that includes functionality of `scan_vulns` and `check_holders`, which could cause some confusion, but descriptions clarify the difference.
All tools follow a consistent verb_noun pattern using snake_case (e.g., audit_contract, list_chains), making it easy for an agent to predict tool names.
Five tools is well-scoped for a contract auditor server, covering the essential operations without being overwhelming or insufficient.
The tool set covers fetching, scanning, holder analysis, and full auditing with chain listing. Missing features like audit history or detailed chain info are minor gaps.
Maintenance
Related MCP Connectors
EVM audit (Slither + source + security.txt + MCP-probe + wallet-exposure). 6 tools + /trace.
Smart-contract security audits for EVM chains and DAML: quote, run and fetch reports.
Read-only smart-contract security intelligence for autonomous agents.
Crypto security, honeypot detection, wallet analysis, and token risk scoring across 31 blockchains.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides comprehensive smart contract analysis for EVM tokens, including proxy contract detection, ownership chain discovery, and OpenZeppelin AccessControl role management across multiple blockchain networks.-
- AlicenseAqualityCmaintenanceEnables static security audit of Solidity smart contracts by analyzing source code or deployed bytecode for vulnerabilities, providing risk scores and detailed findings.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables users to analyze EVM contracts for upgradeability, admin type, and retained powers such as minting, pausing, blacklisting, and ownership transfer, with evidence and a change feed.MIT
- FlicenseNot gradedqualityBmaintenanceEnables users to perform static security audits on EVM Solidity contract code for critical flaws such as reentrancy state changes, unhandled external calls, unchecked delegatecall, and tx.origin authentication vulnerabilities, returning risk audit reports.7-