balmas-mcp
v0.3.0
Published
BALMAS anonymization gateway for AI agents (MCP server): agents get cleaned copies of your documents — names, IDs, phones, companies AND secrets (API keys, passwords, private keys) become consistent tokens locally, before any content reaches the agent. Re
Maintainers
Readme
balmas-mcp — anonymization gateway for AI agents
Give your AI agent cleaned copies of your documents instead of the real
thing. Every file the agent reads through this MCP server passes through
BALMAS's deterministic detection engine locally, in this process: names,
Israeli ID numbers, phones, emails, companies, amounts and more are replaced
with consistent tokens (PERSON_001, ID_001…) before any content is
returned. Hebrew and English.
This is the technical enforcement of the permission-minimization approach recommended by Israel's Privacy Protection Authority for AI agents:
- Read-only by design — the server exposes no write tools at all.
- Folder allowlist — the agent can only reach folders you list explicitly.
- Content minimization — not just which files, but what's inside them.
- Secrets covered — API keys, JWTs, private-key blocks,
password:values and.envcredentials becomeSECRET_001at every level, and are never restored back into free text. - Zero cloud — detection runs in this local process; nothing is uploaded.
- Session-consistent tokens — the same person is
PERSON_001in every file, so the agent's reasoning stays coherent across documents. - Round-trip —
restore_textputs the real values back into the agent's final answer, locally.
Install (Claude Desktop example)
- Create a free account at balmasai.com/signup (every plan works — free includes 10 documents/month).
- Create an API key (
bk_...) at balmasai.com/app/team. - Add the server to your client config:
{
"mcpServers": {
"balmas": {
"command": "npx",
"args": ["-y", "balmas-mcp", "/Users/me/Documents/work", "--level", "strict"],
"env": { "BALMAS_API_KEY": "bk_..." }
}
}
}Any MCP-compatible client (Claude Desktop, Cursor, etc.) works the same way:
point it at balmas-mcp with the folders you allow.
Options
- Positional arguments: allowed folders (at least one, required).
--level standard|strict|maximum— which categories are replaced (defaultstrict: personal + financial + organizational data).--key bk_...— BALMAS API key (or theBALMAS_API_KEYenv var, required).
Metering & privacy
Each file the agent reads counts as one document against your account's monthly quota (free 10 / PRO 200 / TEAM 1,000 — resets on the 1st). Metering sends anonymous counters only (file type, item counts): never file contents, never file names, never paths. All detection and replacement run in this local process.
Tools
| Tool | What it does |
|---|---|
| list_files | Names, sizes and types inside allowed folders — never contents |
| read_clean_file | The file's text after local anonymization |
| restore_text | Real values back into the agent's output (session tokens only) |
Supported inputs: txt, csv, md, docx, xlsx, pptx, pdf (text
layer; scanned PDFs → use the OCR flow at balmasai.com/clean).
Honest limits
Detection is deterministic (patterns + lexicons + checksums), excellent but not clairvoyant — review output where the stakes demand it. And the gateway only helps if the agent reads files through it: grant it instead of raw filesystem access, not alongside.
Built by BALMAS AI — sensitive data stops here.
