ContractScan
OfficialProvides a scan_contract tool to statically analyze single-file Solidity contracts using Slither and Aderyn plus rug-pull and centralization heuristics, returning a Deployable, Fix first, or Do not deploy verdict with confidence and reasons.
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., "@ContractScanscan this Solidity contract and tell me if it's safe to deploy"
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.
ContractScan
ContractScan checks single-file Solidity contracts before deployment. It is aimed at AI-written ("vibe-coded") contracts. It runs Slither and Aderyn static analysis plus a small set of rug-pull and centralization heuristics. It then gives a verdict of Deployable, Fix first or Do not deploy, with plain-language explanations.
Hosted version: https://contract-scan.dev
ContractScan is NOT an audit. It is static analysis plus pattern heuristics. It misses economic and logic bugs and produces false positives. A "Deployable" verdict only means no high- or medium-severity issue was found by these tools.
How the verdict works
The verdict is computed from tool findings only. The optional LLM explainer writes explanation text and patches, but it cannot change the verdict.
A single high-severity finding blocks deployment only if one of these holds:
it comes from a high-precision Slither detector (
reentrancy-eth,arbitrary-send-eth,suicidal,controlled-delegatecall);another tool or a heuristic flags overlapping lines;
the owner can take funds that users deposited;
anyone can mint tokens, anyone can burn another account's tokens, or a self-transfer inflates the balance (token-logic heuristics).
Otherwise the result is "fix first" with low confidence.
Each report includes
verdict_confidenceandverdict_reasons. Every finding has awhyfield (which detector or pattern fired, on what code), and every report has anot_analyzedlist: business logic, price/oracle manipulation, cross-contract interactions, economic/MEV and off-chain risk are not checked.Token-logic heuristics (
token:*) target root causes seen in real exploits: self-transfer balance inflation, unguarded mint, unguarded burn of another account, rewriting the AMM pair balance plussync(), extra burns on pool transfers, and pricing fromaddress(this).balanceduring a payable call.The heuristic thresholds were tuned on a small public experiment: https://github.com/contractscan-dev/ai-solidity-experiment-2026-10
Related MCP server: solidity-sentinel
Run locally
Requirements: Linux, Python 3.11+, bwrap (bubblewrap, optional but recommended), Slither, Aderyn, and solc via solc-select.
python3 -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt
for v in $(seq 0 30); do solc-select install 0.8.$v; done # scanner only uses pre-installed compilers
CS_ALLOW_PREWARM=1 python scripts/prewarm_compilers.py # one-time: cache compilers for Aderyn (no downloads at scan time)
# install aderyn: https://github.com/Cyfrin/aderyn#installation
cp config.env.example config.env # edit values
CS_VENV=$VIRTUAL_ENV uvicorn app:app --host 127.0.0.1 --port 8787Web UI: http://127.0.0.1:8787/
API:
POST /api/scanwith JSON{"source": "<solidity>"}Tests:
pytest -q tests. The end-to-end regression tests are skipped when the analysis tools are not installed.
Each scan runs in a fresh temporary directory inside bubblewrap. The sandbox has no network and a read-only root, and runs under memory, CPU and time limits. Contract code is only compiled and analyzed, never executed.
Limits: single file (flattened is fine), 2,000 lines, 250 KB, solc 0.8.0-0.8.30 (pre-installed only). The only imports allowed are @openzeppelin/contracts/.... They resolve to pinned vendored copies in vendor/ (v4.9.6 and v5.7.0, MIT, sha256 in vendor/README.md), and nothing is fetched at scan time. Findings inside OpenZeppelin code are not reported.
MCP
ContractScan includes a stdio MCP server exposing one tool, scan_contract:
{ "mcpServers": { "contractscan": { "command": "/path/to/.venv/bin/python", "args": ["/path/to/contractscan/mcp_server.py"] } } }The server enforces a per-caller daily limit (CS_MCP_PER_DAY).
Data retention
Contract source is not stored. It is written to a temporary directory for the duration of a scan, and that directory is deleted when the scan finishes. The hosted service never keeps source longer than 24 hours.
If an LLM explainer is configured (
DEEPSEEK_API_KEY), the source and findings are sent to that provider to generate explanations.The SQLite database (
data/) holds anonymous usage counters, payment records (transaction hashes and redeem codes) and optional feedback.
Payments (hosted service)
The hosted service accepts plain USDC transfers on Base, which the server verifies on-chain. It never asks for wallet signatures and never holds keys. x402 support is experimental. See payments.py.
License
MIT. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only smart-contract security intelligence for autonomous agents.
Pre-trade token safety check for AI agents. Simulates a sell before you buy, then returns one low/medium/high/unknown verdict with the signals behind it: sellability, buy/sell tax, liquidity depth, pair age, same-ticker impersonation, owner powers from bytecode. Ethereum, BSC, Base, Solana. Fail-closed - a check that cannot run answers unknown, never low. Publishes its own measured error rate with the benchmark harness in the repo. Free, no signup, no API key, MIT.
Smart-contract risk reports for AI agents on 20 EVM chains, paid per call via x402 ($0.02 USDC).
Check a Base contract, transaction or web page before you act. Free pricing, paid per call in USDC.
Related MCP Servers
- AlicenseAqualityBmaintenanceQuick-scan a smart contract for rug, honeypot, or centralization risk before sending funds. It combines verified source, live on-chain state, and heuristic Solidity analysis to return a SAFE/CAUTION/HIGH-RISK verdict.1MIT
- AlicenseAqualityCmaintenanceEnables static security audit of Solidity smart contracts by analyzing source code or deployed bytecode for vulnerabilities, providing risk scores and detailed findings.1MIT
- AlicenseAqualityCmaintenanceAI-powered smart contract security analysis for AI agents and developers, enabling scanning of Solidity repos for vulnerabilities.315 npm9MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to assess the risk of crypto wallets, tokens, and smart contracts by providing read-only on-chain analysis, 0-100 risk scoring with explanations, fund tracing, and contract inspection before interaction.6MIT