Claude Code integration
Keep secrets and customer data out of Claude Code
- User prompts: blocked when they contain a secret or a blocked data type
- Bash, WebFetch, Write and Edit tool input and output
- MCP tool calls (mcp__*)
- Your organization's rules and Exact Data Match lists
Claude Code reads your files, runs shell commands and fetches pages on its own. One cat of a .env file and the credentials are part of the next request to the model.
The maskflare-hook command plugs into Claude Code's hooks. It blocks a prompt that contains a match, and masks the input and output of Bash, WebFetch, Write, Edit and mcp__* tools using your Maskflare rules, including 232 credential formats.
Set up Claude Code with Maskflare
Maskflare installs into Claude Code's hook system. Prompts with secrets are stopped, and tool input and output is masked before it returns to the model.
pip install maskflare
maskflare-hook install claude-code
# reads MASKFLARE_API_KEY from the environmentWhat gets masked
- User prompts: blocked when they contain a secret or a blocked data type
- Bash, WebFetch, Write and Edit tool input and output
- MCP tool calls (mcp__*)
- Your organization's rules and Exact Data Match lists
Good to know
- Install the hook in your devcontainer or base image to cover every developer.
- MCP servers Claude Code connects to can also be routed through the gateway's /v1/mcp/{server} route.
Frequently asked questions
What does a developer see when a prompt is blocked?
A short message naming the rule that matched, never the secret itself.
Does it slow Claude Code down?
Masking adds a few milliseconds per call with the default rules, which is small next to model latency.
Does it work with Claude Code on the web?
The hook runs where Claude Code runs with hooks enabled, typically the developer's machine or a devcontainer.
Other integrations
See it on your own data
Try Maskflare free.
Bring your hardest prompts.
28-day free trial or 10,000 requests, whichever comes first. Point one app at the gateway or enroll a few laptops,
and watch what gets masked. Or talk to us first.
- SOC 2 Type II: In progress
- ISO 27001: In progress
- EU hosting by default · on-premises available
- Prompts and files never stored
- Never used to train AI models
- GDPR · nDSG · DPA available
- Trust center →