Back to MCP Directory
Connections & Capabilities
Connects To
GitHubDocker
Capabilities
exec
Quickstart
Install
npx -y @smithery/cli install @maxim-saplin/mcp_safe_local_python_executor --client claudeConfig
{
"mcpServers": {
"safe-local-python-executor": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp_local_python_executor/",
"run",
"mcp_server.py"
]
}
}
}Exposed MCP Tools (1)
moderate
run_pythonExecutes a Python code snippet and returns the output.
Executes arbitrary code, even within a sandbox.
Safety Assessment
This executor provides a balance between convenience and security. It's safer than direct Python execution but less secure than containerized solutions. Use with caution, especially with untrusted code sources.
- Uses Hugging Face's LocalPythonExecutor for sandboxing.
- Restricted list of allowed Python imports.
- No file I/O operations permitted.
- Runs in a Python venv via uv.
- Code execution, even sandboxed, carries inherent risks.
- Vulnerable to bypasses in the LocalPythonExecutor.
- Potential for resource exhaustion if code isn't well-behaved.
- Limited isolation compared to Docker or VMs.
