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 分

    請在儲存庫或註冊中心條目中宣告授權條款。