Assay MCP Server

io.github.Rul1an由 GitHub 帳號 Rul1an 發布v7.0.1更新於 Nov 22, 2026

Policy-enforcing MCP proxy with portable evidence output.

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

概覽

AI 產生的概覽

一個執行政策的 MCP 代理,在轉送前對每個 tools/call 請求做出允許或拒絕決定,並產生可離線驗證的證據包。

可以做什麼
  • 攔截工具呼叫:在轉送前對經過代理的 tools/call 請求做出允許或拒絕決定,並附上理由
  • 記錄決策:記錄工具呼叫決策,並轉換成驗證器可接受的 incident package
  • 產生證據:匯出防竄改、可離線驗證的證據包,並可選擇以證明(attestation)形式簽署
  • 界定聲明:編譯 Trust Basis,將聲明歸類為已驗證、自述、推論或缺失,並產生便於審閱的 Trust Card
  • 接入 CI:透過 GitHub Action 輸出 SARIF 並在拉取請求上執行政策閘門
  • 沙箱控制:在支援的 Linux 主機上提供可選的核心層觀測與網路、檔案系統強制限制
適用情境
當你已有 MCP 工具呼叫、評測輸出或清單產物,並希望在 CI 中得到一個小而可審閱的稽核產物,而不是託管儀表板時使用。適合需要有限度地證明特權工具呼叫做了什麼決定、以及哪些仍未被證明的團隊。
執行需求
以本機 stdio 程序在使用者機器上執行(僅桌面端)。可透過 Linux 與 macOS 的發行安裝腳本、已發行的 CLI 壓縮檔或 Rust 原始碼建置安裝;MCP 伺服器壓縮檔涵蓋 Linux x86_64/arm64。核心流程不需託管後端或 API 金鑰。可選的 eBPF/LSM 與 Landlock 功能需要支援的 Linux 主機。
安裝前請注意
代理位於工具呼叫邊界,可拒絕或轉送特權操作,政策設定錯誤會阻擋或放行實際工作。證據範圍明確有限:允許不等於操作已發生,證據包也不代表完整擷取。安裝腳本為遠端 shell 腳本;校驗和只證明與已發行檔案位元組一致,不證明生產者身分。部分核心層控制有已記錄的降級行為。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

Assay

The open, recomputable evidence profile for privileged MCP tool actions.
Assay records what a privileged tool call decided, what was observed, and what stays unproven, so a reviewer can replay the claim offline instead of trusting the agent's account of itself. In enforcement mode, the proxy gate for routed MCP tools/call requests is deterministic and fail-closed, and the enforcing proxy is the reference producer rather than the contract itself. Optional eBPF/LSM instrumentation on supported Linux hosts adds kernel-level observations. CI-native, no backend, bounded by design.

[Crates.io] [CI] [License]

Quickstart · How it works · See it work · MCP example · OWASP MCP Top 10 · Discussions


Agents got real tool access through MCP — and tool poisoning, rug pulls, and confused-deputy OAuth came with it. Assay sits at the tool-call boundary and does three things, in order.

One golden path: the release-pinned agent journey records the nine driven CLI/MCP steps and their exit/stdout contracts. Its protected-action fixture lives in examples/privileged-action-gate/.

Enforce, prove, stay honest

  • Enforce. In enforcement mode, the gate decides tools/call requests routed through it before forwarding, with the precise reason for each allow or deny. Separate controls on supported Linux hosts include cgroup eBPF IPv4/TCP connect filtering (whose hook error path allows connections) and Landlock TCP-connect port allowlisting. assay sandbox --enforce refuses an unavailable backend or conflicting filesystem policy unless --allow-audit-fallback is explicit. --enforce-net requires --enforce; active Landlock network enforcement rejects policies it cannot express as TCP-port allowlists, even with audit fallback enabled.
  • Prove. Configured producers can record decisions and bounded observations for export into offline-verifiable, tamper-evident evidence bundles. The privileged-action flow carries the verdict, pre-call establish journey, and declared-vs-observed conformance for CI review without a hosted backend. assay mcp wrap --decision-log records tool-call decisions; assay evidence prepare-incident-package turns that log into an incident package verify-incident-package accepts, with the surface grades the verifier derives. The package is not a count of all calls, not completeness of capture, not proof of what the server did, and an allow is not proof a human accepted.
  • Stay honest. Trust Basis classifies supported claims as verified, self_reported, inferred, or absent; its gates check the declared claim boundaries. A tool returning "success" is the provider's assertion, never proof. Assay ships no single safety score; read each artifact’s source, coverage and non-claims before relying on it.

Quickstart

Install the CLI on Linux or macOS:

bash
curl -fsSL https://getassay.dev/install.sh | shassay --version

If you prefer to build from source, run cargo install assay-cli --version 7.0.1 --locked. For installation diagnostics, run assay doctor.

From an empty directory, run a local demo:

bash
assay demo

The demo creates rules in assay-demo/assay.yaml and a sample trace in assay-demo/traces.jsonl. To try it with your coding agent, ask:

Change the Calculate operation in the demo trace from add to multiply. Run the command below and explain which rule caught the change.

bash
assay validate --config assay-demo/assay.yaml --trace-file assay-demo/traces.jsonl

The original trace passes. After the edit, validation exits with code 1 because the rule allows only add and subtract.

To see a tool call go through the MCP gate, open a source checkout or an extracted CLI archive and run:

bash
python3 examples/mcp-quickstart/run.py

For v7.0.1, run the last command from a source checkout or an extracted published CLI archive. The installer is binary-only and does not carry the bounded quickstart assets. The live getassay.dev installer verifies the selected archive against its published SHA-256 sidecar before extraction. Set ASSAY_REQUIRE_PROVENANCE=1 to additionally require GitHub artifact provenance; the default reports provenance_not_requested and strict success reports provenance_verified. A checksum proves byte equality with the published sidecar, not producer identity. Provenance identifies the source and build, not runtime safety or semantic correctness.

Captured runner output (the bundled local mock performs no external action):

text
assay quickstart: PASSmcp_requests=initialize,tools/list,tools/calldecision=allow tool=read_filedecision_artifact=.assay/quickstart/decisions.ndjsonnon_claim=forwarded_to_local_mock_only

[Assay decides each MCP tool call before it runs, fail-closed, with the reason]

Released surfaces:

  • Static project manifests are shipped for Claude Code and Cursor; Codex uses the equivalent TOML entry documented in the editor MCP recipe. Manifest presence is not host-discovery proof. assay mcp config-path supports Claude Desktop and Cursor only.
  • Published v7.0.1 CLI archives cover Linux x86_64/arm64, macOS x86_64/arm64, and Windows x86_64. The Python wheels cover CPython 3.12, 3.13, and 3.14 on macOS x86_64/arm64 and Linux x86_64; other interpreters and platforms are not claimed.
  • Published assay-mcp-server archives cover Linux x86_64/arm64. MCPB and server.json package descriptors are also published; their presence is not host-discovery proof.
  • CI: GitHub Action. Core flows need no hosted backend or API key. New to the threat model? The OWASP MCP Top 10 mapping states, per risk, what Assay covers and deliberately does not.

What ships

OutputWhat it is
Policy gateassay mcp wrap — deterministic allow/deny before tools run, with the reason.
Evidence bundleOffline-verifiable, tamper-evident archive for audit and replay.
Trust Basis / Trust CardCanonical trust-basis.json (bounded claim classification) plus review-friendly trustcard.{json,md,html}.
External receiptsEval outcomes, runtime decisions, and model inventory as bounded receipts with JSON Schema contracts.
Tool-decision logsFor handled known-tool calls, the assay-mcp-server stdio server emits an info-level tool_decision event when enabled by its log filter; decision contains a JSON-encoded observed decision entry with projected target fields.
SARIF / CIGitHub Action, Security-tab integration, policy gates on PRs.
AttestationSign an evidence bundle as a DSSE-wrapped in-toto v1 Statement with the evidence-bundle/v1 predicate.
text
  Agent ──► Assay ──► MCP Server              ├─ ✅ ALLOW / ❌ DENY  (policy, with reason)              ├─► 📋 Evidence bundle (offline-verifiable)              └─► 📊 Trust Basis → Trust Card → SARIF / CI

Current release: v7.0.1. CHANGELOG.md and release notes remain the authority for released behavior; merged changes after the tag are Unreleased, and crates.io publication is separate from merge state. Launch definition and support commitment: docs/LAUNCH.md.

Is this for me?

Yes if you already have eval output, runtime decisions, inventory artifacts, or MCP tool-call tests, and you want a small reviewable CI artifact instead of a dashboard — bounded auditability, not a scalar trust badge.

Not yet if you need Assay to judge model correctness for you, want a hosted dashboard as the product, or want a compliance claim rather than a bounded evidence boundary. Assay is not a trust-score engine, a generic eval dashboard, or a hosted observability product — see what it is and is not.

See it work

An agent tries a privileged action — github.add_deploy_key — through the enforcing proxy, decided per call before it forwards, offline against a local mock (no real credentials):

bash
cd examples/privileged-action-gate && ./run.sh

[privileged-action PR-gate demo]

A deny is fail-closed caution, not a verdict on intent; an allow is the decision to forward, never proof the action happened. Declared-vs-observed conformance is recorded beside the verdict, never as a gate. Full walkthrough: privileged-action-gate.

Pick your path

You haveWhat you getStart here
Promptfoo JSONL from CI evalsEval outcome receipts + verified bundle + Trust Basis diffPromptfoo JSONL
OpenFeature EvaluationDetailsDecision receipt + verified bundleOpenFeature
CycloneDX ML-BOM model componentInventory receipt + verified bundleCycloneDX ML-BOM
MCP tool callsAllow/deny audit trail + observed-behavior evidenceMCP Quick Start
A GitHub PR gateTrust Basis diff, gate status, SARIF/JUnit-ready outputCI Guide
A Runner archive / coverage annotationCoverage descriptors + claim-class cells + a claimed-vs-observed checkCoverage-honesty walkthrough

The workflow stays small: import or record a bounded outcome, bundle and verify it, compile trust-basis.json, gate the Trust Basis diff. Assay doesn't make the upstream tool the source of truth; it makes the evidence boundary inspectable. For privileged tool actions, the MCP proxy records each tools/call as a structured tool-decision surface — keeping the asserted-versus-verified line honest.

Policy is simple

yaml
version: "2.0"name: "my-policy"tools:  allow: ["read_file", "list_dir"]  deny: ["exec", "shell", "write_file"]schemas:  read_file:    type: object    properties:      path: { type: string, pattern: "^/app/.*" }    required: ["path"]

assay init --from-trace trace.jsonl generates the runtime-observation policy used by the trace-generation flow (files, network, and processes); it is not an MCP authorization policy. Migrate a legacy MCP constraints: policy with assay policy migrate. See Policy Files.

Why Assay

Canonical evidenceAssay's evidence model is the stable contract; OpenTelemetry and protocol adapters (ACP / A2A projection profile / UCP) map into it.
DeterministicThe policy gate uses explicit rules; its decision depends on the request, policy and applicable session state. This does not make live evaluators or external effects deterministic.
Bounded claimsExplicit about verified vs visible vs absent — no score-first UX.
Offline-firstNo backend required for core enforcement and bundle verification.
Checkable provenanceWhich piece of the source-class and coverage model shipped when, as commits you can git log rather than claims you have to take — provenance, prior art credited first.

Learn more

Evidence epistemology, latency, and the internal Runner

Trust claims use explicit epistemology, not a single safety score: verified (direct evidence or offline verification), self_reported (emitted without independent corroboration), inferred (bounded, documented rules), absent (no trustworthy evidence). Assay ships no aggregate trust score or safe/unsafe badge as the main output — see ADR-033.

The historical fragmented-IPI experiment results, dated 2026-03-02 and naming commit 289a43ecc144, report 0.771ms p50 / 1.913ms p95 for the deterministic set. The harness times complete local mock tools/call round trips, including JSON-RPC transport and the tool response. These reported timings do not isolate policy-decision overhead or establish current-release or end-to-end model performance.

Assay-Runner is an internal/experimental measured-run subsystem behind the delegated Linux/eBPF acceptance path. Its crates are included in the workspace publication process so dependent packages can resolve them; publication does not make Runner a standalone product or give its APIs a separate stability commitment.

Ecosystem

Related projects for evidence generation, verification, and reviewability; each has its own interface and scope:

  • assay-action — GitHub Action: verify bundles, PR summaries, SARIF (Marketplace).
  • Assay-Harness — recipe, gate, and report layer over canonical evidence artifacts.
  • observed-effect-v0 — worked examples of the bounded observed-effect evidence record and its neutral carriers (in-toto, SCITT, MCP evidenceRef).
  • gateway-evidence-replay — deterministic offline replay verifier for gateway-path evidence bundles.
  • RGE-Bench — a conformance kit for evidence reviewability, maintained separately under its own machine-checked neutrality guard. Reproduction there is digest-scoped and does not carry forward: the v1 71-vector digest sha256:e769822bc6c9e31085da7b1a17b163b9747fe0d04314fbb8685d4e612087c7cb and the historical v2 digest sha256:ba0e3795d75c788fa48313ab462493f22d78759851d1b3275d8117051bb22fd0 (95 vectors) each carry one reported independent implementation by a second author on a different stack. JM-Lab reported the v2 95/95 reproduction on 2026-08-24, from the contract text and author-supplied inputs without reading expected. Neither reproduction transfers to the current 104-vector v3 candidate digest sha256:93f8ae9654eb5a16dee28d882087669cae5183e02e116ba1e8071a30594cfb6a, which the record lists as unreproduced. See its REPRODUCTIONS.md.

Open profile: privileged-mcp-action/v0

privileged-mcp-action/v0 is a composition and verification contract over evidence records that already exist: what a privileged MCP tool call decided, what was observed of its effect, and what stays unproven. It adds no new envelope and no aggregate verdict.

It ships with a 14-vector conformance corpus (5 accept, 9 reject) whose digest is a candidate: it is not called reproduced until a non-author implementation derives the expected outcomes from the specification text alone.

That reproduction is open, and the invitation is real: #1840. Any language, any stack. The invitation names the exact commit the current digest describes. The clean-room protocol provides an opaque, attested inputs pack, a one-command scoring action, and an implementation-report template without supplying verifier logic or expected outcomes. The corpus README states the authorship boundary and the claim ceiling.

Contributing

bash
cargo test --workspacecargo clippy --workspace --all-targets -- -D warnings

See CONTRIBUTING.md and GitHub Discussions.

License

MIT

來源:README.md,提交 e6fdba3

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:該軟體包類型無法在沙箱中執行。

版本歷史

34
  1. v7.0.1最新Nov 22, 2026
  2. v7.0.0Nov 21, 2026
  3. v6.28.0Nov 21, 2026
  4. v6.27.0Nov 14, 2026
  5. v6.26.0Nov 13, 2026
  6. v6.25.0Nov 13, 2026
  7. v6.24.0Nov 11, 2026
  8. v6.22.3Nov 7, 2026
  9. v6.22.1Nov 5, 2026
  10. v6.22.0Nov 4, 2026
  11. v6.21.0Nov 3, 2026
  12. v6.19.1Nov 1, 2026
  13. v6.19.0Nov 1, 2026
  14. v6.18.1Oct 31, 2026
  15. v6.18.0Oct 31, 2026
  16. v6.17.0Oct 26, 2026
  17. v6.16.0Oct 23, 2026
  18. v6.15.0Oct 21, 2026
  19. v6.14.1Oct 18, 2026
  20. v6.14.0Oct 17, 2026
  21. v6.13.0Oct 15, 2026
  22. v6.12.0Oct 13, 2026
  23. v6.11.0Oct 13, 2026
  24. v6.10.0Oct 11, 2026
  25. v6.9.0Sep 27, 2026
  26. v6.8.0Sep 26, 2026
  27. v6.7.0Sep 26, 2026
  28. v6.6.3Sep 25, 2026
  29. v6.6.2Sep 19, 2026
  30. v6.6.1Sep 19, 2026
  31. v6.6.0Sep 18, 2026
  32. v6.5.0Sep 17, 2026
  33. v6.4.0Sep 17, 2026
  34. v6.3.1Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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