# pyobfus-mcp

Hands your agent nine pyobfus tools: risk scanning, config generation, obfuscation with a self-check, and traceback decoding. Useful when Python code leaves your machine.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 11
- Author: zhurong2020
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/zhurong2020/pyobfus/tree/HEAD/pyobfus_mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/pyobfus-mcp

## What it does

The server plugs into any client that speaks Model Context Protocol. Nine tools sit inside. `protect_project` runs the whole chain in one call: it scans for risks, picks a framework-aware preset, obfuscates, then compiles the result and smoke-tests the import in separate subprocesses, reporting `verified` and `confidence`. A private `mapping.json` is written next to the output, never into it.

Other tools cover single steps. `check_obfuscation_risks` looks for `eval`/`exec` and dynamic attribute access, `generate_pyobfus_config` produces `pyobfus.yaml`, `unmap_stack_trace` turns obfuscated names in a production traceback back into readable ones, and `check_delivery` inspects a build directory or `.whl` for a leaked key or original sources. `list_presets`, `explain_preset`, `recommend_tier` and `start_pro_trial` help you choose a mode.

Because `verify_cmd` in `protect_project` runs an arbitrary command, it stays off until you set `PYOBFUS_MCP_ALLOW_VERIFY_CMD=1`. Dependency-name checks against public PyPI are opt-in too — outbound network access is closed unless you pass `verify_dependencies_online=true`. `check_delivery` needs pyobfus >=0.7.1; on an older core it returns `FeatureUnavailable`.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add pyobfus-mcp -- uvx pyobfus-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyobfus-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add pyobfus_mcp -- uvx pyobfus-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyobfus-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "pyobfus_mcp": {
            "command": "uvx",
            "args": [
                "pyobfus-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyobfus-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "pyobfus_mcp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "pyobfus-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyobfus-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add pyobfus_mcp uvx pyobfus-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyobfus-mcp <command>

## When to use it
- scan a project for `eval` and reflection before obfuscating
- produce a `pyobfus.yaml` for FastAPI without hand-tuning options
- confirm the obfuscated code compiles and imports
- decode identifiers in a production stack trace from `mapping.json`
- catch a key or original source left inside a distribution

## Example prompts
- Check `/Users/me/code/my-api` for obfuscation risks and suggest a preset
- Generate `pyobfus.yaml` for this project and write it to disk
- Here is a traceback from prod — reverse the names using `mapping.json`

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [mcp](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — MCP server · ★ 12109
- [Robin: AI-Powered Dark Web OSINT](https://affpapa.org/en/nevibecode/mcp/robin-ai-powered-dark-web-osint.md) — MCP server · ★ 7658
- [jshookmcp](https://affpapa.org/en/nevibecode/mcp/jshookmcp.md) — MCP server · ★ 2061
- [OpenOSINT](https://affpapa.org/en/nevibecode/mcp/openosint.md) — MCP server · ★ 1802

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
