python-interpreter-mcp: an MCP server for running Python scripts

python-interpreter-mcp: an MCP server for running Python scripts

python-interpreter-mcp•bybimalpaudels

An experimental MCP server that receives Python script code through a run_script tool, saves it to a file, and executes it with uv in an isolated subprocess.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Exposes a run_script tool that accepts a code string and returns the stdout of the executed script.
  • •Saves the received script as a .py file inside a hidden folder in the current working directory before running it.
  • •Executes scripts with uv run to provide dependency isolation.

BEST FOR

  • •Running Python code snippets supplied by an LLM through an MCP tool call.
  • •Use in trusted, sandboxed environments because it executes arbitrary Python code.

ABOUT PYTHON-INTERPRETER-MCP

python-interpreter-mcp: an MCP server for running Python scripts is cataloged as an MCP server attributed to bimalpaudels. An experimental MCP server that receives Python script code through a run_script tool, saves it to a file, and executes it with uv in an isolated subprocess. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for python-interpreter-mcp: an MCP server for running Python scripts are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What does the run_script tool return?

It returns the stdout of the given script.

Is this project safe to run untrusted code with?

The README warns that it executes arbitrary Python code and should be used only in trusted, sandboxed environments.

Upstream README

View this exact version on GitHub

README.md · a5281bd7f6f4 · Fetched 2026-11-13 12:20:01 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

python-interpreter-mcp: A MCP server to run scripts

Overview

A lightweight, experimental MCP server designed to execute arbitrary Python scripts in a structured and reproducible environment. It leverages uv to run isolated code snippets through subprocesses.

Tools

  • run_script
    • Runs the given script with uv run script.py.
    • Input:
      • code(str): Script to be run
    • Return: The stdout of the given script.

Configuration

Usage with OpenAI Agents SDK

async with MCPServerStdio(
            params={
                "command": "uvx",
                "args": ["python-interpreter-mcp"],
            }
    ) as server
...

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

"mcpServers": {
  "interpreter": {
    "command": "uvx",
    "args": ["python-interpreter-mcp"]
  }
}

How it works

  • A script string is received by the MCP tool run_script.
  • A hidden folder is created in cwd, and the script is saved as a .py file inside it.
  • The script is then executed using uv run, which ensures dependency isolation.
  • The stdout of the script is captured and returned as the response.

Usage Warnings

This project is in a very early stage of development.

⚠️ Important notes

  • It executes arbitrary Python code, which means it can run anything — including malicious or destructive commands.
  • Use only in trusted, sandboxed environments.
  • You should always validate, guardrail, or restrict inputs when wiring this into an LLM.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for python-interpreter-mcp: an MCP server for running Python scripts from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/python-interpreter-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools