pyobfusBLOCK
AST-based Python obfuscator with reverse stack-trace mapping — obfuscate before shipping and keep production tracebacks AI-debuggable. MCP + VS Code.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Obfuscate Python before you ship it—and still debug what you shipped.
简体中文 · Product · Documentation · PyPI
[](https://pypi.org/project/pyobfus/) [](https://pypi.org/project/pyobfus/) [](https://pyobfus.readthedocs.io/en/latest/) -blue.svg) [](https://www.python.org/downloads/) [](https://www.bestpractices.dev/projects/12788) [](https://doi.org/10.5281/zenodo.20846053)
pyobfus is a local-first, AST-based Python obfuscator for Python 3.9–3.14. It handles complete projects, keeps generated output portable, and can reverse-map protected production tracebacks for developers and AI coding agents. Community is Apache-2.0, has no file or line limits, and requires no trial.
What's new in v0.6.1: fixes two bugs where the build succeeded but the output failed when run. Directory builds brokefrom pkg import f as g(NameError), and single-file builds renamed parameters without updating keyword calls (TypeError, or arguments silently bound wrong).
d13fd24b3087OBSERVED · 2026-10-10Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add pyobfus-mcp -- None pyobfus-mcp==0.3.12
Trust audit
BLOCKgrade F · trust 35/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | FAIL |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (3 observation(s))
- Network
- declared (6 observation(s))
- Shell
- declared (4 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (25)
self._add_unsafe_deserialization(node, "pickle.load()")
self._add_unsafe_deserialization(node, "pickle.loads()")
code = marshal.loads(plaintext) # noqa: S302
- `verified: false` / `status: "warnings"` → **do NOT tell the user it's
source at close to their normal accuracy. Do not tell the user this makes
```bibtex
```
"importlib.import_module(sys.argv[2])"
"TracerPid, IsDebuggerPresent, timing skew (Pro).",
"DATABASE_URL": "postgres://user:pw@host/db",
api_key = "MEDICAL_API_KEY_12345" # This should be encrypted!
SECRET = "abcdefghijklmnopqrstuvwxyz0123456789ABCD"
password = "hunter2_long_enough_to_trigger_the_pattern_match_x"
password = "fake_long_test_password_for_pattern_match_iiii_jjjj_x"
assert priv.startswith(b"-----BEGIN PRIVATE KEY-----")
{"args": [], "expect": "Bearer sk_live_7f3d9a2b8c1e4f60"},"api_token": "sk_live_7f3d9a2b8c1e4f60",
.env.stripe.example
.readthedocs.yaml
.vscode-test.mjs
.vscodeignore
assert "apply_discount" not in _code_names(marshal.loads(archive.extract("app")))return __import__(module_name)
exec(compile(source, str(self.path), "exec"), module.__dict__)
exec(obfuscated_code, exec_globals)
Gates applied: instruction_override, no_behavioural_pass.
d13fd24b3087full audit observations/trust-audit/mcp-server/zhurong2020__pyobfus.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-10 | d13fd24b3087 | BLOCK | F | 35 | first audit |
Questions
What is the pyobfus MCP server?
AST-based Python obfuscator with reverse stack-trace mapping — obfuscate before shipping and keep production tracebacks AI-debuggable. MCP + VS Code.
Is pyobfus safe to connect to an agent?
No — not without reading the findings first. The audit graded it F (35/100) and found 7 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What credentials does pyobfus need?
It reads ANTHROPIC_API_KEY and PYOBFUS_LICENSE_SECRET from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does pyobfus run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as pyobfus at 0.4.3.
How current is this page?
The grade is for one exact copy of the source (d13fd24b3087), read on 2026-10-10. The repository is watched and re-audited when it changes.