Skip to main content
Glama

agent-preflight

Zero-dependency local security guardrail CLI & MCP server for AI coding agents. Run three fast pre-flight checks locally with zero API keys before trusting a repo, pasting logs into an LLM, or installing AI-suggested packages:

  1. Secrets & PII Redaction — detects and masks GitHub/AWS/OpenAI/Anthropic/Stripe keys, private keys, and emails ([REDACTED:...]).

  2. Prompt Injection & Trojan-Source Unicode — flags hidden bidi/zero-width control characters, system-prompt exfiltration instructions, and raw-IP fetches in untrusted READMEs, issues, and diffs.

  3. Slopsquatting Dependency Check — verifies requirements.txt, pyproject.toml, and package.json entries against PyPI and npm to catch hallucinated or newly registered typosquat packages.

Quickstart

Requires Python 3.11+ (zero external runtime dependencies).

# Scan current repository (exits 1 on high-severity findings)
uvx --from git+https://github.com/dev-shiki/agent-preflight agent-preflight scan .

# Check Python/Node manifests for slopsquatted or <14-day-old packages
uvx --from git+https://github.com/dev-shiki/agent-preflight agent-preflight check-deps .

# Redact PII/secrets from a log file before sharing
uvx --from git+https://github.com/dev-shiki/agent-preflight agent-preflight redact debug.log

Related MCP server: llmsecurity-mcp

MCP Server Configuration

Add to Claude Code, Cursor, Windsurf, or Antigravity mcp_config.json:

{
  "mcpServers": {
    "agent-preflight": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/dev-shiki/agent-preflight", "agent-preflight-mcp"]
    }
  }
}

Exposed MCP Tools

  • preflight_scan_text — inspect untrusted text for secrets, bidi Unicode, and prompt injection.

  • preflight_scan_path — recursively scan a file or workspace directory.

  • preflight_redact — scrub secrets and emails from text.

  • preflight_check_deps — verify PyPI/npm packages in a project directory.

Development

uv run --with pytest pytest -v

Available Tools

4 tools
preflight_check_depsB

Verify PyPI and npm dependencies in a directory to catch slopsquatted or brand-new typosquat packages.

Inputs: path.

preflight_redactB

Redact API keys, tokens, private keys, and email addresses before sharing logs or prompts.

Inputs: text (required).

preflight_scan_pathB

Recursively scan a local file or directory for secrets, Trojan-Source bidi characters, and prompt injection.

Inputs: path.

preflight_scan_textA

Scan untrusted text (issue body, README, prompt) for leaked secrets, hidden bidi Unicode, and prompt injection.

Inputs: text (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 4 tools

    Disambiguation4/5

    Each tool targets a distinct operation: scanning text, scanning a filesystem path, redacting sensitive data, and checking dependencies. The only mild overlap is between preflight_scan_text and preflight_scan_path, but the descriptions clearly differentiate string input from filesystem input.

    Naming Consistency5/5

    All four tools use a consistent preflight_ prefix followed by a verb_noun or verb form (scan_text, scan_path, redact, check_deps). The pattern is predictable and immediately readable.

    Tool Count5/5

    Four focused tools map cleanly to the server's stated preflight-safety purpose, with no filler or redundant entries. Each tool earns its place.

    Completeness4/5

    The surface covers the core safety workflows: text scanning, path scanning, redaction, and dependency verification. Minor gaps exist, such as scanning remote URLs/repos or configuring rules, but the main use cases are handled.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Provides local, dependency-free security scanning tools for LLM configurations, prompts, RAG sources, and more, enabling AI coding agents to detect prompt injections and other vulnerabilities without external network access.
      8
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables users to scan untrusted text, files, and directory trees for prompt-injection patterns and receive severity-ranked, explainable verdicts before content reaches an agent. It runs locally and returns clean, review, or blocked verdicts for safer agent input.
      1
      MIT