Skip to content

Developer Overview

PII Firewall is a privacy-first toolkit that protects personal data before it reaches AI or the cloud.
It offers three integration paths — REST API, Node.js SDK, and MCP Server — plus two advanced capabilities: Secure RAG and Composite Attack Detection. All processing can run locally with zero cloud data transmission.

Integration Options

OptionBest For
REST APIAny language, backend services, quick integration
SDK (Node.js)Node.js / TypeScript projects
MCP ServerClaude Desktop, Cursor, AI agent pipelines
Secure RAGUse internal documents in RAG without cloud exposure (manufacturing, healthcare, finance)
Composite Attack DetectionSQL + prompt injection compound defense

Key Capabilities

CapabilityDescription
PII Detection & MaskingDetect and reversibly tokenize 24 PII types (name, email, phone, national ID, etc.)
API Key Auto-DetectionAutomatically mask API keys from 11 providers including Anthropic and OpenAI
Prompt Injection DetectionDetect 10 categories of prompt attack patterns
SQL Injection DetectionDetect SQL attacks embedded in AI inputs
Composite Attack DetectionDetect SQL + prompt attacks simultaneously in a single pipeline (compositeRisk flag)
Secure RAGFull pipeline: PII tokenization → RAG ingestion → LLM response → PII restoration
Differential PrivacyApply statistical privacy protection on top of masked data

Base URL

https://pii-firewallproxy-production.up.railway.app

Authentication

All Proxy API requests require an API key in the Authorization header:

http
Authorization: Bearer pf_live_xxx

Get your API key from the Developer Console after signing in.
Authentication details

MCP Server & SDK — no API key required

The MCP Server and SDK run @pii-firewall/core locally. No API key or internet connection is needed. An API key is only required when using the Proxy API for credit-based usage tracking.

Quick Example

bash
curl -X POST https://pii-firewallproxy-production.up.railway.app/detect \
  -H "Authorization: Bearer pf_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"text": "Contact Alice at alice@corp.com or +1-800-555-0100"}'

Response:

json
{
  "detections": [
    { "type": "NAME", "value": "Alice", "start": 8, "end": 13 },
    { "type": "EMAIL", "value": "alice@corp.com", "start": 17, "end": 31 },
    { "type": "PHONE", "value": "+1-800-555-0100", "start": 35, "end": 50 }
  ],
  "count": 3
}

Plans & API Call Limits

PlanAPI calls / month
Free300
Starter10,000
Business100,000
EnterpriseUnlimited

See Plans & Feature Limits for the full breakdown.

Privacy by Design.