PromptTrap
Open-source MCP server for AI governance visibility
PromptTrap gives security teams visibility into what flows between AI tools and corporate resources — without changing how developers work.
Local-first by default: logs stay on your machine, policies run locally, and you control enforcement.
Built for visibility and governance, not surveillance.
Designed for security teams
- Instrumented MCP server sits between AI clients and tools
- Policy evaluation + DLP scanning on every tool call
- Local dashboard with SQLite-backed audit logs
- Demo mode replays realistic leakage scenarios
AI governance is a visibility problem
Security teams can't govern what they can't see. AI tools are now touching internal files, web data, and databases, but most organizations lack a clear audit trail of those interactions.
PromptTrap closes that blind spot by capturing tool activity at the MCP layer and keeping the data local.
What it does
MCP tool call instrumentation
Logs tool invocations, inputs, outputs, and policy decisions with structured JSON and SQLite.
Policy controls
Allow/deny rules, path restrictions, and domain restrictions enforced before tools run.
DLP scanning
Detects secrets and PII with configurable log, warn, or block actions.
Local dashboard + audit logs
Dashboard reads from SQLite and JSON logs for fast, local observability.
Demo mode
Replays realistic leakage scenarios for screenshots and testing.
MCP compatible
Works with MCP clients like Claude Desktop, Cursor, VS Code/Copilot, and more.
How it works
MCP server sits between AI client and tools
PromptTrap mediates file, web, shell, and database tools so every call can be evaluated and logged.
Local-only by default
Logs live in SQLite and JSON on your machine. No cloud dependency required.
Policy + DLP on every call
Policies can allow, warn, or block; DLP scanning runs on inputs and outputs.
Screenshots
Getting started (under 2 minutes)
Install the MCP server, run it locally, and launch the dashboard and demo.
# Install and run the MCP server
npm install -g prompttrap
PROMPTTRAP_CONFIG=./prompttrap.yaml prompttrap
# Demo + dashboard (from the repo)
git clone https://github.com/PromptTrap/prompttrap-v2
cd prompttrap-v2
npm install
cp prompttrap.example.yaml prompttrap.yaml
npm run demo -w @prompttrap/mcp-server
npm run dashboard -w @prompttrap/mcp-server
# Open http://127.0.0.1:9099
Open source and trust
PromptTrap is open source under the Apache 2.0 license. Visibility is the goal — not surveillance.
Start with logging-only defaults, then opt into enforcement when you're ready.