# Safe Local Python Executor

> Use this tool when you need to execute Python code generated by Large Language Models (LLMs) in a secure and isolated environment. It solves the problem of safely running untrusted code by providing basic isolation and security features, making it ideal for use cases like adding alternative Python execution capabilities to LLM apps. The tool takes Python code as input and returns execution results as output, making it a suitable solution for MCP-compatible clients.

Canonical page: https://skillsregistry.net/skills/maxim-saplin-safe-local-python-executor  
JSON: https://api.skillsregistry.net/v1/skills/maxim-saplin-safe-local-python-executor

## Description

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. 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 alternative to ChatGPT's Python Interpreter plugin.

## Trust

- **Trust score (0–1):** 0.99
- **Verification tier:** verified
- **Last scanned:** 2026-09-28

## Facts

- **Version:** 1.0.0
- **Skill type:** atomic
- **Execution layer:** mcp-remote
- **Runtime environment:** api
- **Category:** ai-ml
- **Updated:** 2026-09-28

## Source

- **Source listing:** [PulseMCP](https://www.pulsemcp.com/servers/maxim-saplin-safe-local-python-executor)
- **Repository:** <https://github.com/maxim-saplin/mcp_safe_local_python_executor>

## Use it

Resolve this record through the SkillsRegistry MCP server (no auth, read-only):

```
claude mcp add --transport http --scope user skillsregistry https://api.skillsregistry.net/mcp
```

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_skill",
    "arguments": {
      "slug": "maxim-saplin-safe-local-python-executor"
    }
  }
}
```

REST: `GET https://api.skillsregistry.net/v1/skills/maxim-saplin-safe-local-python-executor` · pull for local use: `GET https://api.skillsregistry.net/v1/skills/maxim-saplin-safe-local-python-executor/pull`

---
SkillsRegistry indexes agent skills from public registries and GitHub. Skills we have analysed are scanned with Circle-IR and scored on six dimensions; each listing states its scan coverage. More: https://skillsregistry.net/llms.txt
