Local-first privacy MCP server for sensitive AI workflows
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
SecuRedact is a local-first privacy and security layer for AI agents and AI workflows. It detects and protects sensitive data β personal data / PII, GDPR-sensitive information, credentials, API keys, tokens, secrets, and sensitive files β before that data reaches models, tools, files, or external destinations.
SecuRedact MCP is the Apache-2.0 open-source MCP server and reusable Python privacy engine. It detects sensitive text, applies versioned policies, redacts locally, and validates residual output before marking sanitized content approved.
MCP mode does not automatically intercept every prompt. The host must invoke the tool and send only
sanitized_textwhenstatus == "ok"; a misconfigured or malicious MCP host can bypass that ordinary MCP workflow. Provider-native enforced hooks are separate integration assets: when a supported provider invokes such a hook at its prompt lifecycle boundary, it can apply the same deterministic decision before normal model processing. See SecuRedact Enforced.
AI agents increasingly read files, call tools, and send prompts to external models. That exposes PII, credentials, and sensitive documents unless something checks the data first. SecuRedact is a privacy and security control for AI workflows:
.env.SecuRedact helps reduce exposure of sensitive data; it is not a guarantee of compliance or a claim that every leak is prevented. See Limitations.
Install from PyPI and run the guided setup (Windows):
Linux / macOS:
Protect a piece of text in seconds (deterministic-only demo, no model needed):
Reproducible synthetic security demos: docs/distribution/security-demo.md.
Use prepare_for_external_ai for normal external-AI preparation:
Approved response:
review_required and blocked responses never contain approved
sanitized_text. Minimal responses contain no original text, raw entity values,
mapping, exception body, stack trace, model path, or restoration handle unless
restore_capable was explicitly selected.
The server has no provider clients, OpenAI-compatible proxy, reverse proxy, website, desktop chatbot, provider credentials, or provider-specific forwarding. See ADR 0001 and the threat model.
| Tool | Intended use | Sensitive-response behavior |
|---|---|---|
prepare_for_external_ai | Recommended complete safe workflow | Minimal by default |
analyze_text | Lower-level local analysis/review | Minimal; offsets in review; raw values only in enabled debug mode |
redact_text | Lower-level compatibility operation | Minimal by default; explicit legacy mode is sensitive and deprecated |
restore_text | Consume a local opaque session | Single-use by default; direct mappings require explicit trusted legacy mode |
create_safe_copy | Write approved .txt/.md content under one configured root | Returns no mapping or absolute path |
securedact_read_file | Safely read a local file and return only sanitized text | Blocks protected paths before reading; rejects traversal/symlink/binary; minimal by default |
Response modes are minimal, review, debug, and restore_capable. Debug is
disabled unless the process was started with
SECUREDACT_ENABLE_DEBUG_RESPONSES=1; an MCP request cannot enable it. In-memory
restoration sessions use cryptographic random handles, bounded capacity,
expiration, concurrency protection, and single-use consumption. Process exit
destroys all sessions.
See MCP tools, response privacy, and restoration sessions.
Python >=3.12,<3.13 is supported.
For a normal installation from PyPI:
On Linux or macOS, use python3.12 -m pip install "securedact-mcp[ml]";
python -m pip install "securedact-mcp[ml]" is also appropriate when python
already selects a supported 3.12 environment.
setup checks the package, Python and ML dependencies, inspects local model
state, offers the existing consent-based model installer, runs the existing
offline verifier, and offers the packaged Claude Code and Gemini CLI
integrations when those hosts are detected. It uses the providers' official
plugin/extension commands and is safe to rerun. It does not call a provider
model API, accept provider trust automatically, or download a contextual model
unless the user explicitly selects model setup and accepts the existing
upstream prompt.
Manual model commands remain available for advanced or unattended operation:
The last command starts a local stdio server. Standard output is reserved for
MCP protocol messages. securedact-mcp setup --non-interactive reports state
without implying upstream acceptance or configuring a new provider. Use
--host claude, --host gemini, or --host all for targeted interactive
provider setup.
To work from a reviewed source checkout instead:
No model checkpoint is included in the repository or wheel, and startup never downloads one. Securedact does not redistribute these model weights. Upstream model weights retain their own licenses and are not relicensed by Apache-2.0. See model installation and third-party licenses.
Deterministic-only local development must be explicitly selected:
Production defaults to requiring contextual capability and fails closed while a configured model is missing, loading, corrupt, or unavailable.
Tested configuration assets and safe-workflow instructions are under
integrations/ for Codex, Cursor, and Windsurf. The automated MCP client harness
validates server startup, tool listing, calls, minimal response shape, stdout
integrity, and shutdown. It does not prove that a real host invokes the tool for
every prompt. See the compatibility evidence.
The repository is also a Gemini CLI extension root: gemini extensions install https://github.com/GigantesHJI/securedact-mcp can install the hooks. The
gemini-cli-extension topic and a release whose tag tree contains the root
manifest are required for that path to resolve; without pip install "securedact-mcp[ml]" and the local models the installed hooks do not enforce
anything. See SecuRedact Enforced.
Built-ins include default, strict_external_ai, gdpr, identifiers_only,
and review_all_contextual; compatibility policies remain available. Local
organization policy files load only from the controlled policy directory, use a
strict declarative schema, and cannot disable fail-closed invariants. Unknown,
duplicate, oversized, malformed, or symlinked policies fail closed.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/securedact-mcp)<a href="https://allmcps.com/mcp/securedact-mcp"><img src="https://allmcps.com/api/badge/securedact-mcp?style=directory" alt="Securedact MCP on AllMCPs" /></a>