Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Obfuscator

БесплатноНе проверен

MCP server that obfuscates source-file identifiers before sending to Claude Code and restores them on writeback, protecting sensitive naming.

GitHubEmbed

Описание

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 are 0600; 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 when reset_map runs.

Do not commit any of these. Do not sync to cloud storage that's outside your security perimeter.

License

See LICENSE.

from github.com/jhgit0219/mcp-obfuscator

Установка Obfuscator

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/jhgit0219/mcp-obfuscator

FAQ

Obfuscator MCP бесплатный?

Да, Obfuscator MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Obfuscator?

Нет, Obfuscator работает без API-ключей и переменных окружения.

Obfuscator — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Obfuscator в Claude Desktop, Claude Code или Cursor?

Открой Obfuscator на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Compare Obfuscator with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории development