python-mcp-sandbox
Verified Safeby vuguzum
Overview
Provides a secure, sandboxed environment for LLMs to validate syntax and safely execute generated Python code.
Installation
python -m python_code_sandbox.python_code_sandboxSecurity Notes
The server employs a robust multi-layered 'defense in depth' strategy. This includes AST parsing for syntax checks, static analysis to block dangerous functions/modules (e.g., 'eval', 'exec', 'os'), environment sanitization (removing modules from sys.modules, overriding __import__ and open()), and OS-level process isolation (resource.setrlimit on Unix, Job Objects on Windows) with configurable time/memory limits. Output is captured via buffers. While no sandbox is 100% impenetrable, this implementation is highly secure for its intended purpose.
Similar Servers
mcp-server-code-execution-mode
This server enables LLM agents to execute Python code in a highly secure, isolated container environment, facilitating complex multi-tool orchestration and data analysis with minimal LLM context token usage.
Lynkr
Lynkr is an AI orchestration layer that acts as an LLM gateway, routing language model requests to various providers (Ollama, Databricks, OpenAI, etc.). It provides an OpenAI-compatible API and enables AI-driven coding tasks via a rich set of tools and a multi-agent framework, with a strong focus on security, performance, and token efficiency. It allows AI agents to interact with a defined workspace (reading/writing files, executing shell commands, performing Git operations) and leverages long-term memory and agent learning to enhance task execution.
mcp-run-python
MCP server to securely run untrusted Python code in a sandboxed WebAssembly environment, typically as a tool for AI agents.
aleph
Aleph is an MCP server that provides LLMs programmatic access to gigabytes of local data without consuming context, implementing the Recursive Language Model (RLM) architecture.