Contract Security Scanner

io.github.fino-oss由 GitHub 账号 fino-oss 发布v1.0.0更新于 Oct 24, 2026

Scans Base L2 smart contracts for security risks. Risk score 0-100, detects backdoors & proxies.

已验证STDIO仅桌面金融安全与监控

概览

AI 生成的概览

扫描 Base L2 智能合约的安全风险,给出 0-100 风险评分、后门与代理检测结果以及使用建议。

可以做什么
  • 扫描单个 Base 合约的源码验证状态、高风险函数选择器、合约年龄与活跃度
  • 批量对比最多 5 个合约的风险
  • 给出 0-100 风险评分与可执行结论(SAFE、CAUTION、HIGH_RISK、DO_NOT_USE)
  • 检测增发、黑名单、暂停、后门及可升级代理等模式
适用场景
适合在授权、购买或与某个 Base L2 代币或合约交互前,让助手先做一次风险核查,或对比多个相似合约。只读检查,适合作为链上尽职调查的轻量补充。
运行要求
以本地 Node.js stdio 进程运行(npm 包 @fino314-oss/contract-scanner-mcp),需在 Claude Desktop、Cursor 或 Cline 等 MCP 客户端中配置。需要访问 Base 主网 RPC 与 BaseScan 的网络连接。可选环境变量 BASESCAN_API_KEY 用于完整源码分析,不设置也可做基础字节码检查。无需钱包。
安装前请注意
结果是启发式风险评分,并非审计或安全保证;README 也说明免费 BaseScan 额度下若无 BASESCAN_API_KEY 则源码分析受限。所扫描的合约地址会发送至 BaseScan 与 Base RPC 端点。README 中列出一个代理钱包地址,请勿向其转账。工具为只读,不会签名或转移资产。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Contract Security Scanner,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Contract Security Scanner — MCP Server

[contract-scanner-mcp MCP server]

Scan any Base L2 smart contract for security risks directly from your AI assistant.

3 tools exposed:

  • scan_contract — Full security scan (source verification, risky selectors, age, activity)
  • batch_scan — Compare up to 5 contracts side by side
  • interpret_risk — Get an actionable recommendation (SAFE / CAUTION / HIGH_RISK / DO_NOT_USE)

Risk score: 0-100. Analyzes: mint/blacklist/backdoor functions, proxy patterns, source verification, contract age, transaction activity.


Installation

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "contract-scanner": {      "command": "node",      "args": ["/Users/sam/Desktop/samDev/p8/mcp/server.js"]    }  }}

Restart Claude Desktop. The tools appear automatically.


Cursor

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

json
{  "mcpServers": {    "contract-scanner": {      "command": "node",      "args": ["/Users/sam/Desktop/samDev/p8/mcp/server.js"]    }  }}

Cline (VS Code extension)

  1. Open Cline settings → MCP Servers → Add server
  2. Set type: stdio
  3. Command: node /Users/sam/Desktop/samDev/p8/mcp/server.js

Any MCP client (generic)

The server uses stdio transport — just pipe JSON-RPC messages:

bash
node /Users/sam/Desktop/samDev/p8/mcp/server.js

Usage examples

Once connected, just ask your AI assistant naturally:

"Scan this contract before I approve: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
"Compare the risk of these 3 Aave clones: 0x... 0x... 0x..."
"Is this token safe to buy? 0x4ed4e862860bed51a9570b96d89af5e1b0efefed"

What gets analyzed

CheckSource
Source code verified?BaseScan API
Mint / burn functionsBytecode selector scan
Pause / freezeBytecode selector scan
Blacklist / whitelistBytecode selector scan
Backdoors (rescueTokens, withdrawAll)Bytecode selector scan
Upgradeable proxyBaseScan + delegatecall detection
Contract ageBaseScan transaction history
Activity levelBaseScan recent txs

Risk scoring

ScoreLabelMeaning
0-9SAFENo red flags
10-29LOWMinor concerns
30-49MEDIUMElevated risk — review before interacting
50-69HIGHSignificant risk — small amounts only
70+CRITICALAvoid — potential rug or backdoor

Technical notes

  • Chain: Base L2 only (https://mainnet.base.org)
  • API: BaseScan free tier (no key needed for basic checks; set BASESCAN_API_KEY env var for full source analysis)
  • No wallet needed: read-only RPC calls only
  • Latency: ~2-5s per contract (network dependent)

Built on Base. Agent wallet: 0x804dd2cE4aA3296831c880139040e4326df13c6e

来源:README.md,提交 4992549

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。