Run Python from an MCP client with no shell quoting in the way
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"py-exec-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# py-exec-mcp **Run Python from an MCP client without a shell mangling your code.** [](https://github.com/blurxy/py-exec-mcp/actions/workflows/ci.yml) [](https://pypi.org/project/py-exec-mcp/) [](https://pypi.org/project/py-exec-mcp/) [](LICENSE) --- ## The problem Ask an agent to run a one-liner and it reaches for `python -c "..."`. That code passes through **three parsers** before Python ever sees it — the shell, argv splitting, then Python itself — each with its own escaping rules. ```bash python -c "print(f'he said \"hi {name}\"')" # which layer eats which quote? ``` The failure mode is what makes this worth fixing: **you usually get a wrong answer, not an error.** A backslash vanishes, a quote closes early, an f-string silently becomes a literal — and the output looks plausible. So the agent retries with different escaping, or falls back to writing a temp file and running it, every single time. ## The fix Code arrives as a JSON string in the MCP tool call and is handed to the interpreter over **stdin** (`python -`). No shell. No argv. Nothing re-parses it. Write the code exactly as it would appear in a `.py` file — nested quotes, f-strings, backslashes, regex, triple-quoted blocks — and it arrives verbatim. ## Install ```bash uvx py-exec-mcp # no install pip install py-exec-mcp # or the usual way uvx --from git+https://github.com/blurxy/py-exec-mcp py-exec-mcp # straight from main ``` Works on **both MCP SDK majors** — 2.x renamed `FastMCP` to `MCPServer`, and the server binds whichever one your environment has, so you are not forced to pin the SDK to match it. Needs `mcp>=1.19`. ## Configure <details open> <summary><b>Claude Code</b> — <code>.mcp.json</code> in your project root…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.