M

MCP合约分析器

@RockYuan/mcp-contract-analyst
0 Stars 24 次浏览 RockYuan 更新于 2026-08-23

启用与Monad区块链的交互,以分析智能合约源代码的功能和安全性,并为未验证的合约提供反编译支持。

该服务暂未提供标准配置,请参考 README 手动接入

服务介绍

MCP 智能合约分析器

@author Ry @RockRockDay

实现了一个 Model Context Protocol (MCP) 服务器,用于与 Monad 区块链交互,进行智能合约源代码的功能性与安全性分析。

对于未验证的合约,将尝试进行反编译以辅助恢复和审查源代码。

什么是 MCP?

Model Context Protocol(模型上下文协议,简称 MCP)是一种标准,允许 AI 模型与外部工具和服务进行交互。

前提条件

  • Node.js (v16 或更高版本)
  • npmyarn
  • Claude Desktop / Cursor ide / 更多...

开始使用

  1. 克隆此仓库
git clone https://github.com/rockyuan/mcp-contract-analyst.git
  1. 安装依赖项:
npm install
  1. 构建项目
npm run build

服务器现在可以使用了!

将 MCP 服务器添加到 Cursor

  1. 打开 "Cursor"。
  2. 打开设置。

Cursor > 设置 > Cursor 设置 > MCP

  1. 点击 "添加一个新的全局 MCP 服务器"。
  2. 添加有关 MCP 服务器的详细信息并保存文件。
{
  "mcpServers": {
    "mcp-contract-analyst": {
      "command": "node",
      "args": ["/<path-to-project>/build/index.js"],
      "env": {
        "API_URL": "https://api.blockvision.org/v2/monad/contract/source/code?address=",
        "API_KEY": "xxxxxxxxxxx",
        "DECOMPILE_URL": "https://www.ethervm.io/decompile"
      }
    }
  }
}
  1. 刷新 Cursor。

使用 MCP 服务器

将 MCP 服务器添加到 Claude Desktop

  1. 打开 "Claude Desktop"。
  2. 打开设置。

Claude > 设置 > 开发者

  1. 打开 claude_desktop_config.json
  2. 添加有关 MCP 服务器的详细信息并保存文件。
{
  "mcpServers": {
    "mcp-contract-analyst": {
      "command": "node",
      "args": ["/<path-to-project>/build/index.js"],
      "env": {
        "API_URL": "https://api.blockvision.org/v2/monad/contract/source/code?address=",
        "API_KEY": "xxxxxxxxxxx",
        "DECOMPILE_URL": "https://www.ethervm.io/decompile"
      }
    }
  }
}
  1. 重启 "Claude Desktop"。

更多资源

致谢