python-interpreter-mcp

bimalpaudels/python-interpreter-mcp

3.2

If you are the rightful owner of python-interpreter-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A MCP server to run scripts

The python-interpreter-mcp is a lightweight, experimental Model Context Protocol (MCP) server designed to execute arbitrary Python scripts in a structured and reproducible environment. It utilizes the 'uv' tool to run isolated code snippets through subprocesses, ensuring that each script is executed in a controlled manner. This server is particularly useful for developers and researchers who need to test and run Python scripts in a sandboxed environment, providing a layer of security and isolation. However, due to its ability to execute arbitrary code, it should be used with caution and only in trusted environments.

Features

  • Script Execution: Runs Python scripts in an isolated environment using 'uv'.
  • Subprocess Management: Leverages subprocesses to ensure scripts are executed in a controlled manner.
  • Dependency Isolation: Ensures that each script runs with its own set of dependencies, preventing conflicts.

Tools

  1. run_script

    Runs the given script with 'uv run script.py'.