Strac MCP DLP — Claude Code MCP server: setup and use
Checks text and files for PII, PHI, PCI data, and secrets before an AI agent receives them. Useful for sanitising prompts, tickets, and documents.
claude mcp add --env STRAC_API_KEY=<STRAC_API_KEY> --env STRAC_API_BASE=<STRAC_API_BASE> --env STRAC_API_TIMEOUT=<STRAC_API_TIMEOUT> --transport stdio strac-mcp-dlp -- uvx strac-mcp-dlpWhat Strac MCP DLP does
Strac MCP DLP exposes Strac’s data-loss prevention checks through MCP. redact_text returns sanitised text with detected categories, while detect_sensitive_data scans without altering the input. File tools inspect images, PDFs, scans, configuration files, and source code; redact_file writes a separate cleaned copy and leaves the original intact.
The package is a thin API client, so detection and redaction run on Strac’s side. Redaction can use REDACTED, BLANK, MASK_SEVEN_X, or TOKEN_LINK_PLAINTEXT. detokenize resolves vault tokens for authorised callers, but live use requires a server key tied to an approved IP and allows at most 10 token IDs per call.
Set STRAC_API_KEY and run the server with uvx strac-mcp-dlp. Without that key, it cannot call Strac. STRAC_API_BASE and STRAC_API_TIMEOUT are available as client environment settings when required.
What it helps with
- sanitize text before an agent receives it
- scan content for PII, PHI, PCI data, or secrets
- inspect a PDF, image, or scan with OCR
- save a redacted file without changing the source
Example prompts for the agent
- Use Strac to remove sensitive values from this text before I send it to the ticket.
- Scan
./w2.pdfwith Strac and report the data categories you find without changing the file. - Create a sanitised copy of
./config.yamland save it as./config.redacted.yaml.
How to install Strac MCP DLP
Platform CLI
claude mcp add --env STRAC_API_KEY=<STRAC_API_KEY> --env STRAC_API_BASE=<STRAC_API_BASE> --env STRAC_API_TIMEOUT=<STRAC_API_TIMEOUT> --transport stdio strac-mcp-dlp -- uvx strac-mcp-dlpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from strac-mcp-dlp <command>
Platform CLI
codex mcp add strac-mcp-dlp --env STRAC_API_KEY=<STRAC_API_KEY> --env STRAC_API_BASE=<STRAC_API_BASE> --env STRAC_API_TIMEOUT=<STRAC_API_TIMEOUT> -- uvx strac-mcp-dlpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from strac-mcp-dlp <command>
Config file
{
"mcpServers": {
"strac-mcp-dlp": {
"command": "uvx",
"args": [
"strac-mcp-dlp"
],
"env": {
"STRAC_API_KEY": "<STRAC_API_KEY>",
"STRAC_API_BASE": "<STRAC_API_BASE>",
"STRAC_API_TIMEOUT": "<STRAC_API_TIMEOUT>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from strac-mcp-dlp <command>
Config file
{
"servers": {
"strac-mcp-dlp": {
"type": "stdio",
"command": "uvx",
"args": [
"strac-mcp-dlp"
],
"env": {
"STRAC_API_KEY": "<STRAC_API_KEY>",
"STRAC_API_BASE": "<STRAC_API_BASE>",
"STRAC_API_TIMEOUT": "<STRAC_API_TIMEOUT>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from strac-mcp-dlp <command>
Platform CLI
gemini mcp add -e STRAC_API_KEY=<STRAC_API_KEY> -e STRAC_API_BASE=<STRAC_API_BASE> -e STRAC_API_TIMEOUT=<STRAC_API_TIMEOUT> strac-mcp-dlp uvx strac-mcp-dlpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from strac-mcp-dlp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Strac MCP DLP
How do I install Strac MCP DLP in Claude Code?
Run claude mcp add strac-mcp-dlp -e STRAC_API_KEY=<STRAC_API_KEY> -- uvx strac-mcp-dlp.
What does Strac MCP DLP do?
It scans text and local files for sensitive data, can return a cleaned version, and places that check before the agent receives the content.
What is required to run Strac MCP DLP?
Provide a Strac API key through STRAC_API_KEY and make uvx available. The service performs detection and redaction through the Strac API.