Python Interpreter Mcp
@bimalpaudels
Python Interpreter Mcp について
A Model Context Server providing simple features to automate python script execution via LLMs.
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"interpreter": {
"command": "uvx",
"args": [
"python-interpreter-mcp"
]
}
}
}ツール
1Runs the given script with `uv run script.py`.
概要
What is Python Interpreter Mcp?
Python Interpreter Mcp is 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.
How to use Python Interpreter Mcp?
Install via uvx and configure in your MCP client. For example, add {"command": "uvx", "args": ["python-interpreter-mcp"]} to your Claude Desktop config, or use the MCPServerStdio class with the OpenAI Agents SDK. The server exposes a single tool run_script that takes a code string and returns the script’s stdout.
Key features of Python Interpreter Mcp
- Executes arbitrary Python scripts with
uv runfor dependency isolation - Saves scripts to a hidden folder in the current working directory
- Lightweight, single-tool interface (
run_script) - Designed for structured and reproducible execution
- Experimental – use only in trusted, sandboxed environments
Use cases of Python Interpreter Mcp
- Running user-provided Python snippets via an LLM or MCP client
- Safely testing short scripts inside an isolated subprocess
- Integrating code execution into AI workflows (e.g., OpenAI Agents SDK)
- Prototyping a sandboxed Python interpreter for development or education
FAQ from Python Interpreter Mcp
How does Python Interpreter Mcp run scripts?
It receives a script string, saves it as a .py file inside a hidden folder in the current working directory, then executes it with uv run to ensure dependency isolation. The stdout is captured and returned.
What tool does Python Interpreter Mcp provide?
It provides a single MCP tool named run_script which takes a code (string) input and returns the script’s stdout.
Are there any security concerns?
Yes – the server executes arbitrary Python code, which can run anything including malicious commands. It should only be used in trusted, sandboxed environments, and inputs must be validated and guardrailed when used with an LLM.
What runtime dependencies does Python Interpreter Mcp require?
It requires uv (the Python package installer from Astral) to run scripts via subprocesses.
Is Python Interpreter Mcp production‑ready?
No – this project is in a very early stage of development and is experimental.
「その他」の他のコンテンツ
Mcp
browsermcpBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
Activepieces
activepiecesAI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
Inbox Zero AI MCP
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
🚀 Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
Unity MCP ✨
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
コメント