maisecrets

Keeps passwords, tokens and personal data out of Claude Code and Codex. A value becomes a placeholder before the
model sees it, and goes back in on your machine only where a command or a file needs it. No model, no download, no
package: Python's standard library only (the optional name service, /maisecrets ner local, downloads a container of
about 690 MB). Install takes two commands.

Claude works with the placeholders. The real value goes back in only when a command or a tool call runs on your
machine, and the output comes back masked again. More examples: What it looks like.
What it does
- Blocks or rewrites a prompt that carries a secret: the model gets a placeholder such as
⟦SECRET_c1⟧, never
the value.
- Masks tool output (files, commands, MCP results) before the model reads it.
- Puts the value back locally when the agent uses the placeholder in a command or a file.
- Checks a value first:
ms:(your value) tells you whether it would be caught, without sending it.
- Finds what leaked before: maisecrets protects from the moment it runs.
/maisecrets:secret-hygiene checks a
repository, its git history and your earlier sessions for secrets that got out before; rotate what it finds.
- Your own rules, terms and imports: team rule folders,
/maisecrets term add Jan Kowalski, values from your
own NER.
- PDFs and images: a PDF goes to the model as masked text only, or you are asked first.
- Local and deterministic: no model, no telemetry, no network request except for a service you set
up: a name service, a gateway, or a server with vault references.
Install
Claude Code (CLI, desktop app, Cowork):
claude plugin marketplace add Mcpgate-de/maisecrets
claude plugin install maisecrets@maisecrets # then start a new session
When Cowork runs in the cloud (a new task on Pro, Max and Ultra) or you use Claude Code on the web or Remote Control,
the prompt you type reaches Anthropic before maisecrets runs: maisecrets keeps the value from the model there, not
from Anthropic's servers. In Claude Code on your own computer, the value does not leave it
(Known gaps).
Codex (CLI, IDE extension, and the Codex agent inside the ChatGPT desktop app):
codex plugin marketplace add https://github.com/Mcpgate-de/maisecrets.git
codex plugin add maisecrets@maisecrets
Then open /hooks in Codex and trust the maisecrets entries. Codex runs no hook of a plugin until you trust it, and it
asks again after each update.
Updates, the install for a team, and what an update does to an open session: docs/ADMIN.md.
Requirements
Python 3.9 or newer on the PATH the client gives its hooks (python3 --version).
The stock python3 of macOS (3.9) is enough; nothing to install on a Mac.
Windows: install Python for all users, as an administrator:
winget install --id Python.Python.3.12 --exact --scope machine. Codex on Windows
runs commands as a sandbox user, and that user cannot start a Python installed for one
person only (docs/CLIENTS.md, "Codex on Windows: the sandbox user"). Linux: your package manager, plus
openssl for the vault and xclip if you want the clipboard. Without it the
plugin blocks every prompt and names the missing piece.
Update and uninstall
Claude Code does not update a marketplace outside Anthropic's by itself, so new sessions keep starting the old
version: turn on auto-update for maisecrets in /plugin under Marketplaces, or fetch it before the update. A
running session keeps its version until it restarts.
claude plugin marketplace update maisecrets # fetch the newest release first
claude plugin update maisecrets@maisecrets # or a new session with an org-synced plugin
claude plugin uninstall maisecrets@maisecrets
codex plugin remove maisecrets@maisecrets
Uninstalling keeps the stored values until their TTL ends. To delete them, the metadata and the logs at once, run
wipe before you uninstall, while the plugin folder is still there (/maisecrets status prints the folder):
bash <plugin folder>/hooks/run.sh wipe --yes