
Lint
io.github.rog0x由 GitHub 账号 rog0x 发布v1.0.2更新于 Oct 24, 2026
Style check, naming, complexity analysis for AI agents
概览
一个本地 MCP 服务器,为 AI 助手提供代码检查工具:风格检查、命名规范、复杂度分析、死代码与导入分析。
- 可以做什么
- 按可配置规则检查代码风格,包括缩进、行长度、行尾空白、文件末尾换行、引号与分号。分析标识符命名规范,标记混用规范并给出转换后的名称建议,支持 TypeScript、JavaScript、Python 和 Go 的语言相关规则。测量每个函数的圈复杂度、函数行数与嵌套深度,并按可配置阈值标记。查找潜在死代码,如未使用变量、不可达语句、空 catch 块、注释掉的代码以及 TODO/FIXME/HACK 注释。分析导入语句中的未使用、重复或顺序不当的导入,并给出基本的循环依赖提示。
- 适用场景
- 适合让助手审查或清理源代码文件,报告风格、命名、复杂度和导入问题,而无需运行完整 linter 或构建工具链。适用于对单个代码片段或文件做快速的文本级检查。
- 运行要求
- 以本地进程方式通过 stdio 运行,来自 npm 包 @rog0x/mcp-lint-tools;README 说明需安装依赖、构建,并用 Node.js 让桌面客户端指向构建后的入口文件。未声明账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Lint,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
@rog0x/mcp-lint-tools
Code linting and style checking tools for AI agents, exposed as an MCP (Model Context Protocol) server.
All analysis is performed via regex and text parsing — no AST libraries required.
Tools
check_code_style
Check code style issues with configurable rules:
- Indentation — tabs vs spaces, configurable indent size
- Line length — flag lines exceeding a maximum length
- Trailing whitespace — detect trailing spaces/tabs
- Final newline — require a newline at end of file
- Quotes — enforce single or double quote consistency
- Semicolons — enforce always or never semicolon usage
check_naming_conventions
Analyze identifier naming conventions:
- Detect camelCase, PascalCase, snake_case, UPPER_CASE
- Language-aware rules for TypeScript, JavaScript, Python, Go
- Flag mixed conventions within the same identifier kind
- Suggest fixes with automatic name conversion
analyze_complexity
Measure code complexity metrics:
- Cyclomatic complexity per function
- Lines per function count
- Nesting depth measurement
- Configurable thresholds for flagging
find_dead_code
Detect potential dead code:
- Unused variables — declared but never referenced
- Unreachable code — statements after return/throw/break
- Empty catch blocks — silently swallowed errors
- Commented-out code — blocks of commented code
- TODO/FIXME/HACK — annotation comments
analyze_imports
Analyze import statements:
- Unused imports — imported names not referenced in code
- Import ordering — enforce group ordering (builtin > external > internal > relative)
- Duplicate imports — same module imported multiple times
- Circular dependency hints — basic detection of potential cycles
Installation
Usage with Claude Desktop
Add to your claude_desktop_config.json:
Development
License
MIT
来源:README.md,提交 6968843
工具
0版本历史
1- v1.0.2最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。