OlympHill
M

mcp_safe_local_python_executorStdio 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

(0)
Daniel NikulshynReviewed by Daniel Nikulshyn·Updated July 2026

Overview

The mcp_safe_local_python_executor is a stdio MCP server that wraps Hugging Face's LocalPythonExecutor from the smolagents framework. It provides a custom Python runtime for executing Python code generated by LLMs locally with basic isolation and security. This tool does not require Docker or a VM and can be used with LLM apps like Claude Desktop or any other MCP compatible client. It offers a balance between ease of setup and safety by restricting file I/O operations and limiting imports. However, users should still be cautious when executing code produced by LLMs on their machine.

Key features

  • Exposes run_python tool
  • Safer execution of Python code compared to direct eval()
  • Ran via uv in Python venv
  • No file I/O ops are allowed
  • Restricted list of imports

Pricing

Model
Free
Category
MCP Servers
Rating
No reviews yet

Use cases

Code Interpreter for Claude Desktop

This tool can be used as a Code Interpreter plugin in Claude Desktop, allowing users to execute Python code generated by LLMs.

Python Executor for LLM Apps

The mcp_safe_local_python_executor can be used with any MCP compatible client, providing a safe and easy way to execute Python code generated by LLMs.

Pros & Cons

Pros

  • Easy to set up compared to Docker or VM
  • Provides basic isolation and security for running Python code
  • Exposes a 'run_python' tool for LLM apps
  • Runs in a Python virtual environment with restricted imports

Cons

  • Not as secure as using a VM or Docker container
  • Requires careful consideration when executing code generated by LLMs

Reviews

Sign in to leave a review.

No reviews yet. Be the first!

Q&A

Can I use it with LLM apps?

Yes, it exposes a 'run_python' tool for LLM apps like Claude Desktop or any other MCP compatible client.

Asked by Uma Krishnan · Feb 21, 2026

How does it compare to direct Python eval?

The mcp_safe_local_python_executor offers safer execution of Python code compared to direct use of Python eval.

Asked by Rosalind Frost · Feb 9, 2026

What security features are included?

The tool provides basic isolation and security by restricting file I/O operations and limiting imports, but it is not as secure as using a VM or Docker container.

Asked by Idris Suleiman · Jan 18, 2026

Is Docker required?

No, Docker is not required. This tool provides a custom Python runtime without needing Docker or a VM.

Asked by Yaw Owusu · Jan 8, 2026

Ask a question

MCP Servers alternatives