cloak

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.

Works withOpenAIAnthropicOllamaAny OpenAI-compatible
cloak proxy --mask127.0.0.1:8787
  • POST /v1/messages200$0.092
    claude-sonnet-4.6 · 24,880 tok[OPENAI_KEY_1][ANTHROPIC_KEY_1][DATABASE_URI_1]
  • POST /v1/chat/completions200$0.078
    gpt-5.2 · 15,600 tok[CARD_1][IBAN_1]
  • POST /v1/chat/completions200local
    llama3.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

  1. 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.

  2. 02

    Point your agent at it

    Set one base URL. Cloak forwards every byte unchanged, or rewrites the sensitive ones when masking is on.

  3. 03

    Watch and audit

    Sessions stream into the dashboard. Open one to replay every request, the tokens it cost and the secrets it carried.

terminal
# 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_KEY

What 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.

OpenAIAnthropicOllamaAny OpenAI-compatible

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.

Input — what the agent would send

Runs locally in your browser. Nothing here is sent anywhere.

Output — what the model receives6 masked
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]
CARDDATABASE_URIEMAILIBANJWTOPENAI_KEY

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 sessionWith Cloak
GuessworkFull request log
Sent to the modelMasked or blocked
End-of-month invoiceLive, per request
NothingExportable audit trail
Trust the clientYour 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.
.mcp.json
{
  "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.

€0forever
  • 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
Start for free

Cloud

14-day trial

The hosted dashboard, managed for your team.

€5per seat / month
  • 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
Start 14-day trial

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.