MCP Presidio Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Presidio Serveranonymize the password 'mySecret123' in this session"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Presidio Server (Anonymize/Deanonymize)
This project exposes the same functionality via MCP tools and FastAPI endpoints.
Quickstart
python -m venv .venv && source .venv/bin/activate # on Windows: .venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reloadEndpoints
POST /session->{ "session_id": "<uuid>" }POST /anonymizebody:
{
"session_id": "uuid",
"messages": [{"content": "Secret is 123, password=foo"}]
}returns anonymized messages and stores mapping for the session.
POST /deanonymizebody:
{
"session_id": "uuid",
"text": "<<CUSTOM_TOKEN_0>> is 123, <<pass_pattern_...>>"
}MCP server
Run the stdio MCP server:
python mcp_server/server.pyRegister it in your MCP-compatible client pointing to this command.
Notes
Storage uses SQLite at
app/data.dbwith tablessessionsandmappings.Custom patterns mirror the code you provided; add more Presidio recognizers as needed.
Placeholders look like
<<ENTITY_#>>and are reversible persession_id.
This server cannot be deployed
Maintenance
Related MCP Connectors
Detect and redact PII and secrets before text reaches an LLM, with reversible placeholders.
Detect and redact PII and secrets (API keys, tokens) in text, HTML or PDF before it reaches an LLM.
Detects and redacts PII (emails, phones, SSNs, names, addresses) from text. $0.02/call via x402.
Find and redact leaked secrets, wallet keys and PII before an AI agent sends text.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables PII detection and anonymization using Microsoft Presidio with tools, resources, and prompts via MCP.MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to mask sensitive personal data and project directories before sending to AI, then unmask responses to restore original values using configurable swap sessions.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables local grammar-preserving masking of sensitive content, entities, and code identifiers into synthetic tokens before sending prompts to LLMs, then restores the original text and symbols from responses using session-scoped in-memory mappings.1Apache 2.0
- AlicenseAqualityCmaintenanceEnables local, in-memory de-identification of PII, PHI, and credentials with deterministic reversible surrogate tokens before LLM transmission, then restores originals from volatile session mappings and audits for exposures without network egress or disk writes.547 npmApache 2.0