Skip to content

PromptGuard CLI v2.3.0

Choose a tag to compare

@github-actions github-actions released this 04 Nov 19:11
· 34 commits to main since this release

PromptGuard CLI v2.3.0

Added

  • promptguard mcp speaks MCP 2026-07-28 and 2025-11-25. A 2026-07-28
    client needs no initialize: each request names its revision in _meta,
    server/discover answers with every revision the server speaks (2026-07-28,
    2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05), its capabilities and its
    identity, and a revision it does not speak gets -32022
    (UnsupportedProtocolVersionError) with that list. Those results carry
    resultType, the server's identity in _meta, and, for tools/list and
    server/discover, ttlMs and cacheScope; ping and logging/setLevel,
    which 2026-07-28 removed, are unknown methods there. Older clients still
    open with initialize, which now also agrees on 2025-11-25.
  • promptguard_scan_text takes content_type (prompt, the default, or
    response), so an agent can scan a model's output as well as a prompt. It is
    sent to the API as the scan type; any other value is a tool error the model
    can correct.

Security

  • promptguard mcp no longer takes an API key through the chat.
    promptguard_auth used to accept the key as a tool argument, which put it in
    the model's context, the client's transcript and any log of tool calls. The
    tool now only checks authentication and, when there is none, opens the
    dashboard and tells the user to save the key with promptguard login or
    PROMPTGUARD_API_KEY. A client still sending api_key is refused, and
    nothing is saved.
  • promptguard_redact no longer returns the un-redacted text. It passed the
    API's response through whole, including the original field, so the PII it
    removed came straight back into the conversation. It now returns redacted
    and piiFound only, as the hosted server does.

Changed

  • The MCP server follows the current spec. initialize negotiates the
    protocol version (2025-06-18, 2025-03-26 or 2024-11-05) instead of always
    answering 2025-03-26. It no longer advertises a logging capability it never
    implemented. Every tool has a title and behaviour annotations, and the scan,
    redact, scan-project and status tools declare an outputSchema and return
    structuredContent. Calling a tool that does not exist is now a JSON-RPC
    -32602 error rather than a tool result.
  • The shared MCP tools match the hosted server's exactly. scan_text,
    redact and status now carry the hosted server's title, description,
    parameters and annotations: scan_text and redact are read-only (each
    call is still one metered Request, which their descriptions now say), and
    tests/mcp-tool-definitions.json, a copy of the platform's published tool
    manifest, fails a test on any drift. Every tool's inputSchema sets
    additionalProperties: false, and an undeclared argument is now a tool error
    naming it instead of being ignored.
    Drop-in LLM security for your applications - Built with Rust + Tree-sitter

Installation

One-line install (macOS/Linux):

curl -fsSL https://raw.githubusercontent.com/promptguardhq/promptguard-cli/main/install.sh | sh

Manual install:

  1. Download the binary for your platform below
  2. Make it executable: chmod +x promptguard-*
  3. Move to PATH: sudo mv promptguard-* /usr/local/bin/promptguard
  4. Verify: promptguard --version

Checksums

SHA256 checksums are provided for each binary (.sha256 files).

About PromptGuard CLI

  • ✅ Real AST transformations using Tree-sitter
  • ✅ TypeScript, JavaScript, Python support
  • ✅ OpenAI, Anthropic, Cohere, HuggingFace providers
  • ✅ Automatic backups with safe revert
  • ✅ Single 5.3MB static binary

Supported Platforms

  • macOS ARM64 (M1/M2/M3)
  • macOS x86_64 (Intel)
  • Linux x86_64
  • Windows x86_64

📖 Documentation: https://docs.promptguard.co/cli
🏠 Homepage: https://promptguard.co
🐛 Issues: https://github.com/promptguardhq/promptguard-cli/issues