MCP Run Python logo

MCP Run Python

by pydantic/pydantic-ai

Run Python code in a secure sandbox through MCP tool calls.

Install MCP Run Python

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for pydantic/pydantic-ai/mcp-run-python, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

pydantic/pydantic-ai/mcp-run-python provides a secure sandbox for executing Python code through MCP tool calls. It is suited to agents that need Python execution without running code directly in the host environment. Reach for it when an MCP-based workflow requires code execution as part of an agent interaction.

Use cases

  • Run Python code from an MCP-enabled agent
  • Execute agent-generated Python in a secure sandbox
  • Add Python execution to an MCP tool workflow

Key features

  • Python code execution
  • Secure sandboxing
  • MCP tool-call interface

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

28/31 checks healthy over the last 78d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 21d ago via OSV.dev

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars20kStargazers on the source repository.
Last commitTodayMost recent push to the default branch.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Run Python works

What pydantic/pydantic-ai/mcp-run-python does

pydantic/pydantic-ai/mcp-run-python exposes Python code execution through the Model Context Protocol. Its defining capability is running Python inside a secure sandbox, allowing an MCP client or agent to request execution through tool calls rather than handling Python directly in the surrounding application.

The server belongs to the Code Execution category and is intended for workflows where an agent needs to run Python as part of its reasoning or task handling. The repository is located within the PydanticAI project under mcp-run-python.

How it works

An MCP client connects to the server and invokes its Python execution capability through MCP tool calls. The requested Python code runs in the server's secure sandbox. This separates code execution from the client-side agent workflow and provides an MCP-compatible interface for applications that support tool use.

The server is therefore most relevant when Python execution needs to be exposed as an agent tool. It can be considered wherever an MCP-based application needs to submit Python code for sandboxed execution.

Tools and capabilities

  • Execute Python code through MCP tool calls.
  • Run code inside a secure sandbox.
  • Provide Python execution to MCP-compatible agent workflows.

Limitations and notes

The security boundary described for this server is its sandboxed execution environment. Use it for workflows that need Python execution through MCP; the server's defining scope is code execution rather than a general-purpose collection of external service integrations.

The server should be evaluated alongside the MCP client and deployment environment used by the agent. Its role is to provide the execution endpoint, while the client is responsible for initiating MCP tool calls.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Run Python

pydantic/pydantic-ai/mcp-run-python is an MCP server that connects MCP-compatible agents to a secure Python execution sandbox. Its main capability is accepting Python code through MCP tool calls and running that code in the sandbox, making Python execution available as part of an agent workflow.

Use an MCP-compatible client to invoke its Python execution capability through MCP tool calls. The submitted code runs in the server's secure sandbox as part of the agent workflow.

Yes, it runs Python code in a secure sandbox. The sandbox is the server's stated execution environment for code submitted through MCP tool calls.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Run Python AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/pydantic-pydantic-ai-mcp-run-python?style=directory)](https://allmcps.com/mcp/pydantic-pydantic-ai-mcp-run-python)
HTML Embed
<a href="https://allmcps.com/mcp/pydantic-pydantic-ai-mcp-run-python"><img src="https://allmcps.com/api/badge/pydantic-pydantic-ai-mcp-run-python?style=directory" alt="MCP Run Python on AllMCPs" /></a>