
mcp-lint
io.github.robert19001-cmyk由 GitHub 帳號 robert19001-cmyk 發布v1.0.4更新於 Nov 7, 2026
Lint MCP tool schemas for eight clients and score recovery.
概覽
為八種 AI 用戶端檢查 MCP 工具 schema,評估代理出錯後的復原能力,並可用原則檔攔截高風險工具操作。
- 可以做什麼
- 從檔案或執行中的 stdio、SSE、HTTP 伺服器讀取工具 schema 並檢查,支援嚴重程度篩選、品質評分與自動修復安全項目。
- 顯示 Claude、Cursor、Gemini、VS Code Copilot、Windsurf、Cline、OpenAI Agents SDK 與 Continue.dev 的逐用戶端相容性矩陣。
- 解釋單一規則、比對兩個 schema 版本、為線上工具清單建立快照,並輸出 JSON、Markdown、SARIF 或 HTML 稽核報告。
- 檢查本機已設定的 Cursor、Claude、VS Code 伺服器,並檢查線上伺服器的資源與提示。
- 評估工具失敗訊息能否告訴代理下一步該呼叫哪個工具,並依 YAML 原則判定操作是放行、改寫、需人工核准還是拒絕。
- 適用情境
- 適合在開發或維護 MCP 伺服器時使用,讓 schema 在多个用戶端上都能正常運作,或在 CI 中讓新增的 schema 錯誤導致建置失敗。也適合稽核本機已設定的 MCP 伺服器,以及檢驗錯誤訊息是否便於代理復原。
- 執行需求
- 需要 Node.js 與 npm 或 npx;套件名稱為 mcp-lint,MCP 伺服器進入點為 mcp-lint-server。未宣告任何帳號、API 金鑰或環境變數。檢查線上伺服器需要目標伺服器指令或 URL,遠端傳輸需要 URL。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 mcp-lint,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
mcp-lint
[npm version] [npm downloads] [License: MIT] [Node.js ≥20] [MCP server ready] [robert19001-cmyk/mcp-lint MCP server]
Lint MCP server tool schemas, then check whether an agent can recover when a tool fails.
Proof page, with a live bench: mcp-lint-alpha.vercel.app
MCP servers expose tool schemas consumed by Claude, Cursor, Gemini, VS Code Copilot, Windsurf, Cline, OpenAI Agents SDK, and Continue.dev. Each client has different JSON Schema support and quirks — a schema that works in Claude may silently break in Cursor or OpenAI. mcp-lint catches these issues before your users do.
This repository is 1.0.4. Install it with npx [email protected]. npm 1.0.3 is the previous registry release. npm 1.0.1 and npm 1.0.2 were not published. Design notes: PRODUCT.md, ROADMAP.md, ARCHITECTURE.md, SECURITY.md, RELEASE.md. Those files describe the current code. They are not extra commands.
Installation
Quick Start
mcp-lint compat — Compatibility Matrix
See exactly which tools work with which clients:
mcp-lint explain — Rule Documentation
CLI Reference
mcp-lint check [input]
Exit codes:
mcp-lint report <file>
Writes the versioned audit report for one tools file. check --format json still prints the diagnostic array. report --format json prints MCPAuditReport.
Formats are terminal, json, markdown, sarif, and html. The HTML file has inline CSS and no script. Token totals are a local chars / 4 estimate. The compatibility section is filled from that same lint. A cell is measured or not_observed. An empty tool list leaves the section not run. Recovery, preflight, and live inspection stay marked as not run. When the run has no schema errors, the report says: "No schema errors in this run. Recovery, preflight, and live inspection were not measured."
--baseline exits 1 when the stable snapshot differs. The snapshot pins generatedAt and keeps tool.version. Pass either --baseline or --update-baseline, not both. Exit 1 when the report contains an error, or when the file cannot be read.
mcp-lint catalog
Lists resources and prompts from one live server, then lints that list. It does not read installed configs and it does not call a tool. An empty or repeated URI, an empty resource name, an empty or repeated prompt name, and an empty or repeated argument name are errors and exit 1. A repeated resource display name, and a missing description, are warnings and do not. explain prints the rule. The fix class is manual: the command does not rewrite the server.
--server is stdio, sse, or http. Remote transports need --url. --timeout, --max-items, and --max-bytes bound each list. A method the server does not implement is unsupported and exits 0. Any other list failure exits 1. A lint error also exits 1. Usage errors exit 2. --format is terminal or json. JSON adds a findings array to the list. The array is empty when the list is clean.
mcp-lint diff <before> <after>
Compare lint results between two versions of your schema — useful in CI to catch regressions.
Exit codes: 0 = no new errors introduced, 1 = new errors found, 2 = error
mcp-lint check --installed
Reads the MCP configs already on this machine and lints each local stdio server. Nothing is uploaded. Remote URLs are skipped unless you pass --remote.
Looked-up files:
--strict also exits 1 when a configured server fails to start. Without it, a start failure is printed and the exit code follows the schema errors. If two started servers expose the same tool name, both reports include tool-name/server-collision.
mcp-lint snapshot
Writes the live tools/list as a stable JSON file. Commit that file and compare it with diff when the server changes. diff exits 1 when the new file introduces an error the old file did not have.
mcp-lint fix [input]
Writes fixes marked safe. review and manual fixes are printed by --dry-run and left in the file. mcp-lint does not invent titles, descriptions, or hints.
mcp-lint init
Creates a default .mcplintrc.json in the current directory.
Rules
Universal (all clients)
Tool names
OpenAI and Azure use that pattern. A space, slash, or dot makes the tool disappear. See examples/names/unsafe.json.
Claude-specific
Cursor-specific
Gemini-specific
VS Code Copilot-specific
Windsurf-specific
Cline-specific
OpenAI Agents SDK-specific
Continue.dev-specific
Configuration
mcp-lint auto-discovers .mcplintrc.json starting from the current directory up to your home folder. Override with --config.
Presets
Use "extends" to start from a built-in preset:
Rule severities: "error" | "warning" | "info" | "off"
CI/CD — GitHub Actions
Using the official Action
Action inputs:
The action in this repository writes a ::error, ::warning, or ::notice annotation from check --format json. With an empty input it also looks one directory down, skipping node_modules and dot directories. sarif: true uploads SARIF when the installed CLI has report. Tag v1.0.4 installs mcp-lint@1 unless version is set. Tag v1.0.3, tag v1.0.2, and tag v1.0.1 do the same. Tag v1.0.0 still installs npm latest. The workflow needs security-events: write.
Manual workflow
Plugin API
Share and reuse rule sets via npm packages.
Using a plugin
Writing a plugin
A plugin is an npm package that exports a rules array of Rule objects:
Programmatic API
mcp-lint preflight — Runtime Decision Firewall
Lint catches bad schemas. Preflight catches bad actions.
At runtime, your agent is about to call a tool — delete a file, send a request, charge a card. Preflight sits between the agent and the action and answers:
- Is it allowed?
- How risky is it? (0.0–1.0 deterministic score)
- Is it reversible?
- Does it need human approval?
- Is there a safer alternative?
Action format
Policy file (YAML)
Sample policies in examples/policies/: default.yml, strict.yml, permissive-dev.yml.
SDK — embed in your MCP server or agent runtime
Exit codes
Use them directly in shell wrappers or CI gates.
mcp-lint recover — Can the agent get back up?
Schema lint does not say what happens when a tool fails. recover reads the error text and checks four things an agent limited to MCP tools needs:
- A credential or permission error names a tool on this server, such as
login. - A rate limit or timeout names the call to repeat. "Wait and retry" is not enough.
- The next step is not a terminal command, a config edit, or a web page.
- The failure is not silent, and a hang is cut off at 15 seconds.
rate_limit and timeout count as transient. Every other kind counts as permanent. Exit 1 when any sample has an error. Exit 0 when every scored failure is recoverable.
A live probe lists tools and does not call them. Calling tools requires both --sandbox and --invoke. Tools with no required arguments are still skipped, so an empty call cannot fire a tool that declares no inputs.
File shape:
kind is credential, permission, rate_limit, explicit, silent, timeout, or malformed.
MCP Server
mcp-lint also ships as a stdio MCP server for Claude Desktop, Claude Code, Cursor, VS Code, and registry scanners such as Glama.
Client config:
Available MCP tools:
All server tools are read-only from the host perspective: they return diagnostics, fixed JSON, or policy decisions and never execute the action being evaluated.
Docker
The repository includes glama.json and a production Dockerfile so MCP directories can build, start, and introspect the server.
Site
The proof page is in site/. Version 1.0.4. It runs the same recovery scorer, schema linter, and preflight function as the CLI. The check bench uses the same error index, title collapse, and next step as the terminal. catalog lints the resources and prompts it listed.
The public page is https://mcp-lint-alpha.vercel.app/. The same page runs locally:
Open http://127.0.0.1:4731. The built page is not part of the npm package.
License
MIT © Robert
來源:README.md,提交 a0535d5
工具
0版本歷史
5- v1.0.4最新Nov 7, 2026
- v1.0.0Nov 1, 2026
- v0.8.0Oct 31, 2026
- v0.7.0Oct 29, 2026
- v0.5.3Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分