🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

promptguard-mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promptguard-mcp-server

PromptGuard MCP server — scan prompts, redact PII, and audit LLM SDK usage from any MCP client

pipPyPI
Version
1.0.0
Weekly downloads
57
Maintainers
1

PromptGuard MCP Server

Standalone Model Context Protocol server for PromptGuard — scan prompts for injection attacks, redact PII, and audit LLM SDK usage from any MCP-compatible client.

Installing the MCP Server

pip install promptguard-mcp-server

uvx (zero-install)

uvx promptguard-mcp-server

npx

npx @promptguard/mcp-server

Docker

docker pull abhijoysarkar/promptguard-mcp-server
docker run -e PROMPTGUARD_API_KEY=pg_xxx abhijoysarkar/promptguard-mcp-server

Homebrew (CLI)

brew tap promptguard/tap
brew install promptguard

Quick Start

1. Install

pip install promptguard-mcp-server

2. Configure your API key

export PROMPTGUARD_API_KEY="pg_sk_prod_YOUR_KEY"

Or skip this — the agent will call promptguard_auth automatically when needed.

3. Add to your MCP client

Cursor — add to .cursor/mcp.json:

{
  "mcpServers": {
    "promptguard": {
      "command": "promptguard-mcp-server",
      "args": []
    }
  }
}

Claude Desktop — add to claude_desktop_config.json:

{
  "mcpServers": {
    "promptguard": {
      "command": "promptguard-mcp-server",
      "args": []
    }
  }
}

Claude Code:

claude mcp add promptguard -- promptguard-mcp-server

Gemini CLI:

gemini mcp add -t stdio promptguard -- promptguard-mcp-server

VS Code Copilot — add to settings.json:

{
  "github.copilot.chat.mcp.servers": {
    "promptguard": {
      "command": "promptguard-mcp-server",
      "args": []
    }
  }
}

Transports

The server supports two transports:

TransportCommandDefault
stdiopromptguard-mcp-serverYes
Streamable HTTPpromptguard-mcp-server --transport httpPort 8000

stdio (default)

Used by Cursor, Claude Desktop, VS Code, and most MCP clients. The server communicates via stdin/stdout using JSON-RPC 2.0.

promptguard-mcp-server

Streamable HTTP

Used for remote/shared deployments. The MCP endpoint is served at http://HOST:PORT/mcp.

promptguard-mcp-server --transport http --host 0.0.0.0 --port 9000

Docker

stdio mode

docker run -i --rm \
  -e PROMPTGUARD_API_KEY=pg_xxx \
  abhijoysarkar/promptguard-mcp-server

Streamable HTTP mode

docker run --rm -p 8000:8000 \
  -e PROMPTGUARD_API_KEY=pg_xxx \
  abhijoysarkar/promptguard-mcp-server \
  --transport http

Available Tools

ToolDescriptionAuth Required
promptguard_authAuthenticate with PromptGuard (opens dashboard or saves key)No
promptguard_logoutClear locally stored credentialsNo
promptguard_scan_textScan text for prompt injection, jailbreaks, PII, toxic contentYes
promptguard_scan_projectScan a directory for unprotected LLM SDK usageNo
promptguard_redactRedact PII from text (emails, phones, SSNs, credit cards)Yes
promptguard_statusCheck connection status, plan, and API versionNo

Environment Variables

VariableDefaultDescription
PROMPTGUARD_API_KEYAPI key (starts with pg_sk_test_ or pg_sk_prod_)
PROMPTGUARD_API_URLhttps://api.promptguard.coAPI base URL (for self-hosted deployments)
TRANSPORTstdioTransport type when running via Docker
HOST0.0.0.0HTTP bind address
PORT8000HTTP port

When no environment variable is set, the server reads from ~/.promptguard/config.json (created by promptguard_auth).

Development

git clone https://github.com/acebot712/promptguard.git
cd promptguard/mcp-server

pip install -e .
promptguard-mcp-server

Building the Docker image

docker build -t abhijoysarkar/promptguard-mcp-server .

Running tests

echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | promptguard-mcp-server

Keywords

llm

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts