npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bangdao-ai/code-review-mcp

v1.0.0

Published

AI代码审查工具MCP服务器,支持Java代码自动化审查

Readme

代码审查 MCP 工具

这是一个基于 Python 的 MCP(Model Context Protocol)工具,用于 AI 自动化代码审查。支持通过 npm/npx 直接使用。

功能特性

  • AI 智能审查:基于先进的 AI 模型进行代码审查,识别潜在问题
  • 多维度检查:覆盖安全性、数据库操作、代码质量等多个维度
  • 风险分级:按照 CRITICAL、HIGH、MEDIUM、LOW 四个等级分类问题
  • 详细报告:生成结构化的 Markdown 格式审查报告
  • 批量处理:支持批量扫描目录下的所有 Java 文件
  • 增量审查:自动跳过已生成报告的文件,支持增量审查

安装

前置要求

  • Node.js: >= 14.0.0
  • Python: >= 3.8
  • Python 依赖: pip install -r requirements.txt

安装方式

方式一:通过 npx 使用(推荐,无需安装)

直接在 Cursor 配置中使用,无需手动安装:

npx -y @bangdao-ai/code-review-mcp@latest

方式二:全局安装

npm install -g @bangdao-ai/code-review-mcp@latest

方式三:本地安装(开发模式)

git clone https://github.com/bangdao-ai/code-review-mcp.git
cd code-review-mcp
pip3 install -r requirements.txt

配置

在 Cursor 中配置

在 Cursor 的 MCP 配置文件中添加:

{
  "mcpServers": {
    "code-review": {
      "command": "npx",
      "args": [
        "-y",
        "@bangdao-ai/code-review-mcp@latest"
      ],
      "env": {
        "CR_API_KEY": "your-api-key-here",
        "CR_API_URL": "https://bailian.bangdao-tech.com/api/v1",
        "CR_MODEL": "qwen3-coder-plus"
      }
    }
  }
}

配置说明

  • CR_API_KEY(必需):AI API 密钥
  • CR_API_URL(可选):AI API 调用地址,默认 https://bailian.bangdao-tech.com/api/v1
  • CR_MODEL(可选):使用的模型名称,默认 qwen3-coder-plus

配置文件方式(可选)

如果未在环境变量中配置,可以使用配置文件 src/config.md

MCP 工具

1. review_code

对指定的 Java 代码目录或文件进行代码审查,生成详细的审查报告。

参数

  • directory (必需): 要审查的 Java 代码目录路径或单个文件路径
  • force (可选): 是否强制重新审查已生成报告的文件(默认 false)

2. get_review_report

获取指定文件的代码审查报告。

参数

  • file_path (必需): Java 源文件的路径

3. list_reviewed_files

列出已生成审查报告的文件列表。

项目结构

code-review-mcp/
├── src/                        # 源码目录
│   ├── mcp_server.py          # MCP服务器主文件
│   ├── batchcr.py              # 批量代码审查脚本
│   ├── analyze_reports.py      # 报告汇总分析脚本
│   ├── md_to_html.py           # Markdown转HTML工具
│   ├── config.md               # 配置文件(可选)
│   ├── crrules.md              # CR规则文件
│   └── reportformat.md         # 报告格式文件
├── index.js                    # npm 入口文件
├── package.json                # npm 包配置
├── requirements.txt            # Python 依赖
├── README.md                   # 项目说明
└── PUBLISH.md                  # 发布指南

故障排查

问题1: MCP 服务器无法启动

检查:

  1. 确保 Python 版本 >= 3.8: python3 --version
  2. 确保已安装所有依赖: pip install -r requirements.txt

问题2: API 调用失败

检查:

  1. 确保 CR_API_KEY 已正确配置(环境变量或 MCP 配置)
  2. 确保网络连接正常(需要公司 aliyun VPN)

发布

参考 PUBLISH.md 了解如何发布到 npm。

许可证

MIT