Contract Security Scanner

io.github.mastrophot由 GitHub 帳號 mastrophot 發布v0.1.1更新於 Oct 24, 2026

MCP smart contract scanner with NEAR-focused security context.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

一個本機 MCP 伺服器,掃描智慧合約原始碼中的常見安全弱點,並回傳含評分與 NEAR 相關說明的報告。

可以做什麼
掃描 Solidity、Rust 或 TypeScript 合約原始碼,偵測重入、整數溢位、存取控制問題、搶跑與預言機操縱等啟發式模式,回傳含嚴重程度、類型與行號的弱點清單,以及安全評分、NEAR 等效評分和 NEAR 相關安全說明與建議。比較不同語言的安全模型。為指定語言產生稽核清單。
適用情境
適合在審查或稽核智慧合約程式碼時做快速啟發式檢查、取得稽核清單,或在深入人工稽核前了解 NEAR 相關的安全背景。
執行需求
以本機程序執行,需從 npm 套件 mcp-contract-security 安裝(需要 Node.js)。未宣告驗證、環境變數或標頭。僅支援桌面用戶端。
安裝前請注意
偵測採啟發式規則,結果只是起點,不能取代專業稽核。送出的合約原始碼由本機工具處理;安裝前請先檢視該套件。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Contract Security Scanner,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mcp-contract-security

MCP server for smart contract security scanning.

Implements the required tools:

  • scan_contract
  • compare_security_models
  • audit_checklist

Supports languages:

  • solidity
  • rust
  • typescript

What it checks

scan_contract currently detects heuristic patterns for:

  • Reentrancy
  • Integer overflow/underflow risk
  • Access control issues
  • Front-running exposure
  • Oracle manipulation risk

The output includes:

  • vulnerability list with severity/type/line
  • security_score
  • near_equivalent_score
  • NEAR-specific security notes and recommendation

Install

bash
npm install -g mcp-contract-security

Published package:

MCP config (Claude Desktop)

json
{  "mcpServers": {    "contract-security": {      "command": "mcp-contract-security"    }  }}

Tool usage

scan_contract

Input:

json
{  "code": "contract source code here",  "language": "solidity"}

compare_security_models

Input (optional):

json
{  "language": "solidity"}

audit_checklist

Input (optional):

json
{  "language": "rust"}

Local development

bash
npm installnpm run check

Deliverable assets

Additional publish assets are prepared in deliverables/:

  • deliverables/mcp-registry-submission.md
  • deliverables/security-subreddit-posts.md
  • deliverables/blog-why-near-contracts-safer.md
  • server.json (MCP Registry metadata, schema-validated)

License

MIT

來源:README.md,提交 9f32ff1

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分