pyobfus-mcp

v0.3.17
io.github.zhurong2020/pyobfus-mcp Checked 14 hours ago Published 1 month ago

9 local Python protection tools, delivery checks and traceback reverse mapping.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

protect_project

One call to protect a Python project end-to-end AND verify it still works: scans risks, picks a framework-aware preset, obfuscates, then byte-compiles + import-smoke-tests the output in isolated subprocesses and returns verified:true/false. Writes a private de-obfuscation mapping alongside (not inside) the output. Use this when the user wants to 'protect/obfuscate before shipping' and expects a green check, not just a transform.

ParameterTypeDescription
path *string
output_dirstring
preset
save_mappingboolean
timeoutinteger
trace_markerboolean
verifyboolean
verify_cmd

check_obfuscation_risks

Scan a Python project for patterns that may break obfuscation (eval/exec, dynamic attribute access, framework reflection, unsafe model loading). Returns severity counts, detected frameworks (FastAPI/Django/Flask/Pydantic/Click/SQLAlchemy/ML), and a suggested preset. Also locates requirements*.txt / pyproject.toml and, only if verify_dependencies_online=true, checks each declared dependency against public PyPI to flag AI-hallucinated ('slopsquatting') package names -- off by default, this tool makes no outbound network calls unless you opt in. By default the scan honors the project's pyobfus co…

ParameterTypeDescription
path *string
use_project_configboolean
verify_dependencies_onlineboolean

generate_pyobfus_config

Generate a pyobfus.yaml for a Python project. Auto-detects frameworks and applies the matching preset. By default returns the YAML text without writing to disk; set write=true to persist.

ParameterTypeDescription
path *string
preset_override
writeboolean

unmap_stack_trace

Reverse obfuscated identifiers in a stack trace using a pyobfus mapping.json. Accepts the trace as plain text and the path to a mapping file produced by --save-mapping.

ParameterTypeDescription
mapping_path *string
trace *string

check_delivery

Check an output directory or .whl right before shipping: fails on a pyobfus mapping file, a private key or an original source file inside it, and warns about Python files the build did not produce or Pro options the build skipped. Pass the build's --build-report and --provenance-manifest JSON for the full check. Read-only: files are hashed, never imported or executed, and contents are not returned.

ParameterTypeDescription
path *string
build_report
provenance_manifest

list_presets

List every pyobfus preset available, grouped by tier (community / framework-aware / Pro).

explain_preset

Describe what a named preset changes: exclude names count, exclude patterns, preserve_param_names, docstring handling. For Pro presets, returns full pro_unlock metadata (trial command, checkout URL, price, money-back guarantee).

ParameterTypeDescription
name *string

recommend_tier

Analyze a Python project and recommend pyobfus tier (community vs Pro) with reasons. Combines a preflight scan with a sensitive-string-literal heuristic. Returns free_action and pro_action with concrete next-step commands.

ParameterTypeDescription
path *string

start_pro_trial

Return structured guidance for starting the 5-day pyobfus Pro trial. Does NOT invoke the side effect — the user runs `pyobfus-trial start` in their shell. Detects whether a trial is already active and surfaces the appropriate next step plus post-trial purchase URL.