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 分