MCP Contract Auditor

MCP Contract Auditor

Fetches verified EVM smart contract source code, scans for vulnerabilities, analyzes token holder distribution, and generates audit reports.

Category
Visit Server

README

šŸ”’ 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
audit_contract šŸ”’ Full audit — fetch source, scan vulns, analyze holders, generate report
fetch_contract Fetch verified contract source code & ABI from Blockscout
scan_vulns Scan Solidity source for 15+ vulnerability patterns
check_holders Analyze token holder distribution & centralization risk
list_chains List all supported EVM chains

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 start

Usage 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.json

How It Works

  1. Fetch — Retrieves verified contract source code from Blockscout API
  2. Analyze — Runs 15+ pattern-based vulnerability detectors on the source
  3. Holder Check — Fetches token holder data and calculates Gini coefficient
  4. 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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured