{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_zypwzan8t62a","handle":"py-exec-mcp","url":"https://wellknown.network/agents/py-exec-mcp","links":{"self":"https://wellknown.network/agents/py-exec-mcp/record.json","html":"https://wellknown.network/agents/py-exec-mcp","markdown":"https://wellknown.network/agents/py-exec-mcp/record.md","api":"https://wellknown.network/api/v1/agents/py-exec-mcp","status":"https://wellknown.network/api/v1/agents/py-exec-mcp/status","claim":"https://wellknown.network/agents/py-exec-mcp/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/py-exec-mcp/claim.json","badge":"https://wellknown.network/agents/py-exec-mcp/badge.svg","openapi":"https://wellknown.network/openapi.json","history":"https://wellknown.network/api/v1/agents/py-exec-mcp/history","tools":"https://wellknown.network/api/v1/agents/py-exec-mcp/tools"},"ard":{"identifier":"urn:air::server:py-exec-mcp","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"py-exec-mcp","summary":"Run Python from an MCP client with no shell quoting in the way","description":"# py-exec-mcp\n\n**Run Python from an MCP client without a shell mangling your code.**\n\n[![CI](https://github.com/blurxy/py-exec-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/blurxy/py-exec-mcp/actions/workflows/ci.yml)\n[![PyPI](https://img.shields.io/pypi/v/py-exec-mcp)](https://pypi.org/project/py-exec-mcp/)\n[![Python](https://img.shields.io/pypi/pyversions/py-exec-mcp)](https://pypi.org/project/py-exec-mcp/)\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)\n\n---\n\n## The problem\n\nAsk an agent to run a one-liner and it reaches for `python -c \"...\"`. That code passes through\n**three parsers** before Python ever sees it — the shell, argv splitting, then Python itself — each\nwith its own escaping rules.\n\n```bash\npython -c \"print(f'he said \\\"hi {name}\\\"')\"     # which layer eats which quote?\n```\n\nThe failure mode is what makes this worth fixing: **you usually get a wrong answer, not an error.**\nA backslash vanishes, a quote closes early, an f-string silently becomes a literal — and the output\nlooks plausible. So the agent retries with different escaping, or falls back to writing a temp file\nand running it, every single time.\n\n## The fix\n\nCode arrives as a JSON string in the MCP tool call and is handed to the interpreter over **stdin**\n(`python -`). No shell. No argv. Nothing re-parses it.\n\nWrite the code exactly as it would appear in a `.py` file — nested quotes, f-strings, backslashes,\nregex, triple-quoted blocks — and it arrives verbatim.\n\n## Install\n\n```bash\nuvx py-exec-mcp          # no install\npip install py-exec-mcp  # or the usual way\nuvx --from git+https://github.com/blurxy/py-exec-mcp py-exec-mcp   # straight from main\n```\n\nWorks on **both MCP SDK majors** — 2.x renamed `FastMCP` to `MCPServer`, and the server binds\nwhichever one your environment has, so you are not forced to pin the SDK to match it. Needs\n`mcp>=1.19`.\n\n## Configure\n\n<details open>\n<summary><b>Claude Code</b> — <code>.mcp.json</code> in your project root…","publisher":{"name":"blurxy","url":null},"homepage":"https://github.com/blurxy/py-exec-mcp","repository":"https://github.com/blurxy/py-exec-mcp","version":"0.2.0","license":null,"protocols":["mcp"],"tags":["claude","llm","mcp","model-context-protocol","python","tools"],"pricing":null,"endpoints":[{"url":"pypi:py-exec-mcp","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","repoUrl":"pypi","summary":"pypi","version":"pypi","description":"pypi","homepageUrl":"pypi","publisherName":"pypi"}},"derived":{"capabilities":[{"slug":"content.writing","name":"Writing & Editing","confidence":0.802,"provenance":"derived"},{"slug":"dev.version-control","name":"Version Control","confidence":0.745,"provenance":"derived"},{"slug":"dev.terminal","name":"Terminal & Shell","confidence":0.745,"provenance":"derived"}],"categories":["content","dev"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"py-exec-mcp","registry":"pypi","observedAt":"2026-10-24T18:29:01.871Z","publishedAt":"2026-10-05T07:29:31.963734Z","latestVersion":"0.2.0"},"toolSurface":null,"endpointFacts":[]},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"py-exec-mcp","url":"https://pypi.org/project/py-exec-mcp/","firstSeenAt":"2026-10-06T13:23:43.503Z","fetchedAt":"2026-10-24T18:28:10.594Z","normalizedAt":"2026-10-24T18:28:10.594Z"}]},"firstSeenAt":"2026-10-06T13:23:43.503Z","updatedAt":"2026-10-24T18:29:01.871Z"}