willianpinho/mcp-gateway-scan

πŸ’» Developer Tools
0 Views
0 Installs

πŸ“‡ 🏠 - Read-only static scanner for MCP / agent-gateway production-readiness. The scangateway tool scores a repo across 7 security dimensions (RBAC, fail-closed, supply chain, observability, cost, secrets, prod-readiness). Never executes code or prints secret values.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "willianpinho-mcp-gateway-scan": {
      "command": "npx",
      "args": [
        "-y",
        "willianpinho-mcp-gateway-scan"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

mcp-gateway-scan

npm version Glama server License: MIT

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

npx mcp-gateway-scan ./path/to/your/gateway

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 (<file:line>), with the value redacted.


Install

# one-off
npx mcp-gateway-scan <path>

# or global
pnpm add -g mcp-gateway-scan
mcp-gateway-scan <path>

Requires Node β‰₯ 18.

Usage

mcp-gateway-scan <path> [options]

Options:
  --json          Machine-readable JSON instead of the terminal report
  --ci            Compact, no-color output for pipelines; exits 1 on any RED
  --no-color      Disable ANSI colors
  -h, --help      Show help
  -v, --version   Print version

Exit codes:
  0  no red dimensions
  1  one or more red dimensions
  2  usage / IO error

"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 server's repo checkout
mcp-gateway-scan connect ./some-mcp-server

# its MCP client config entry (.mcp.json / claude_desktop_config.json)
mcp-gateway-scan connect ./.mcp.json

# its package manifest
mcp-gateway-scan connect ./package.json

The verdict reduces the dimension scores into one decision:

VerdictWhenExit
DO-NOT-CONNECTany S1 (full-compromise-class) dimension is red1
REVIEWconcrete-or-possible risk (red S2/S3 or any yellow)1
CONNECTevery dimension green on the static checks0

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):

claude mcp add gateway-scan -- npx -y mcp-gateway-scan mcp

Cursor / any MCP client β€” add to your .mcp.json:

{
  "mcpServers": {
    "gateway-scan": {
      "command": "npx",
      "args": ["-y", "mcp-gateway-scan", "mcp"]
    }
  }
}

Then ask your agent to run the scan_gateway tool:

  • Input: { "path": "<repo or dir>", "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 <path> 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

  [RED] D2 Fail-close / fail-open posture  S1
        Error handlers on the call path return allow/true/ok or pass β€” the
        system fails OPEN. A degraded auth/policy check silently becomes
        'allow'. Launch blocker.
        βœ— gateway.ts:23  fail-open on error path  return { allowed: true };

  [GREEN] D6 Security, secrets & identity  S1
        No inline secrets; credentials referenced from a manager/env and
        IDP/OIDC identity wiring is present.
        βœ“ docker-compose.yml:7  secret-manager / env reference  DATABASE_URL: op://Production/gateway-db/url

  SCORE
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚ Dim    β”‚ Title                                      β”‚ Status  β”‚ Severity β”‚
  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
  β”‚ D1     β”‚ Tool-access governance & RBAC              β”‚ RED     β”‚ S1       β”‚
  β”‚ ...    β”‚ ...                                        β”‚ ...     β”‚ ...      β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

  0 green  0 yellow  7 red

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:

# .github/workflows/gateway-readiness.yml
- name: MCP gateway readiness scan
  run: npx mcp-gateway-scan ./gateway --ci
RED    D2 S1 Fail-close / fail-open posture (findings=1)
RESULT green=4 yellow=2 red=1
VERDICT FAIL β€” red dimension(s) present; see findings above.

The 7 dimensions

DimChecks for
D1 Tool-access / RBACAuthorization expressed in prompts; absence of a gateway policy layer
D2 Fail-closecatch/except blocks that return allow/true/ok/pass; missing timeouts
D3 Onboarding / supply chain:latest, @main, npx -y …@, unpinned images; rewards sha256: / integrity
D4 ObservabilityPresence/absence of OTel / traceparent / spans; raw prompts in logs
D5 Routing / costMissing max_tokens / budget / rate-limit / quota
D6 Secrets / identityInline secret literals (location only, value redacted); rewards op:// / vault: / process.env; IDP/OIDC
D7 Prod-readinessMissing kill-switch / feature-flag, 429 / rate-limit, eval / red-team gate

Each dimension is scored 🟒 green / 🟑 yellow / πŸ”΄ red with a severity tag, plus the matched evidence (file:line). The methodology behind the rubric maps to OWASP Top 10 for LLM Applications, the MCP spec (2025-06-18), and OpenTelemetry GenAI semantic conventions.

Try it on the bundled fixtures

mcp-gateway-scan fixtures/secure      # mostly green
mcp-gateway-scan fixtures/vulnerable  # mostly red

The fixtures/vulnerable tree contains only fake, non-functional placeholder secrets (sk-EXAMPLENOTREAL…, AKIAEXAMPLE…) so you can see the redacted-secret output safely.

Accuracy

Every finding is meant to be defensible to a skeptical senior engineer. The scanner distinguishes prompt content (a system-message string / YAML prompt field) from code that merely documents a pattern β€” so a doc comment quoting rg 'only use|if the user is admin' is not flagged as authorization-in-prompt, while the same words inside a real system prompt are. Comment lines and grep-recipe / regex documentation are suppressed across all dimensions, and "control present" signals are matched in code/config, not prose.

What this is (and isn't)

This is a fast, free heuristic wedge β€” a static pattern scanner. A green score is a good signal, not a guarantee; a red score is a concrete pointer to fix. It does not run fault-injection, inspect your live IAM/IDP, or read your traces. That depth is what a full MCP Gateway Readiness Audit provides: a cited Gap Matrix and a sequenced 90-day remediation roadmap.

This scanner (free, MIT)Full MCP Gateway Readiness Audit (paid)
Methodstatic pattern checksread-only review of your live codebase
Live testsβ€”fault-injection (F1–F5), trace verification
Evidencematched lineper-finding file:line in an evidence index
Output7-dimension scorecited gap matrix + severity + sequenced 90-day roadmap
Deliveryinstant, automatedexpert engagement + live review session

Need the full audit? This scanner is a free heuristic wedge. The Provenwright MCP Gateway Readiness Audit goes deeper: read-only assessment of your live codebase, per-finding evidence (file + line), a cited Gap Matrix, and a sequenced 90-day remediation roadmap.

See a sample report: provenwright.com/sample/
Full audit info: provenwright.com/audit
Book a 15-min call: cal.com/willianpinho
Email: me@willianpinho.com

License

MIT Β© Willian Pinho

Related MCP Servers

Moxie-Docs-MCPβ˜… Featured

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

πŸ’» Developer Tools2 views
3KniGHtcZ/codebeamer-mcp

πŸ“‡ ☁️ 🍎 πŸͺŸ 🐧 - Codebeamer ALM integration for managing work items, trackers, and projects. Provides 17 tools for reading and writing items, associations, references, comments, and risk management data via Codebeamer REST API v3.

πŸ’» Developer Tools1 views
21st-dev/Magic-MCP

Create crafted UI components inspired by the best 21st.dev design engineers.

πŸ’» Developer Tools0 views
a-25/ios-mcp-code-quality-server

πŸ“‡ 🏠 🍎 - iOS code quality analysis and test automation server. Provides comprehensive Xcode test execution, SwiftLint integration, and detailed failure analysis. Operates in both CLI and MCP server modes for direct developer usage and AI assistant integration.

πŸ’» Developer Tools0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it β†’
β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.