Python Runner MCP Server

by taiji1985

321 downloads Not rated yet

About

A Python code execution server built on the FastMCP framework, designed for data science and machine learning workflows. It executes Python code in isolated namespaces and comes with pre-installed libraries such as NumPy, pandas, scikit-learn, Matplotlib, and more.

Explore

- Safe Python Code Execution: Execute Python code in isolated namespaces
- Rich Data Science Libraries: Pre-installed with commonly used data science and machine learning packages
- Real-time Output Capture: Capture standard output, error output, and return values
- MCP Protocol Support: Fully compatible with Model Context Protocol
- Easy to Use: Provides a simple and clean API interface

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Python Runner MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Python 3.12 or higher
- uv package manager (recommended) or pip

Use uvx to run the server directly without installation: [TODO ..... ]


uvx python-runner

Add the following configuration to your Claude Desktop config file:

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

Config file locations:
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: %APPDATA%\Claude\claude_desktop_config.json

This project comes pre-installed with the following commonly used data science and machine learning libraries:

- Data Processing: numpy, pandas, scipy
- Machine Learning: scikit-learn
- Data Visualization: matplotlib, seaborn, plotly
- Scientific Computing: sympy
- Image Processing: pillow
- Network Analysis: networkx
- Interactive Development: jupyter
- HTTP Requests: requests


uv sync

python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

bash

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "python runner mcp server": {
            "python_runner_mcp": {
                "command": "uvx",
                "args": [
                    "python-runner"
                ]
            }
        }
    }
}

McpServers

{
    "python_runner_mcp": {
        "command": "uvx",
        "args": [
            "python-runner"
        ]
    }
}

English | 中文

A Python code execution server based on the FastMCP framework, designed specifically for data science and machine learning workflows.

🚀 Features

- Safe Python Code Execution: Execute Python code in isolated namespaces
- Rich Data Science Libraries: Pre-installed with commonly used data science and machine learning packages
- Real-time Output Capture: Capture standard output, error output, and return values
- MCP Protocol Support: Fully compatible with Model Context Protocol
- Easy to Use: Provides a simple and clean API interface

⚡ Quick Start (Recommended)

Use uvx to run the server directly without installation: [TODO ..... ]

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.