MCP Safe Local Python Executor MCP Server

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

Local serverstdioPython

What is the MCP Safe Local Python Executor MCP Server?

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

What the server does

  • 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

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
collectionsdatetime
itertoolsmath
queuerandom
statstatistics
timeunicodedata

How to install the MCP Safe Local Python Executor MCP Server

{
  "mcpServers": {
    "safe-local-python-executor": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp_local_python_executor/",
        "run",
        "mcp_server.py"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Example prompts to try

  • “Use MCP Safe Local Python Executor to collections.”
  • “Use MCP Safe Local Python Executor to itertools.”
  • “Use MCP Safe Local Python Executor to queue.”

Frequently asked questions

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 Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.