Lint

io.github.rog0x由 GitHub 帳號 rog0x 發布v1.0.2更新於 Oct 24, 2026

Style check, naming, complexity analysis for AI agents

已驗證STDIO僅桌面開發者工具

概覽

AI 產生的概覽

一個本機 MCP 伺服器,為 AI 助理提供程式碼檢查工具:風格檢查、命名規範、複雜度分析、死程式碼與匯入分析。

可以做什麼
依可設定規則檢查程式碼風格,包括縮排、行長度、行尾空白、檔案結尾換行、引號與分號。分析識別字命名規範,標記混用規範並提供轉換後的名称建議,支援 TypeScript、JavaScript、Python 與 Go 的語言相關規則。測量每個函式的圈複雜度、函式行數與巢狀深度,並依可設定門檻標記。找出潛在死程式碼,例如未使用變數、不可達敘述、空的 catch 區塊、註解掉的程式碼以及 TODO/FIXME/HACK 註解。分析匯入敘述中未使用、重複或順序不當的匯入,並提供基本的循環相依提示。
適用情境
適合讓助理審查或清理原始碼檔案,回報風格、命名、複雜度與匯入問題,而不必執行完整 linter 或建置工具鏈。適用於對單一程式碼片段或檔案做快速文字層級檢查。
執行需求
以本機程序方式透過 stdio 執行,來自 npm 套件 @rog0x/mcp-lint-tools;README 說明需安裝相依套件、建置,並用 Node.js 讓桌面用戶端指向建置後的進入檔案。未宣告帳號、API 金鑰或環境變數。
安裝前請注意
分析以正規表達式與文字解析進行,而非 AST,結果可能不精確或出現誤報。工具被描述為僅做分析;採納重新命名或修正建議前應先核對結果。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Lint,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

bash
npm installnpm run build

Usage with Claude Desktop

Add to your claude_desktop_config.json:

json
{  "mcpServers": {    "lint-tools": {      "command": "node",      "args": ["path/to/mcp-lint-tools/dist/index.js"]    }  }}

Development

bash
npm installnpm run buildnpm start

License

MIT

來源:README.md,提交 6968843

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.2最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。