{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_z8nf2m7uwkd6","handle":"iflow-mcp-mcp-run-python-code","url":"https://wellknown.network/agents/iflow-mcp-mcp-run-python-code","links":{"self":"https://wellknown.network/agents/iflow-mcp-mcp-run-python-code/record.json","html":"https://wellknown.network/agents/iflow-mcp-mcp-run-python-code","markdown":"https://wellknown.network/agents/iflow-mcp-mcp-run-python-code/record.md","api":"https://wellknown.network/api/v1/agents/iflow-mcp-mcp-run-python-code","status":"https://wellknown.network/api/v1/agents/iflow-mcp-mcp-run-python-code/status","claim":"https://wellknown.network/agents/iflow-mcp-mcp-run-python-code/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/iflow-mcp-mcp-run-python-code/claim.json","badge":"https://wellknown.network/agents/iflow-mcp-mcp-run-python-code/badge.svg","openapi":"https://wellknown.network/openapi.json","history":"https://wellknown.network/api/v1/agents/iflow-mcp-mcp-run-python-code/history","tools":"https://wellknown.network/api/v1/agents/iflow-mcp-mcp-run-python-code/tools"},"ard":{"identifier":"urn:air::server:iflow-mcp-mcp-run-python-code","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"iflow-mcp_mcp-run-python-code","summary":"mcp-run-python-code: MCP server for running Python code, installing packages, and executing Python files.","description":"# mcp-run-python-code\nPython interpreter, MCP server, no API key, free. Get results from running Python code.\n\n## Overview\n\nThis MCP server provides tools for running Python code, installing packages, and executing Python files. \nIt can be easily integrated with MCP clients, including Claude and other LLM applications supporting the MCP protocol.\n\n## Features\n\n- Execute Python code in a safe environment\n- Install Python packages using pip\n- Save Python code to files and run them\n- Run existing Python files\n- Return specific variable values from executed code\n- Error handling and debugging support\n\n## Installation\n\n### From pip\nYou can install the MCP Run Python Code Server using `uv`:\n\n```bash\nuv pip install mcp-run-python-code\n```\n\nOr using pip:\n\n```bash\npip install mcp-run-python-code\n```\n\n### From source\n```bash\ngit clone https://github.com/shibing624/mcp-run-python-code.git\ncd mcp-run-python-code\npip install -e .\n```\n\n## Usage\n### Python Demo\n```python\nfrom run_python_code import RunPythonCode\n\ntool = RunPythonCode(base_dir='/tmp/tmp_run_code/')\n\n# 示例1：基本代码执行\nresult = tool.run_python_code(\"x = 10\\ny = 20\\nz = x * y\\nprint(z)\")\nprint(f\"结果: {result}\")  # 输出: 结果: 200\n\n# 示例2：保存并运行文件\nresult = tool.save_to_file_and_run(\n    file_name=\"calc.py\",\n    code=\"a = 5\\nb = 15\\nc = a + b\",\n    variable_to_return=\"c\"\n)\nprint(f\"结果: {result}\")  # 输出: 结果: 20\n\n# 实例3：安装python包\nresult = tool.pip_install_package(\"requests\")\nprint(f\"结果: {result}\")\n```\n\n![](https://github.com/shibing624/mcp-run-python-code/blob/main/docs/calc_demo.png)\n\n### Running as a standalone MCP server\n\nRun the server with the stdio transport:\n\n```bash\nuvx mcp-run-python-code\n```\n\nor\n\n```bash\nuv run mcp-run-python-code\n```\n\nor \n\n```bash\npython -m mcp-run-python-code\n```\n\nThen, you can use the server with any MCP client that supports stdio transport.\n\n### Integrating with Cursor\n\nTo add the weather MCP server to Cursor, add stdio MCP with command:\n\n```bash\nuvx mcp-run-python-code\n```\n\n### Running the FastAPI serve…","publisher":{"name":"XuMing","url":null},"homepage":"https://github.com/shibing624/mcp-run-python-code","repository":"https://github.com/shibing624/mcp-run-python-code","version":"0.0.3","license":"Apache License 2.0","protocols":["mcp"],"tags":["python-interpreter","mcp","run-python-code","install-python-package","execute-python-file"],"pricing":null,"endpoints":[{"url":"pypi:iflow-mcp_mcp-run-python-code","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","license":"pypi","repoUrl":"pypi","summary":"pypi","version":"pypi","description":"pypi","homepageUrl":"pypi","publisherName":"pypi"}},"derived":{"capabilities":[{"slug":"code.execution","name":"Code Execution","confidence":1,"provenance":"derived"},{"slug":"dev.package-management","name":"Packages & Dependencies","confidence":1,"provenance":"derived"},{"slug":"dev.version-control","name":"Version Control","confidence":0.745,"provenance":"derived"}],"categories":["code","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":"iflow-mcp_mcp-run-python-code","registry":"pypi","observedAt":"2026-10-28T05:24:09.056Z","publishedAt":"2025-12-02T03:48:36.366180Z","latestVersion":"0.0.3"},"toolSurface":null,"endpointFacts":[]},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"iflow-mcp_mcp-run-python-code","url":"https://pypi.org/project/iflow-mcp_mcp-run-python-code/","firstSeenAt":"2026-09-09T20:23:38.121Z","fetchedAt":"2026-10-28T05:23:02.149Z","normalizedAt":"2026-10-28T05:23:02.149Z"}]},"firstSeenAt":"2026-09-09T20:23:38.121Z","updatedAt":"2026-10-28T05:24:09.056Z"}