Litmus

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

Grade MCP servers A to F with the open behavioral litmus. npm: full toolset; hosted: lookups only.

已驗證Streamable HTTP可網頁執行開發者工具安全與監控

概覽

AI 產生的概覽

Litmus 以開放的行為測試框架為 MCP 伺服器評 A–F 等級,並讓助理查詢已公布等級、申請評級、驗證鏈上證明。

可以做什麼
  • 查詢 MCP 伺服器的已公布等級,並依等級分頁列出已評級伺服器
  • 申請評級(一次性付費)並讀取已公布等級背後的鏈上證明
  • 立即對某個伺服器執行完整 litmus 測試,把等級與證據回傳給助理
  • 以獨立的靜態掃描為 Claude Code 或 Agent Skill 評級
  • 也可作為命令列工具與 GitHub Action 使用,在等級為 D/F 時讓建置失敗
適用情境
適合在推薦或安裝某個伺服器前,讓助理先查它的已公布等級;也適合需要自行評級伺服器或技能並取得可重現證據的情況。僅做查詢時用託管端點即可,評級則需本機安裝。
執行需求
使用託管遠端端點(僅查詢)或本機 npm 套件 @polygraphso/litmus(stdio,完整工具集)。本機安裝需要 Node.js 與 npx;沙箱對外連線探測需要 Docker(沒有 Docker 會略過一項探測,等級上限為 B)。選用環境變數 NEXT_PUBLIC_POLYGRAPH_NETWORK(base 或 base-sepolia)與 POLYGRAPH_API_URL。需要連線至 polygraph.so 的網路。
安裝前請注意
評級會執行目標伺服器的程式碼,只對信任的目標評級;對外連線雖在 Docker 沙箱中,仍會執行程式碼。request_grade 涉及一次性付費並回傳付款連結。GitHub Action 的 bearer 輸入會以 Authorization 標頭送往目標,僅應用於可信且固定版本的遠端服務。等級是量測結果,不是保證。

安裝

在 SourceWeft 中

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

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.polygraphso%2Flitmus/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "litmus": {
      "type": "http",
      "url": "https://polygraph.so/api/mcp"
    }
  }
}

README

[polygraph]

litmus

The open behavioral litmus harness for MCP servers — grade A–F, reproducible.

Grade a server in one command

bash
# -p is required: the package ships three bins, so npx must be told which to runnpx -y -p @polygraphso/litmus polygraphso-litmus litmus npm/@modelcontextprotocol/server-filesystem

Point it at an npm ref, a pypi ref, a github/owner/repo ref (cloned, built, and run sandboxed — Docker required; the grade pins the commit SHA), an https:// MCP endpoint, or a local entry file. The harness connects the way an agent would, fingerprints the exact tool surface, runs the four probe categories, and prints the grade with the findings behind it — plus a deterministic evidence bundle on disk. It runs the target's code (egress is Docker-sandboxed; without Docker, C-02 is skipped and the grade caps at B), takes ~20–60s, and exits non-zero on D/F so it scripts anywhere. To dispute any published grade, re-run this same command against the same server — open and deterministic means a re-run reproduces the grade, or refutes it.

Looking up a grade someone already published takes under a second and runs nothing: the polygraph.so index, or check_server from the MCP tools below.

[litmus grading npm/@modelcontextprotocol/server-filesystem — five probe steps, then grade: A]

Use it from your agent — MCP server + plugin

For grade lookups, point any MCP client at polygraph's hosted endpoint, no install:

bash
claude mcp add --transport http polygraph https://polygraph.so/api/mcp

or the raw config:

json
{ "mcpServers": { "polygraph": { "url": "https://polygraph.so/api/mcp" } } }

This serves the lookup tools only (check_server, list_servers, request_grade); grading a server yourself (run_litmus, run_skill_litmus) executes its code, so it needs the local stdio install below.

The package also ships a stdio MCP server (polygraphso-litmus-mcp) with the full toolset, for any MCP-capable client:

  • check_server — read a server's published grade in under a second (no execution); the pre-flight check before recommending or installing a server.
  • list_servers — servers with a published grade, A first; paged (default 25 per call, with grade/limit/offset filters and a full-corpus summary).
  • request_grade — record a grade request with polygraph.so ($1 one-time fee; graded within 48h of payment — the response carries the payment link).
  • run_litmus — grade a server now: the full harness, grade + evidence returned to the agent.
  • run_skill_litmus — grade a Claude Code / Agent Skill (static scan, A/B/D/F).
  • verify_attestation — read the onchain proof behind a published grade (EAS on Base).

In Claude Code, the plugin wires the server plus two commands in one step:

/plugin marketplace add polygraphso/litmus/plugin install polygraph@polygraphso

then /polygraph:grade <server> and /polygraph:check <server>. Cursor and manual JSON setups are on polygraph.so; full tool docs in packages/litmus/README.md.

Gate your CI on MCP grades — GitHub Action

Fail a build when an MCP server or an Agent Skill it ships grades D/F under the open behavioral litmus. For servers it is hybrid — a fast lookup of the published grade, then the harness when ungraded; for skills it is a fast static scan. Un-gradeable targets warn unless strict.

It's on the GitHub Marketplace as polygraphso/litmus@v1. For a security gate, pin to a commit SHA rather than the mutable @v1 tag:

yaml
# .github/workflows/mcp-gate.ymlname: mcp-gateon: [pull_request]            # NOT pull_request_target — that exposes secrets to fork PRspermissions:  contents: readjobs:  gate:    runs-on: ubuntu-latest    steps:      - uses: actions/checkout@v5      - uses: polygraphso/litmus@<commit-sha>   # pin to a SHA; resolve from the v1 release        with:          # Name the targets explicitly (recommended). Grading runs a server's code,          # so on a public repo prefer an allowlist over discovering PR-controlled config:          servers: |            npm/@modelcontextprotocol/server-filesystem          skills: |            ./my-skill          # discover: "true"  # opt in to auto-discovery (.mcp.json/.vscode/.cursor) — trusted repos only          # min-grade: B      # stricter than the default D/F gate          # strict: "true"    # also fail on targets that cannot be graded

Inputs: servers · skills · discover (default false) · min-grade · strict · working-directory · version · bearer. Outputs: result · failed · report.

Security. Grading a server runs its code (egress is Docker-sandboxed, but it still executes). Trigger on pull_request, never pull_request_target. Keep discover off on public repos and name targets explicitly — auto-discovered config is pull-request-controllable. bearer is sent as an Authorization header to the target, so pass it only for an explicitly trusted, pinned remote — never with discovery or on untrusted PRs, and keep it scoped and short-lived.

Not on GitHub? The gate is a plain command — npx @polygraphso/[email protected] ci (pin the version) — so it runs in any CI or as a pre-commit hook. A grade is a measurement, not a guarantee: re-run the open harness to reproduce any result.

What litmus is

This is the source for @polygraphso/litmus, the open behavioral litmus harness for MCP servers from polygraph.so.

The harness connects to an MCP server the way an agent would, fingerprints its exact tool surface, and runs four probe categories — C-01 tool-output injection (static, dynamic, and second-order — one tool's output weaponized as another's input), C-02 permission/egress (in a hardened default-deny Docker sandbox, matched host and port), C-03 sensitive-data handling (planted canaries), C-04 adversarial-input handling (malformed/oversized and jailbreak inputs) — then grades the server A–F. A passing grade is a measurement, not a guarantee; the methodology and its disclosed limits are at polygraph.so (the open source here is the ground truth).

Alongside the grade, an npm target's dependency tree is checked against the osv.dev vulnerability database and any vulnerable dependencies are reported as dependency advisories. This is a separate, point-in-time signal — it is advisory only: it never affects the A–F grade and is not part of the reproducible evidence (vulnerability data changes over time, so folding it into the grade would break re-run reproducibility). It applies to npm targets only; other target kinds report it as skipped. Resolution runs npm install --package-lock-only --ignore-scripts, which resolves the tree without downloading tarballs or running any package code. Opt out with --no-deps-audit (or LITMUS_DEPS_AUDIT=0).

The same package also grades Claude Code / Agent Skills (a SKILL.md + bundle) under a separate static litmus (litmus-skill-v3): a deterministic byte-scan — S-01 prompt injection, S-03 data-exfiltration instructions, S-04 dangerous commands in the SKILL.md body or bundled scripts (incl. base64-obfuscated curl | bash) — graded A/B/D/F and anchored by a whole-directory content hash, plus a separate advisory quality signal. It is static (no execution): an A is static-clean, not behavioral proof. See packages/litmus/README.md.

The hosted, operator-run grading service is not in this repo — it lives in a separate private repo and consumes this package from npm like any other client.

Layout

This is a pnpm monorepo. Only @polygraphso/litmus is published; the @polygraph/* packages are private building blocks that tsup bundles into it.

packages/  litmus/          # @polygraphso/litmus — the only published package (lib + 3 bins: CLI, skill CLI, MCP)  core/            # contract types, canonical JSON, identity helpers  probes/          # the harness: connect, fingerprint, grade, probe runners, sandbox  onchain/         # EAS attestation read + encode/decode (Base) — read-only, no minting  agent/           # agent-gate decision logic + live-fingerprint recheck  mcp/             # MCP server wrapper  cli/             # CLI commands + target/auth resolution  demo-*-mcp/      # demo MCP servers used as test fixtures

See packages/litmus/README.md for the npm-facing usage docs, and polygraph.so for the methodology and proof format.

Develop

bash
pnpm installpnpm -r typecheckpnpm -r testpnpm --filter @polygraphso/litmus build   # → packages/litmus/dist

Release

@polygraphso/litmus is versioned in packages/litmus/package.json. Tag to publish:

bash
git tag litmus-v<x.y.z> && git push origin litmus-v<x.y.z>

The Publish @polygraphso/litmus workflow builds, typechecks, tests, and publishes with npm provenance. See CONTRIBUTING.md for the full process and the local-development workflow for downstream consumers.

License

Apache-2.0 — © polygraph.so.

來源:README.md,提交 8e9f9d5

工具

0
SourceWeft 尚未讀取此伺服器的工具。

版本歷史

1
  1. v0.36.0最新Sep 16, 2026

評分

已滿足適用檢查項的 85%

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

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分

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

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