Obfuscator
FreeNot checkedMCP server that obfuscates source-file identifiers before sending to Claude Code and restores them on writeback, protecting sensitive naming.
About
MCP server that obfuscates source-file identifiers before sending to Claude Code and restores them on writeback, protecting sensitive naming.
README
Local MCP server that obfuscates source-file identifiers before Claude Code sees them, and restores the originals on writeback. Business-named identifiers never reach Anthropic in their original form.
Setup
1. Clone and build
Requires Node 20+.
git clone <repo-url> ~/tools/mcp-obfuscator
cd ~/tools/mcp-obfuscator
npm ci
npm run build
2. Per-project .mcp.json
In every workspace where you want the obfuscator active, create .mcp.json at the workspace root:
{
"mcpServers": {
"obfuscator": {
"command": "node",
"args": ["/absolute/path/to/mcp-obfuscator/dist/server.js"]
}
}
}
Replace the path with your clone location. Add .mcp.json to your project's .gitignore (the path is machine-local).
3. User-wide ~/.claude/settings.json
Merge these blocks into your existing settings (create the file if it doesn't exist):
{
"hooks": {
"PreToolUse": [{
"matcher": "Read|Write|Edit|MultiEdit|Grep|Bash",
"hooks": [{
"type": "command",
"command": "node /absolute/path/to/mcp-obfuscator/hooks/redirect-to-obfuscator.mjs"
}]
}]
},
"permissions": {
"allow": [
"Read", "Write", "Edit", "MultiEdit", "Grep", "Bash",
"mcp__obfuscator__read_obfuscated",
"mcp__obfuscator__read_redacted",
"mcp__obfuscator__write_deobfuscated"
]
}
}
Replace the path with your clone location.
4. Restart Claude Code
Full quit + relaunch (CLI), or Developer: Reload Window in the VS Code extension.
5. Verify
In the Claude Code chat:
/mcp
You should see obfuscator listed with three tools. Then ask Claude to read a .ts file from your project. The response should contain x_…-style tokens, not your real identifier names. The map is at ~/.mcp-obfuscator/map.json.
Updating
cd ~/tools/mcp-obfuscator
git pull
npm ci
npm run build
Restart Claude Code. The on-disk config and map auto-migrate.
Dashboard (optional)
Live pipeline view of every read/write:
node debug/server.mjs
Open http://localhost:7890. To stream events to it, add this to your .mcp.json under the obfuscator entry:
"env": { "MCP_OBFUSCATOR_DEBUG_URL": "http://localhost:7890/events" }
Configuration
~/.mcp-obfuscator/config.json is created on first run with safe defaults. Notable flags:
| Flag | Default | Effect |
|---|---|---|
obfuscateAllPropertyKeys |
true |
Rename every member-access and object-literal key |
obfuscateStringWords |
true |
Auto-tokenize identifier-like words inside strings |
obfuscateLoadBearingStrings |
true |
Tokenize args to fs / router / SQL / JSX-attr callees |
obfuscateLocalPaths |
true |
Tokenize path segments in import './foo' specifiers |
redactSecrets |
true |
Replace AWS / GitHub / JWT / etc. with <REDACTED_*> tokens |
redactPII |
false |
Opt-in for emails / SSNs |
stripComments |
true |
Strip comments from output |
stringReplacementMinLength |
3 |
Minimum word length for string-content tokenization |
Edit and restart Claude Code to apply. Full schema and per-flag docs in src/types.ts.
What it does NOT protect
- Your chat messages to Claude (sent verbatim to Anthropic)
- Comments on disk (only stripped when read; still visible to anyone with the file)
- Third-party API contracts: npm package names, OAuth URL shapes, SDK method names — these have to match upstream
- Code structure and control flow (obfuscation hides names, not logic)
- File paths in tool-call arguments (those are inputs, not server outputs)
For full coverage, complement with:
- ESLint rules forbidding inline URLs and hardcoded paths outside dedicated constants files
- A separate hook-based redactor for chat prompts and terminal output
State files
Under ~/.mcp-obfuscator/ (override via MCP_OBFUSCATOR_DIR env var):
config.json— your tunable settings.map.json— the full identifier map. Sensitive. Anyone with this file plus a Claude transcript can reverse every obfuscation. POSIX permissions are0600; on Windows, your user-profile ACL applies.unmapped-identifiers.log— append-only log of names Claude introduced that weren't in the map. Also sensitive.archives/— timestamped backups whenreset_mapruns.
Do not commit any of these. Do not sync to cloud storage that's outside your security perimeter.
License
See LICENSE.
Installing Obfuscator
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/jhgit0219/mcp-obfuscatorFAQ
Is Obfuscator MCP free?
Yes, Obfuscator MCP is free — one-click install via Unyly at no cost.
Does Obfuscator need an API key?
No, Obfuscator runs without API keys or environment variables.
Is Obfuscator hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Obfuscator in Claude Desktop, Claude Code or Cursor?
Open Obfuscator on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Obfuscator with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
