Skip to main content
Glama

ReadyOrAI

零成本 MCP 服务器,用于本地代码检查。分析你的代码是否符合整洁代码规范、最佳实践,并给出可操作的建议——无需修改代码,也无需调用 API。

功能特性

  • 9 个分析器:复杂度、命名、结构、模式、导入、文档、安全、重复、AI 生成代码检测

  • 多语言支持:JS/TS、Python、Go、Rust(深度分析)+ Java、C#、Ruby、PHP 等(基于正则)

  • 零成本:所有分析均在本地运行——无需 API 密钥,无外部调用

  • MCP 服务器:通过 stdio 传输与 Claude Desktop、Claude Code 和 VS Code 配合使用

  • CLI 工具ready @filenameAI 终端命令,可独立使用

  • SARIF 输出:导出结果以集成 GitHub Code Scanning

  • 监视模式:文件变更时持续重新分析

  • 基线/差异模式:跟踪增量采用情况——只显示新问题

  • 配置文件:项目级 .readyorai.json,用于共享设置

  • 行内抑制:使用 // readyorai-ignore 注释静默特定发现

Related MCP server: Risk Audit MCP

安装

作为 MCP 服务器

Claude Desktopclaude_desktop_config.json):

{
  "mcpServers": {
    "readyorai": {
      "command": "npx",
      "args": ["-y", "readyorai"]
    }
  }
}

Claude Code

claude mcp add readyorai -- npx -y readyorai

VS Code.vscode/mcp.json):

{
  "servers": {
    "readyorai": {
      "command": "npx",
      "args": ["-y", "readyorai"]
    }
  }
}

作为 CLI 工具

npm install -g readyorai

CLI 用法

ready @src/index.ts                          # Inspect a single file
ready @src/                                  # Inspect a directory
ready @src/index.ts --checks security,naming # Run specific checks
ready @src/index.ts --json                   # JSON output
ready @src/index.ts --sarif                  # SARIF output (GitHub Code Scanning)
ready @src/index.ts --severity warning       # Only warnings and errors
ready @src/index.ts --watch                  # Re-analyze on file changes
ready @src/ --baseline baseline.json         # Compare against saved baseline
ready @src/ --save-baseline baseline.json    # Save current results as baseline
AI                                           # Inspect current directory
AI @src/utils.ts                             # Alias with file target

退出码

代码

含义

0

未发现问题

1

发现警告

2

发现错误

3

运行时错误

配置

在项目根目录创建 .readyorai.json

{
  "checks": ["complexity", "naming", "security"],
  "severity": "warning",
  "exclude": ["dist/**", "node_modules/**"]
}

行内抑制

在某一行的代码上静默特定发现:

eval(code); // readyorai-ignore

MCP 工具

工具

描述

inspect_file

分析单个文件的代码质量问题

inspect_directory

批量分析目录中的所有源文件

get_metrics

获取定量指标(代码行数、复杂度、函数数量)

compare_files

比较两个文件版本,显示已修复、新引入或未变化的发现

suggest_fixes

为每个发现提供带上下文的可操作修复建议

MCP 提示词

提示词

描述

review-code

结构化代码审查,可指定关注领域

health-check

项目级健康评估

检查项

检查项

检测内容

complexity

圈复杂度/认知复杂度、深层嵌套

naming

命名约定违规、单字母变量、布尔前缀

structure

过长的文件/函数、参数过多、过长的行

patterns

console.log、空 catch、魔法数字、嵌套三元表达式、TODO

imports

未使用的导入、通配符导入、分散的导入

documentation

缺少 JSDoc/文档字符串、注释比例过低

security

硬编码密钥、eval()、SQL 注入、XSS 模式

duplication

重复代码块、重复的魔法字符串

ai-detection

检测 AI 生成代码中常见的模式

语言支持

层级

语言

分析方式

1

JavaScript、TypeScript、Python、Go、Rust

完整的 AST 驱动分析

2

Java、C#、Ruby、PHP、Swift、Kotlin、C、C++

正则 + 启发式分析

3

任意文本文件

基于行的检查(行长、TODO、密钥、重复)

开发

git clone https://github.com/TedoNeObichaJavaScript/ReadyOrAI.git
cd ReadyOrAI
npm install
npm run build
npm test

支持

如果你觉得 ReadyOrAI 有用,欢迎支持该项目:

  • Borko — 5 欧元

许可证

MIT

A
license - permissive license
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables comprehensive code analysis including quality assessment, security vulnerability detection, refactoring suggestions, complexity calculations, and automatic documentation generation for multiple programming languages.
    5
    10
    MIT
  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables security scanning of code projects to identify common vulnerabilities like XSS, injections, SSRF, and path traversal issues. Provides local, offline scanning with severity-grouped results and actionable fix suggestions for improving code security.
    38
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI-powered code safety analysis including risk detection, secret scanning, dependency checking, and code snapshot management. Works offline for basic features with optional cloud integration for advanced ML analysis and team collaboration.
    9
    1
    Apache 2.0
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI assistants and developers to analyze code for language-specific best practices and idiomatic patterns across programming languages, CI automation, and configuration formats.
    16
    2
    MIT

View all related MCP servers

Related MCP Connectors

  • Generate SBOMs, scan vulnerabilities, and analyze dependencies from local projects or Git repos.

  • Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.

  • Enterprise code intelligence for M&A, security audits, and tech debt. Hosted server with 200k free.

View all MCP Connectors

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/TedoNeObichaJavaScript/ReadyOrAI'

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