MCP Presidio Server (Anonymize/Deanonymize)
This project exposes the same functionality via MCP tools and FastAPI endpoints.
Quickstart
Endpoints
POST /session
->{ "session_id": "<uuid>" }
POST /anonymize
body:
returns anonymized messages and stores mapping for the session.
POST /deanonymize
body:
MCP server
Run the stdio MCP server:
Register it in your MCP-compatible client pointing to this command.
Notes
- Storage uses SQLite at
app/data.db
with tablessessions
andmappings
. - 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 installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables anonymization and deanonymization of sensitive data in text using Microsoft Presidio. Supports session-based storage to reversibly replace sensitive information like passwords and secrets with placeholder tokens.