Mcpaudit

io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.1.2更新於 Nov 2, 2026

Audit any MCP server: handshake, schemas, descriptions, error handling, scored.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

稽核 MCP 伺服器:以 stdio 啟動目標伺服器,檢查握手、工具 schema、描述與錯誤處理,並產出評分報告。

可以做什麼
  • 依指令與參數啟動並稽核單一 MCP 伺服器,檢查握手、協定版本、伺服器資訊、工具名稱、描述、輸入 schema、參數說明與錯誤處理
  • 稽核 MCP 用戶端設定檔中的所有伺服器,或指定的單一條目,每個伺服器各產出一份評分報告
  • 離線驗證 tools/list 陣列,無須啟動伺服器,檢查名稱、描述、schema 結構、required 與 properties 一致性以及重複命名
  • 輸出 0-100 分及 PASS、WARN、FAIL、UNREACHABLE 結論,並列出有憑據的具體問題
適用情境
適合在挑選、發佈或維護 MCP 伺服器時,先做一次確定且可重複的品質檢查,再決定是否讓代理依賴它。也適合接入 CI,因為結束碼可區分通過、失敗與用法錯誤。
執行需求
透過 npx 或 Docker 映像在本機以 stdio 執行,未宣告帳號、API 金鑰或環境變數。被稽核的伺服器必須是可本機啟動的 stdio 指令;遠端 HTTP 伺服器只會被標示為無法連線而不予稽核。使用 npx、拉取映像以及啟動目標伺服器都需要網路。
安裝前請注意
稽核會在你的機器上實際啟動目標伺服器行程,該伺服器程式碼將以你的權限執行,並可能使用其設定的環境變數。它也會刻意發出一次錯誤的工具呼叫以測試錯誤處理。僅涵蓋 stdio 伺服器,遠端 HTTP 條目不會被稽核。

安裝

在 SourceWeft 中

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

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mcpaudit

Point it at any MCP server. Get a score, and the receipts.

The MCP Registry is filling up with servers nobody has ever audited. A server can list tools with no descriptions (so models never call them correctly), schemas that contradict themselves (required fields that don't exist), or — the dangerous one — cheerfully return success when you call a tool that doesn't exist. None of that shows up until a user's agent does something weird in production.

mcpaudit launches the server the way a real client does, runs the full handshake, inspects every tool, deliberately makes a bad call, and prints one scored report with named, evidence-backed issues. No LLM anywhere in the audit: every check is deterministic and repeatable.

What it checks

checkwhat it proves
handshakeThe server completes initialize — and how long it took
protocol versionThe negotiated version is present and one this build knows
server infoserverInfo.name and serverInfo.version are present
tool namesPresent, unique, and inside the MCP character/length guidance
descriptionsEvery tool described, in more than a token gesture, not just its own name repeated
input schemasPresent, an object schema, valid properties, required fields that actually exist
parameter docsTools whose parameters are all undescribed get flagged — models guess semantics from descriptions
error handlingA call to a nonexistent tool returns a proper error, fast, without killing the server
prompts / resourcesA server with no tools is not failed for it: when it advertises prompts/resources, mcpaudit lists them and audits it as what it is

Scoring: start at 100, each error costs 8, each warning costs 3. Verdicts: PASS (clean), WARN (works, but the issues will cost it users or correctness), FAIL (error-severity issues), UNREACHABLE (the handshake never completed — reported with the launch error, never a guessed score).

mcpaudit audits stdio servers. Remote (HTTP) servers — config entries with a url, or a URL passed as the command — are reported as UNREACHABLE with that explanation, never silently skipped and never spawned.

New in 0.1.1, from the first real-production validation battery (25+ external servers, three runs each, findings hand-checked against raw ground truth): server arguments starting with -- pass through verbatim (see Usage), prompt/resource-only servers pass, the default per-step timeout is 60s so npx/uvx cold starts are not mistaken for dead servers, and --json always emits one parseable document.

Usage

CLI

bash
# Audit a server by its launch commandnpx @reneturcios/mcpaudit audit npx -y @reneturcios/shipcheck mcpnpx @reneturcios/mcpaudit audit node dist/cli.js mcp
# Audit every server in an MCP client config (or one named entry)npx @reneturcios/mcpaudit audit --config ~/.claude/claude_desktop_config.jsonnpx @reneturcios/mcpaudit audit --config ./mcp.json --server greenlight
# Server arguments that start with -- pass through untouchednpx @reneturcios/mcpaudit audit uvx mcp-server-git --repository /path/to/repo
# Use a literal -- to force everything after it into the server command# (even flags that share a name with mcpaudit's own, like --timeout)npx @reneturcios/mcpaudit audit node server.js -- --timeout 5000
# Quoted command line, machine-readable output, custom timeoutnpx @reneturcios/mcpaudit audit --cmdline "npx -y @scope/pkg mcp" --json --timeout 30000
# Offline: validate a tools/list dump without launching anythingnpx @reneturcios/mcpaudit tools tools.json

Example output:

mcpaudit npx -y @reneturcios/shipcheck mcp: PASS (score 100/100, grade A)  server: shipcheck 0.1.0 · protocol 2025-11-25 · 3 tool(s) · initialize 1813ms · tools/list 16ms  error handling: bad tool call returned a proper error  No issues found.PASS: handshake, schemas, and error handling all check out.

(That is a real run, from the first MCP Server Index seed, 2026-10-22. Initialize time is measured from spawn and includes npx cold-start overhead, and the report says so. A slow initialize is only scored when the server itself is slow once running: if tools/list answers within 5s, a 30s+ initialize is reported as unscored launch path evidence, because that time went to the launcher or to first-run downloads.)

Exit codes: 0 for PASS/WARN, 1 for FAIL/UNREACHABLE, 2 for usage errors — CI-ready.

MCP server

Add to your MCP client config:

json
{  "mcpServers": {    "mcpaudit": {      "command": "npx",      "args": ["-y", "@reneturcios/mcpaudit", "mcp"]    }  }}

Tools:

  • audit_server: launch and audit one server from a command + args (+ optional env, timeout).
  • audit_config: audit every server in a config file, or one named entry.
  • audit_tools: offline validation of a tools/list array.

Docker

bash
docker run -i ghcr.io/cloudcorprecords/mcpaudit mcpdocker run --rm ghcr.io/cloudcorprecords/mcpaudit audit node server.js mcp

The MCP Server Index

mcpaudit is the engine behind a growing public dataset, the MCP Server Index: scored audits of real, published MCP servers, run with the published binary and refreshed as servers ship. The seed — the author's own tool family, audited first because you audit yourself before you audit anyone else — lives in the 100-packages workspace and grows with every wave.

The toolkit

mcpaudit is Wave 1, package 4 of a planned family of small, single-purpose developer tools by the same author, all built the same way: one bin that serves a CLI and an MCP server, deterministic checks with evidence, no invented answers.

  • greenlight: pre-flight checks for open-source contributions: is this issue actually landable?
  • shipcheck: release verification — git tag, GitHub release, npm, MCP Registry, and GHCR must all agree, or NO-GO.
  • cidiff: base-vs-head CI differ for PRs.
  • reprocheck: red-first repro verifier.
  • prwatch: attention report for your open PRs.
  • claimcheck: stale-claim states and parked fixes on forks.
  • gatefile: extract hidden contribution gates into machine-readable contribution-gates.json.
  • pkgverdict: pre-install verdicts for npm packages: GO, RISKY, FAKE, or MISSING.

Development

bash
npm installnpm run buildnpm test   # validator/scoring unit tests + live probes against fixture servers

License

MIT

來源:README.md,提交 bdb9c23

工具

3

audit_server

Audit an MCP server by launching it over stdio: initialize handshake, protocol version, server info, tools/list quality (names, descriptions, inputSchema validity, undescribed parameters), response times, and error handling on a deliberately bad tool call. Returns a scored report (0-100) with named, evidence-backed issues.

輸入參數envargscommand必填timeoutMs

audit_config

Audit every server in an MCP client config file (Claude/Cursor style: {"mcpServers": {name: {command, args}}}) or a single named entry. Each server is launched and audited like audit_server. Returns one scored report per server.

輸入參數path必填servertimeoutMs

audit_tools

Offline audit of a tools/list array (no server launched): validates tool names, descriptions, inputSchema shape, required-vs-properties consistency, and duplicate names. Returns a scored report.

輸入參數labeltools必填

版本歷史

3
  1. v0.1.2最新Oct 26, 2026
  2. v0.1.1Oct 23, 2026
  3. v0.1.0Oct 23, 2026

評分

已滿足適用檢查項的 90%

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

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分