smart-contract-scanner-api
Enables scanning Solidity smart contracts for 13 vulnerability classes using pattern-based analysis; provides full audit, quick scan, gas analysis, and detector catalog through MCP tools.
README
<p align="center"><img src="logo.png" width="120" alt="logo"></p>
Smart Contract Scanner API
⭐ Building in public from $0 MRR. Star if you want to follow the journey — lazymac-mcp (42 tools, one MCP install) · lazymac-k-mcp (Korean wedge) · lazymac-sdk (TS client) · api.lazy-mac.com · Pro $29/mo.
🚀 Want all 42 lazymac tools through ONE MCP install?
npx -y @lazymac/mcp· Pro $29/mo for unlimited calls.
Premium Solidity smart contract vulnerability scanner — REST API and MCP server. Detects 13 vulnerability classes using pattern-based analysis with zero external dependencies.
Why This Exists
Professional smart contract audits cost $5K–$50K and take weeks. This API provides automated, instant security analysis for a fraction of the cost. No external API keys needed — all analysis is done locally via pattern matching and structural analysis.
Vulnerability Detection
| ID | Name | Severity | SWC |
|---|---|---|---|
| SCS-001 | Reentrancy | Critical | SWC-107 |
| SCS-002 | Integer Overflow/Underflow | High | SWC-101 |
| SCS-003 | Unchecked External Calls | High | SWC-104 |
| SCS-004 | Access Control | Critical | SWC-105 |
| SCS-005 | Timestamp Dependence | Medium | SWC-116 |
| SCS-006 | tx.origin Authentication | Critical | SWC-115 |
| SCS-007 | Delegatecall Injection | Critical | SWC-112 |
| SCS-008 | Self-destruct | High | SWC-106 |
| SCS-009 | Floating Pragma | Low | SWC-103 |
| SCS-010 | Gas Limit Issues | Medium | SWC-128 |
| SCS-011 | Front-running | Medium | SWC-114 |
| SCS-012 | Missing Events | Low | N/A |
| SCS-013 | Unused Variables | Info | SWC-131 |
Quick Start
npm install
npm start # REST API on port 5200
npm run mcp # MCP server (stdio)
npm test # Run test suite
API Endpoints
POST /api/v1/scan — Full Audit
curl -X POST http://localhost:5200/api/v1/scan \
-H "Content-Type: application/json" \
-d '{"code": "pragma solidity ^0.8.0; contract Foo { function withdraw() public { msg.sender.call{value: 1}(\"\"); } }"}'
Returns: Full audit report with risk score (0–100), findings grouped by severity, gas optimization suggestions, and actionable recommendations.
POST /api/v1/quick-scan — Critical Checks Only
Same request format. Checks only the top 5 critical patterns (reentrancy, access control, tx.origin, delegatecall, unchecked calls). Faster response.
POST /api/v1/gas-analysis — Gas Optimization
Returns gas optimization suggestions with estimated savings per suggestion.
GET /api/v1/vulnerabilities — Detector Catalog
Lists all 13 detectable vulnerability types with descriptions and SWC references.
MCP Server
Add to your MCP client configuration:
{
"mcpServers": {
"smart-contract-scanner": {
"command": "node",
"args": ["src/mcp-server.js"],
"cwd": "/path/to/smart-contract-scanner-api"
}
}
}
Tools:
scan_contract— Full security auditquick_scan_contract— Critical checks onlyanalyze_gas— Gas optimization analysislist_vulnerabilities— Detector catalog
Report Format
{
"report": {
"overview": {
"riskScore": 78,
"riskLevel": "High",
"summary": { "total": 8, "critical": 2, "high": 3, "medium": 2, "low": 1, "info": 0 }
},
"findings": { "bySeverity": { ... }, "total": 8 },
"gasOptimization": { "suggestions": [...] },
"recommendations": [...]
}
}
Docker
docker build -t smart-contract-scanner .
docker run -p 5200:5200 smart-contract-scanner
License
MIT
<sub>💡 Host your own stack? <a href="https://m.do.co/c/c8c07a9d3273">Get $200 DigitalOcean credit</a> via lazymac referral link.</sub>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。