PRIMS
Enables LLM agents to execute arbitrary Python code securely within isolated, ephemeral sandboxes via a lightweight Model Context Protocol server.
关于
PRIMS is a lightweight, open-source Model Context Protocol (MCP) server designed to provide LLM agents with a safe and secure environment for executing arbitrary Python code. It streamlines development by offering a single, focused `run_code` tool that operates within isolated, reproducible sandboxes. Each execution session spins up a fresh virtual environment, handles package installations, mounts optional read-only files, and then disposes of the workspace, all with zero configuration, making it easy to deploy locally or with Docker.
主要功能
- Supports installing pip packages and mounting remote files per session.
- Streams `stdout` and `stderr` back from executed code.
- Provides isolated and reproducible execution environments using virtual environments.
- 7 GitHub stars
- Exposes a single `run_code` MCP tool for Python execution.
- Enables persisting generated artifacts to external storage.
使用案例
- Generating and persisting outputs like plots or data files from agent-executed code.
- Analyzing datasets by mounting them into the execution environment.
- Allowing LLM agents to safely run Python code for complex tasks.