agentgate

io.github.ciceroyang由 GitHub 帳號 ciceroyang 發布v0.5.0更新於 Oct 24, 2026

Read-only evidence for the tools agents run: MCP server records, coverage and policy.

概覽

AI 產生的概覽

唯讀的 MCP 工具,用來查詢 MCP 伺服器證據索引、比對你實際使用的工具、回報涵蓋情形,並掃描本機專案。

可以做什麼
提供四個唯讀工具:lookup_server 回傳單筆伺服器記錄及其涵蓋資訊區塊,inventory_tools 把你實際使用的工具與內嵌索引快照比對,coverage_report 顯示索引中被量測的比例,check_project 掃描本機目錄。它只讀取本機索引,不寫入、不上傳,也不執行被掃描的工具。不完整或索引中不存在的記錄會被回報為不完整或缺少,而不是安全。
適用情境
適合在採用某個 MCP 伺服器或套件之前,讓助理查看已知資訊;也適合把已在使用的工具清單與已記錄的證據比對,或了解這些證據實際被量測了多少。它是報告工具,不是認證,也不是新的掃描。
執行需求
透過 npx 從 npm 套件 @zhiliangtech/agentgate 以 stdio 在本機執行;需要 Node 20 或更新版本,沒有其他相依性。複製的儲存庫自帶範例索引,refresh 會用最新索引取代它。未宣告驗證、環境變數或標頭。
安裝前請注意
唯讀:不寫入、不上傳、不執行被掃描的工具,清單比對在瀏覽器記憶體中進行,不會上傳你的清單。版本相符不能證明實際安裝的內容,即使確認相符也不等於安全認證。README 提醒 0.5.0 版在證據缺少時可能錯誤通過必要證據閘門,因此應固定使用已確認的版本,而不是跟隨 latest 標籤。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

English · 中文

agentgate

A control plane for the tools agents run. It inventories what is in use, records the evidence behind every claim, states what a company refuses, and enforces that decision in CI and at runtime.

The whole project follows one rule:

clean is emitted only when every check ran. Anything that could not be measured is unmeasured, and an artefact with an unmeasured part is incomplete — never clean.

That rule is there because the usual failure of a security scanner is a green build for work nobody did. Here a check that crashes makes the result incomplete, so it cannot happen quietly.

The four parts

partwhat it doespackage
inventoryenumerate the registry, resolve packages, fetch repositoriespackages/collect
evidencejoin it into one record per server, with the bytes behind every claimpackages/collect
policyscan configs, hooks, manifests and source for what a company would refusepackages/guard
verificationcheck a claim against something outside the claimpackages/verify

Running it

Server setup is in docs/operations/deployment-runbook.md. The first deployment, on 2026-09-16, is written up in docs/verification.md together with what was checked and what still is not.

docs/capabilities.md lists what this project can and cannot claim, one line each, every line carrying a command you can run. It exists because a consultant once wrote our capabilities down for us and included four we do not have.

Try it without installing

The service runs at https://xn--5kvo87g.com/: landing page, pricing, the evidence index (rebuilt daily) and the API on the same host.

https://ciceroyang.github.io/agentgate/ is the landing page on GitHub Pages. The index is a single browsable page at https://ciceroyang.github.io/agentgate/evidence.html, rebuilt daily from the live registry — records are embedded, filtering happens locally, and there is nothing to sign up for. Pricing and a ten-minute walkthrough.

Quickstart

Upgrading to 0.6.0: read the upgrade guide before replacing an existing admission gate or watch installation. The 0.5.0 package can incorrectly pass a required-evidence gate when evidence is absent; do not use it for a new gate. Confirm the version you installed, and see the release record for public-package verification. A source checkout and the hosted service may run different versions.

Node 20 or newer, no dependencies. A clone already carries a sample index, so the service answers immediately; refresh replaces it with a current one.

sh
node bin/agentgate.mjs serve# agentgate serving http://127.0.0.1:8080
curl -s localhost:8080/healthcurl -s localhost:8080/v1/index/summarycurl -s localhost:8080/v1/servers/<name>curl -s localhost:8080/badge/<name>.svg

The package is on npm as @zhiliangtech/agentgate. Push a v* tag and CI publishes it with provenance; publish-checklist.md has the setup and the record of what was verified.

sh
npx --yes --ignore-scripts @zhiliangtech/[email protected] check --root .npx --yes --ignore-scripts @zhiliangtech/[email protected] serve

An unversioned npx command follows the latest dist-tag, not this checkout. Pin the accepted version; editing a local version number does not change the public package.

With no policy file, check uses a built-in default that refuses nothing extra, and serve answers from the snapshot the package shipped with. refresh writes to ./data next to you, never into the installed package.

Docker works too, and runs the same command:

sh
docker compose up                            # the service on :8080docker compose --profile collect run --rm refresh   # rebuild data/index.json and seed the first snapshot

Tool inventory

Run node bin/agentgate.mjs serve and open /inventory.html at the address it prints. Paste a list of tool names or pick a text/JSON file, resolve ambiguous matches, fill in the version you actually use, and download a standalone HTML report. The comparison happens in browser memory against the embedded index snapshot: the list is not uploaded or stored, your machine is not scanned, and no tool is executed. When a record carries a coverage block, the report also lists which scanners ran and which did not, and why; a record whose own coverage block says a required scanner did not finish will not be shown as matched, however complete the rest of its evidence looks.

The same thing without a browser:

sh
node bin/agentgate.mjs inventory --input examples/inventory/tools.json --out my-tools.htmlnode bin/agentgate.mjs inventory --input tools.json --index data/index.json --format json

An input is one name per line, a JSON array, or { "tools": [...] }. Each object may carry name, server, package, registry and version — nothing else. Full client configurations and credentials are rejected on purpose. The inventory guide has the details.

Unmatched, ambiguous, missing-version, mismatched-version and incomplete-evidence items stay in the report. A version match is not proof of what is installed. The committed sample is historical and cannot produce a confirmed match; neither can old evidence without an exact content binding. Even a confirmed match is not a safety certification and not a new scan. Look at the scopes, the findings, the snapshot date and the gaps before you rely on it.

Exit code 0 means a report was produced, not that every tool passed. Malformed input or unreadable data exits 2, and --out will not overwrite an existing file. When you want CI to refuse something, use check, not inventory.

Getting the list in the first place

Nobody has this list by hand. discover reads the MCP configuration files already on the machine and produces input that inventory --input accepts. It prints package coordinates as lines when all exported identities are known; if any entry is alias-only, it uses JSON so an alias such as [email protected] cannot be mistaken for a verified package and version:

sh
node bin/agentgate.mjs discover --out tools.txt          # home directory + current directorynode bin/agentgate.mjs discover --roots ~/code/a,~/code/b --format json

It never prints an env value, a header or an argument, and a remote address is cut down to its host, because paths and query strings carry tokens. It reads Codex's .codex/config.toml MCP tables without starting the configured servers. Explicitly disabled entries remain visible in --format json but are omitted from text and inventory exports. Unsupported MCP TOML shapes, malformed files and unreadable files are listed with a reason and make the command exit 2. Package names and versions are taken only from recognizable declared runner arguments; a custom command or remote host is not treated as a verified package or runtime version.

Several repositories

sh
node bin/agentgate.mjs audit --roots ~/code/a,~/code/b,~/code/c --index data/index.json

One scan per directory, one verdict for the set. Any incomplete directory makes the audit incomplete, and a directory that does not exist counts as unmeasured rather than skipped.

Changes since last time

sh
node bin/agentgate.mjs watch --input tools.txt --index data/index.json --archive ./archivenode bin/agentgate.mjs watch --verify --archive ./archivenode bin/agentgate.mjs watch --input tools.txt --index data/index.json --archive ./archive \  --webhook https://example.invalid/hook --webhook-format wecom

Every run appends one line to a chained archive (prev is the previous line's hash) and stores what it saw under snapshots/<sha256>.json. --verify recomputes the chain and every retained snapshot, and exits 1 if anything does not match. Nothing is sent anywhere unless --webhook names an address, and the archive is written before the push, so a chat service being down cannot lose a capture.

Questionnaire mapping

sh
node bin/agentgate.mjs framework                       # who answers which AI-CAIQ itemnode bin/agentgate.mjs inventory --input tools.json --framework aicaiq --out report.html

For each AI-CAIQ item the mapping says what we can provide, where our coverage stops, and whether the answer is ours, the customer's, or an independent assessor's. It describes evidence. It is not a compliance conclusion and it does not reproduce the official text. All 58 items of the four domains a reviewer asks a vendor about are classified: 13 answers are ours, 41 are the customer's and 4 need an independent assessor.

Evidence pack

The mapping says what we can provide. pack produces the thing itself: one directory a vendor hands to the person reviewing them, where every answer we claim points at evidence in the same directory and everything we could not measure is counted at the top.

sh
node bin/agentgate.mjs pack --input tools.json --archive ./agentgate-archive --out agentgate-packnode bin/agentgate.mjs pack --verify agentgate-pack     # recompute every hash and the seal

It writes pack.json (machine readable), pack.html (for the reviewer), answers.aicaiq.md (all 58 items, each classified), manifest.txt (one sha256 per file) and manifest.sha256 (the seal on the manifest). An answer whose evidence is missing reads unmeasured and the command exits 2, not 0. Example built from the live index: docs/samples/evidence-pack-example — verifiable with pack --verify. Contract: docs/spec/evidence-pack-v1.md.

MCP server

Anything that speaks MCP can ask the index directly. Add this to claude_desktop_config.json, a repo's .mcp.json, or whatever your client reads:

json
{  "mcpServers": {    "agentgate": { "command": "npx", "args": ["--yes", "@zhiliangtech/agentgate@next", "mcp"] }  }}

Four read-only tools: lookup_server (one record, with its coverage block), inventory_tools (match the tools you actually use), coverage_report (how much of the index was measured) and check_project (scan a local directory). It reads the local index, never writes, never uploads, and never runs a scanned tool. An incomplete record is reported as incomplete, and a record that the index does not have is reported as missing rather than safe. Details: docs/spec/mcp-server-v1.md.

Policy

A policy states what a company refuses. It is data rather than code, and it has a spec: docs/spec/policy-v1.md.

json
{  "version": "agentgate.policy/v1",  "threshold": "high",  "required": { "pinnedPackages": true, "measuredEvidence": ["packageManifest"] },  "forbidden": { "rules": ["AG-INSTALL-001"], "servers": ["internal/*"] }}
sh
node bin/agentgate.mjs check --policy agentgate.policy.json --root . --index data/index.json

The policy above requires indexed evidence. Supply a real index matching the local npm package's exact name and version: missing evidence exits 2; an explicit missing, malformed or sample index exits 3. A local source scan does not substitute for the required package evidence.

With no policy file and no --policy, the check still runs. It reports what the checks found and says it used the built-in default, which refuses nothing extra; inventing obligations on your behalf would make the result mean less, not more. A policy you name explicitly and that cannot be read is an error, because that is a typo.

The same evaluation can go to a person instead of a terminal:

sh
node bin/agentgate.mjs check --policy agentgate.policy.json --root . --index data/index.json --format html --out report.html

One static, printable file with no script in it. Anything that could not be measured gets its own section above the findings: a report that buries what it did not check reads as more complete than it is. This file is what the free checkup delivers.

There are three outcomes, and incomplete outranks findings. If a check failed to run, or an evidence block the policy requires is unmeasured, the exit code is 2 however clean the findings look. No threshold turns a partial answer into a pass.

exitmeaning
0clean
1findings
2incomplete

Enforcement

A pull request that adds something the policy refuses will not merge, and the reason is posted on the pull request rather than left in a log nobody opens.

yaml
- uses: ciceroyang/agentgate@main  with:    policy: agentgate.policy.json    index: data/index.json

See examples/github-actions/policy.yml. The action runs the check, writes SARIF for code scanning, comments the report on the pull request, and exits with the check's own code — so an incomplete scan still fails the build at 2.

Runtime

The same policy can apply to what has already shipped, if you put a gateway in front of the server instead of pointing your client at it:

sh
node bin/agentgate.mjs proxy --policy agentgate.policy.json --log calls.jsonl -- \  npx -y @modelcontextprotocol/server-filesystem /data

A call the policy refuses is answered locally with a reason and never reaches the server. A forbidden tool is removed from the advertised list, so a client cannot ask for it at all. Every decision, allowed or refused, is appended to the log.

History

The index is kept, so two builds can be compared. The interesting column is the last one: changes that a release would have explained and did not.

sh
node bin/agentgate.mjs diff --from previous-index.json --to data/index.json
  added:           0  removed:         0  verdict changed: 1  package changed: 0  silent (no version move, different evidence): 1

A new finding on an unchanged version usually means a package was replaced without a release, a repository was edited in place, or the scan has started seeing something. That record cannot be back-filled. It only exists if someone was looking at the time.

The pipelines behind the index

sh
node packages/collect/mcp-audit.mjs --max 6000 --out data/census.jsonnode packages/collect/scripts/guard-scan.mjs --census data/census.json --out data/guard-scan.jsonnode packages/collect/scripts/build-index.mjs --census data/census.json --guard data/guard-scan.json --out data/index.jsonnode scripts/coverage-stats.mjs --index data/index.json   # how much of it was actually measured

And the scanner on a local project:

sh
node packages/guard/bin/agent-guard.mjs . --fail-on highnode packages/collect/bin/agent-add.mjs --index data/index.json <server-name>

Writing

Test

sh
npm test                              # the whole suite; it prints how many rannode scripts/bench.mjs 50000 200      # lookups must stay under 10 ms p50node scripts/measure-verify.mjs       # claim extraction, against a small labelled setnode packages/guard/scripts/regression.mjs   # benign must stay silent, positives must fire

Layout

packages/guard     the scanner: engine, nine checks, CLI, corpus, GitHub Actionpackages/collect   census, package and repository scanning, the evidence indexpackages/policy    policy evaluation and human-readable reportspackages/gateway   runtime policy enforcement for MCP servers over stdiopackages/history   index snapshots and change comparisonspackages/service   the read-only evidence APIpackages/verify    cross-model claim checkingdocs/              architecture and product notes

Verification

The tests are written by the same people who wrote the code. docs/verification.md records the checks that are not: a real MCP server through the gateway, and the list of what is still unverified.

sh
node scripts/verify-real-server.mjs

To see whether the index's high and critical findings still match recorded human reviews, run node scripts/review-criticals.mjs. A review has to bind the finding and its evidence to an exact package version and to complete scanned-content provenance, including the SHA-256 digest and the scope. A missing or changed binding needs another human review, and legacy approvals are not upgraded automatically. --accept records a review that has already happened and refuses incomplete provenance; it neither performs the review nor certifies third-party code.

Operations

Status

This is an early open-source core. It covers collection, an evidence index, scanning, policy checks in CI, a runtime gateway for MCP servers over stdio, historical diffs and a read-only service. Deployment scripts and a runbook are in the tree, and the first deployment with its checks is written up in docs/verification.md. That write-up says nothing about the current health of the hosted service. The container path is not asserted but built: CI runs docker compose up --build and then a health check against the running container.

What the version identifiers promise, and which versions are supported, is written down in docs/spec/compatibility.md; SECURITY.md says how to report a vulnerability and what to expect. Neither is a substitute for gate 3 and gate 4 above — the enterprise surface is still missing and nobody outside this repository depends on it yet.

The enterprise features described in the pricing proposal — SSO/SAML, RBAC, multi-tenancy and signed audit export — are not implemented. The Team and Enterprise prices are unvalidated hypotheses; the free pilot is how we test whether anyone wants this. See the pilot scope and the licence.

One invariant is in the test suite: a crashed check can never produce clean. Run npm test for the current numbers; this page does not repeat a test count.

Licence

AGPL-3.0-only. If you want to offer a modified agentgate as a closed service without publishing your changes — the case the AGPL does not permit — a commercial licence is available. See docs/product/licensing.md.

來源:README.md,提交 b7c9ee5

工具

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

版本歷史

3
  1. v0.5.0最新Sep 21, 2026
  2. v0.3.0Sep 18, 2026
  3. v0.2.5Sep 18, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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