Prompt Rejector

Provides a dual-layer screening layer between untrusted prompts and AI agents, using semantic analysis and static pattern matching.
  • typescript

0

GitHub Stars

typescript

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "revsmoke-promptrejectormcp": {
      "command": "node",
      "args": [
        "/absolute/path/to/promptrejectormcp/dist/index.js"
      ],
      "env": {
        "START_MODE": "mcp",
        "GEMINI_API_KEY": "your_google_ai_key"
      }
    }
  }
}

You deploy Prompt Rejector as an MCP server and REST API that screens untrusted prompts before they reach your AI agents, providing dual-layer defenses with semantic analysis and static pattern matching to block prompt injections, jailbreak attempts, and common web attacks.

How to use

You use this MCP server by integrating it into your AI workflow as a screening layer between input delivery and your agent. Your client or orchestration layer should forward prompts to the MCP endpoint for safety evaluation, then proceed with processing only if the result is deemed safe or flagged for review if needed.

How to install

Follow these concrete steps to set up the MCP server locally and run it in MCP mode.

# 1. Clone the repository
git clone https://github.com/revsmoke/promptrejectormcp.git
cd promptrejectormcp

# 2. Install dependencies
npm install

# 3. Build TypeScript sources
npm run build

# 4. Start in MCP mode
# Ensure you provide a valid Gemini API key in your environment
START_MODE=mcp GEMINI_API_KEY=your_google_ai_key npm start

Configuration

Configure the MCP server by supplying environment variables and startup mode. The following settings are typical when running in MCP mode.

# Required: Your Google AI API key for semantic analysis
GEMINI_API_KEY=your_google_ai_key

# Optional: API server port (default: 3000)
PORT=3000

# Optional: Startup mode - "api", "mcp", or "both" (default: both)
START_MODE=mcp

MCP server configuration (example)

The MCP server can be configured as a local stdio process. Use the following command structure to run the MCP server and expose the editor’s interface to the rest of your stack.

{
  "mcpServers": {
    "prompt-rejector": {
      "command": "node",
      "args": ["/absolute/path/to/promptrejectormcp/dist/index.js"],
      "env": {
        "GEMINI_API_KEY": "your_google_ai_key",
        "START_MODE": "mcp"
      }
    }
  }
}

Available tools

check_prompt

Checks a prompt for safety by sending it to the MCP server's REST API, returning a structured safety result.

health

Health check endpoint to verify the MCP server is running and reachable.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational