mcp-gateway-scan
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
> Read-only static scanner for **MCP / agent-gateway production-readiness anti-patterns.**
> Point it at a repo, get a 7-dimension red/yellow/green score in seconds.
Built by the team behind the **Provenwright MCP Gateway Readiness Audit** —
a full cited audit with evidence index, scored gap matrix, and 90-day roadmap.
Full audit: provenwright.com/audit
It scans your code and config for the failure modes that turn an MCP gateway from a demo
into an incident — authorization decided by the model, error handlers that fail _open_,
unpinned supply chains, dark traces, unbounded spend, inline secrets, and missing
operational levers — and prints exactly where each one lives.
**100% read-only.** It only _reads_ files. It never executes your code, never makes network
calls, and **never prints a secret value** — for inline-secret hits it reports the location
only ( ), with the value redacted.
---
Install
Requires Node ≥ 18.
Usage
"Should I connect to this server?" — the connect verdict
Before you wire a **third-party** MCP server into an agent that holds real credentials,
point connect at it and get a single top-line verdict — **CONNECT**, **REVIEW**, or
**DO-NOT-CONNECT** — over the same 7 dimensions, with the single worst finding surfaced first.
The verdict reduces the dimension scores into one decision:
| Verdict | When | Exit |
| ------------------ | --------------------------------------------------- | ---- |
| **DO-NOT-CONNECT** | any **S1** (full-compromise-class) dimension is red | 1 |
| **REVIEW** | concrete-or-possible risk (red S2/S3 or any yellow) | 1 |
| **CONNECT** | every dimension green on the static checks | 0 |
Same scan engine, same --json / --ci flags, same read-only / secret-redaction guarantees —
connect only re-frames the output as a connect/no-connect decision. A green CONNECT is a good
signal, not a guarantee: a static scan cannot vouch for the publisher or runtime behavior.
Run it inside Claude Code / Cursor (MCP server)
The same package can also run as an **MCP server** so your agent runs the scan
conversationally — just ask it to "scan this repo for gateway-readiness".
**Claude Code** (one command):
**Cursor / any MCP client** — add to your .mcp.json:
Then ask your agent to run the **scan_gateway** tool:
- Input: { "path": " ", "ci": false } (ci optional — adds the CI gate verdict).
- Output: a per-dimension 🟢🟡🔴 summary + the structured result. Read-only; scans
only the path you give it; secret values stay redacted (location only, never the value).
> Same package, two modes — mcp-gateway-scan mcp is **the server** (use it from your
> agent); the default mcp-gateway-scan is **the CLI** (run it directly in a terminal
> or CI). The mcp subcommand does not change the CLI behavior.
Or find it on Glama
mcp-gateway-scan is listed on the **Glama MCP directory**,
where you can inspect its tool schema, **Try it in the browser**, or deploy the containerized
server straight from the listing. The build spec and release process are documented in
docs/glama-release.md.
Example output
Wire it into CI
--ci prints a compact, greppable summary and **exits non-zero on any red dimension**, so a
regression (a new fail-open handler, an unpinned image, a committed secret) fails the build:
The 7 dimensions
| Dim | Checks for |