{"repo":"maxim-saplin/mcp_safe_local_python_executor","free":true,"listed":false,"github":"https://github.com/maxim-saplin/mcp_safe_local_python_executor","clone":"git clone https://github.com/maxim-saplin/mcp_safe_local_python_executor.git","description":"Stdio MCP Server wrapping custom Python runtime (LocalPythonExecutor) from Hugging Faces' `smolagents` framework. The runtime combines the ease of setup (compared to docker, VM, cloud runtimes) while providing safeguards and limiting operations/imports that are allowed inside the runtime.","language":"Python","stars":46,"topics":[],"license":"MIT","category":"mcp-servers","readme_excerpt":"Safe Local Python Executor An MCP server (stdio transport) that wraps Hugging Face's LocalPythonExecutor (from the smolagents framework). It is a custom Python runtime that provides basic isolation/security when running Python code generated by LLMs locally. It does not require Docker or VM. This package allows to expose the Python executor via MCP (Model Context Protocol) as a tool for LLM apps like Claude Desktop, Cursor or any other MCP compatible client. In case of Claude Desktop this tool is an easy way to add a missing Code Interpreter (available as a plugin in ChatGPT for quite a while already). Features - Exposes run python tool - Safer execution of Python code compared to direct use of Python eva()l - Ran via uv in Python venv - No file I/O ops are allowed - Restricted list of imports - collections - datetime - itertools - math - queue - random - re - stat - statistics - time - unicodedata Security Be careful with execution of code produced by LLM on your machine, stay away from MCP servers that run Python via command line or using eval() . The safest option is using a VM or a docker container, though it requires some effort to set-up, consumes resources/slower. There're 3rd party servcices providing Python runtime, though they require registration, API keys etc. LocalPythonExecutor provides a good balance between direct use of local Python environment (which is easier to set-up) AND remote execution in Dokcer container or a VM/3rd party service (which is safe). Hugg","default_branch":null,"files":null,"tree":[],"storefront":"/r/maxim-saplin","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/maxim-saplin/mcp_safe_local_python_executor/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}