Skip to main content
Glama
AlanNiew

code-review-mcp

by AlanNiew

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
analyze_fileA

分析单个文件的代码质量、复杂度和安全问题。

会运行所有适用的规则:

  • 安全规则(SEC001-SEC012):eval/exec、shell 注入、pickle、弱哈希、硬编码密钥、SSL 关闭等

  • 复杂度规则(COMPLEX001-005):函数长度、圈复杂度、认知复杂度、参数个数、嵌套深度

  • 风格规则(STYLE001-004):行长、TODO、末尾空白、调试残留

Args: file_path: 要分析的文件路径(相对于项目根目录或绝对路径)

review_diffA

审查当前 git 仓库中未提交的变更(staged + unstaged)。

对 diff 中的新增行做以下检测:

  • 硬编码的密钥或密码(严重)

  • 遗留的 print/console.log 调试语句

  • 新增的 TODO/FIXME/HACK 标记

  • 过长的新增行

check_projectA

扫描项目目录的代码质量概况。

遍历项目下所有支持的源代码文件(Python/JS/TS/Java/Go/Rust 等), 对每个文件运行完整规则集,最后汇总:

  • 总文件数和总行数

  • 语言分布统计

  • 错误/警告/提示计数

  • 问题最多的前 10 个文件

  • 整体质量评分(A-F 等级)

Args: directory: 要扫描的项目目录路径,默认为当前目录

list_rulesA

列出所有已注册的代码审查规则,便于 AI 选择性调用。

返回每条规则的 ID、名称、描述、类别和默认严重级别。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AlanNiew/code-review-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server