SuperAPI AI Directory

mcp-gateway-scan

Read-only static scanner that scores MCP and agent-gateway repos on RBAC, fail-closed behavior, supply chain, observability, cost and secrets handling.

Open website

About this tool

Purpose

mcp-gateway-scan is a read-only static scanner for discovering anti-patterns in MCP (Model Context Protocol) or agent-gateway that may cause incidents in production environments. Point it at a repository, and within seconds you get red/yellow/green ratings across 7 dimensions.

It scans code and configuration, identifies failure modes that turn an MCP gateway from a demo into an incident, such as: authorization decided by the model, fail-open error handlers, unpinned-version supply chain, lack of tracing, uncapped spending, inline secrets, missing operational control levers, and prints where each problem is located.

Key Capabilities

  • 7-dimension scoring: each dimension is rated 🟢 green / 🟡 yellow / 🔴 red, with a severity label and matching evidence (file:line).
  • Read-only guarantee: only reads files, does not execute code, does not make network requests, does not print secret values; for inline secrets it only reports the location (<file:line>), with values redacted.
  • Connect verdict: before connecting a third-party MCP server to an agent holding real credentials, use the connect command to get a single top-level conclusion — CONNECT, REVIEW, or DO-NOT-CONNECT — also based on the 7 dimensions, and presenting the most severe findings first.
  • MCP server mode: the same package can run as an MCP server, letting an agent run scans conversationally, for example asking it to "scan this repo for gateway-readiness".
  • CI integration: --ci prints a compact, grep-able summary, and exits with a non-zero status when any dimension is red, so that regressions (newly added fail-open handlers, unpinned images, committed secrets) fail the build.
  • Includes test fixtures: the fixtures/vulnerable directory contains fake placeholder secrets for demonstration only (sk-EXAMPLENOTREAL…, AKIAEXAMPLE…), making it safe to view redacted output.

Usage

Requires Node ≥ 18.

  • Run the CLI directly: default command mcp-gateway-scan <path> run directly in the terminal or CI.
  • MCP server mode:mcp-gateway-scan mcp is server mode, for agent invocation; the mcp subcommand does not change CLI behavior.
  • Claude Code (one command): the official text mentions it can be run in Claude Code with one command, but the specific command content is not provided.
  • Cursor / any MCP client: add the configuration to .mcp.json, but the specific configuration content is not provided; then ask the agent to run the scan_gateway tool.
  • Tool input: { "path": "<repo or dir>", "ci": false } (ci is optional, adds a CI gate verdict).
  • Tool output: a 🟢🟡🔴 summary by dimension + structured results. Read-only, scans only the given path, secret values remain redacted (location only, values never shown).
  • CI usage: --ci prints a compact, greppable summary and exits with a non-zero status when any dimension is red.
  • You can also view its tool schema in the Glama MCP directory, try it in the browser, or deploy a containerized server directly from that listing. The build specification and release process are documented in docs/glama-release.md.

When to use

  • To quickly get a connect-or-not verdict before connecting a third-party MCP server to an agent holding real credentials.
  • As a gate in CI pipelines to detect regressions such as newly added fail-open handlers, unpinned images, or committed secrets.
  • To scan a repository conversationally in MCP clients such as Claude Code and Cursor.
  • To safely demonstrate redacted secret output using the built-in fixtures.

Limitations

  • This is a fast, free heuristic static pattern scanner. A green score is a good signal, not a guarantee; a red score is specific remediation guidance.
  • It does not run fault injection, does not check live IAM/IDP, and does not read your trace data.
  • Static scanning cannot vouch for the publisher or runtime behavior.
  • A full in-depth assessment is provided by the Provenwright MCP Gateway Readiness Audit: a read-only assessment of a live codebase, item-by-item evidence (file + line), a citation-based gap matrix, and a prioritized 90-day remediation roadmap.
  • The scanner distinguishes prompt content (system message strings / YAML prompt fields) from code that merely logs patterns, so references in documentation comments rg 'only use|if the user is admin' will not be flagged as authorized in prompts, whereas the same word appearing inside a real system prompt will be flagged. Comment lines and grep recipes / regex documentation are suppressed across all dimensions, and the "control already exists" signal is matched in code/config, not prose.

Other information

Built by the team behind the Provenwright MCP Gateway Readiness Audit. Full audit link: provenwright.com/audit; sample report: provenwright.com/sample/; book a 15-minute call: cal.com/willianpinho; email: me@willianpinho.com. License: MIT © Willian Pinho.