Apache-2.0Open source · no telemetry · self-hosted
See what your agents send. Keep the secrets home.
Cloak is an open-source proxy for coding agents. It logs every model request, masks secrets and personal data before they leave your machine, and audits each session from one dashboard.
- POST /v1/messages200$0.092claude-sonnet-4.6 · 24,880 tok[OPENAI_KEY_1][ANTHROPIC_KEY_1][DATABASE_URI_1]
- POST /v1/chat/completions200$0.078gpt-5.2 · 15,600 tok[CARD_1][IBAN_1]
- POST /v1/chat/completions200localllama3.3:70b · 40,840 tok[EMAIL_1][PHONE_1]
- POST /v1/chat/completions429—gpt-5.2 · 400 tokpassed clean
How it works
Set up in a minute, without changing your workflow
- 01
Install the CLI
One command installs the proxy. No config file to learn, no daemon to babysit — it only runs while you ask it to.
- 02
Point your agent at it
Set one base URL. Cloak forwards every byte unchanged, or rewrites the sensitive ones when masking is on.
- 03
Watch and audit
Sessions stream into the dashboard. Open one to replay every request, the tokens it cost and the secrets it carried.
# 1. run the proxy
npx cloak proxy --mask --port 8787
# 2. point your agent at it
export OPENAI_BASE_URL=http://127.0.0.1:8787/v1
export ANTHROPIC_BASE_URL=http://127.0.0.1:8787
# 3. that's it — sessions stream to your dashboard
npx cloak proxy --mask --log $CLOAK_URL --key $CLOAK_KEYWhat you get
Everything you need to see, mask and justify what your agents send
One proxy, every provider
OpenAI, Anthropic, Ollama and any OpenAI-compatible endpoint. Point your SDK at Cloak and change nothing else — same requests, same streaming.
Masked before they leave
API keys, tokens, emails, cards, IBANs, IPs — plus your own regex. Sensitive values become stable tokens like [EMAIL_1] before the model ever sees them.
A dashboard, not a scrollback
Every request logged with tokens, latency, cost and detections. Replay any session, request by request, and see exactly what left your machine.
Agents that audit themselves
A built-in MCP server exposes get_logs, mask_text and audit_session, so your coding agent can check what it just sent without leaving the terminal.
mask_text()get_logs()audit_session()Cost and drift, visible
Token spend per session, per model, per day. Catch a runaway agent loop before it shows up on the invoice at the end of the month.
Open source and self-hosted
Apache-2.0, no account required, no telemetry. Run it locally or deploy the dashboard to your own server with one Docker command on Coolify.
The masking engine
Secrets become [TOKENS] the model can still reason about
Built-in patterns for keys, tokens, cards, IBANs, emails and IPs, plus your own regex. The same value always maps to the same token, so nothing breaks. Edit the text on the left — it runs locally.
Runs locally in your browser. Nothing here is sent anywhere.
User report — please summarise before I paste it to the model. Account: [EMAIL_1] (preferred contact) Card on file: [CARD_1] IBAN: [IBAN_1] 00 OPENAI_API_KEY=[OPENAI_KEY_1] Authorization: Bearer [JWT_1] Postgres: [DATABASE_URI_1]
Why it matters
A request carries more than your prompt
The system prompt, the tools array and every file the agent read along the way. When it opens a .env, those keys go to the model too — often with nothing in the session to tell you.
| In a normal session | With Cloak |
|---|---|
| Guesswork | Full request log |
| Sent to the model | Masked or blocked |
| End-of-month invoice | Live, per request |
| Nothing | Exportable audit trail |
| Trust the client | Your machine or your server |
Rows describe the difference in visibility, not a guarantee.
Model Context Protocol
Agents that can audit themselves
Cloak ships an MCP server. Point your agent at it and it can check what it just sent, mask a value before a request, or summarise a session — without you leaving the terminal.
mask_textReturn the masked version of any text, with detections.get_logsList recent proxied requests, filtered by provider or session.audit_sessionSummarise one session: tokens, cost and a risk score.
{
"mcpServers": {
"cloak": {
"url": "https://your-cloak.app/mcp"
}
}
}Pricing
Open source forever. Hosted when you want it handled.
The tool is free and self-hostable. The hosted plan is for teams who want the dashboard managed for them, billed per seat, with no usage caps per event.
Open source
The full CLI and dashboard, on your machine.
- Multi-provider proxy (OpenAI, Anthropic, Ollama)
- Masking engine: built-in patterns + your own regex
- Dashboard with logs, stats and session replay
- MCP server for coding agents
- Self-host with Docker or Coolify
- Apache-2.0, no telemetry, no account
Cloud
14-day trialThe hosted dashboard, managed for your team.
- Everything in Open source, hosted and updated for you
- Unlimited usage — no request or seat caps per event
- Team workspaces and shared audit trail
- 90-day log retention with CSV / JSON export
- Priority support from a human
- One-click deploy, TLS and backups included
Paying yearly? See every plan detail.
FAQ
Straight answers, including the limits
Cloak is a guard, not a data-loss-prevention boundary. If a question isn't here, the source is on GitHub — read it.
See what your agents actually send
Run the proxy locally in a minute. No account needed to try it, and the whole tool is open source.