Redact a local file
redact_fileRead local text files, replace secrets like API keys, tokens, passwords, and keys with [REDACTED], and return a findings summary to keep sensitive values out of model context.
Instructions
Reads a local text file on this machine and returns its content with secrets (API keys, tokens, passwords, private keys, connection-string credentials, JWTs, cookies) replaced by [REDACTED], plus a findings summary (type, count, line numbers). The original values are read inside the local MCP server process only and are never returned, so use this instead of Read or cat for .env files, config files, logs, key files and similar. Pass a path, not file contents. Only regular files are accepted (no directories, pipes or devices), up to 1 MiB, and binary files are refused. The response starts with a notice that the original values did not leave the machine or reach the model. Redaction is heuristic and can miss custom formats.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path of the local text file to read (absolute, relative to the server working directory, or starting with ~/). |