# hileamlakB/PRIMS [Health: Active]

**Category:** 👨‍💻 Code Execution  
**Repository:** https://github.com/hileamlakB/PRIMS  
**GitHub Stars:** 30  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/hileamlakb-prims

## Description
A Python Runtime Interpreter MCP Server that executes user-submitted code in an isolated environment.

## Tools
Capabilities this server exposes over MCP:

- **run_code** — Execute Python in an isolated sandbox with optional pip deps.
- **list_dir** — List files/directories inside your session workspace.
- **preview_file** — Return up to 8 KB of a text file for quick inspection.
- **persist_artifact** — Upload an `output/` file to a client-provided presigned URL.
- **mount_file** — Download a remote file once per session to `mounts/<path>`.

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "prims": {
    "url": "http://0.0.0.0:9000/mcp"
  }
}
```

## Documentation

## What hileamlakB/PRIMS MCP server does

hileamlakB/PRIMS MCP server gives MCP-compatible agents access to short-lived Python execution environments. The main execution tool accepts Python source code and can install requested pip packages for that invocation. Standard output and standard error are returned to the caller.

Each execution is designed to be isolated and disposable. This makes the server suitable for temporary calculations, data inspection, transformations, and scripts that do not need state to survive between sessions.

The server is categorized as an 👨‍💻 Code Execution MCP server. It is a fit for agents that need to run Python rather than only generate code, provided the agent can supply the required inputs and handle any resulting files.

## How it works

PRIMS can run locally with Python or in Docker. The local startup path uses the repository setup script to create a `.venv` and install dependencies. The documented server command is `python -m server.main`, which exposes an MCP endpoint at `http://0.0.0.0:9000/mcp`. A Docker helper script builds and starts the container and prints the MCP URL when ready.

A session workspace holds files created during execution. `mount_file` downloads a remote file once per session into the `mounts/` path, allowing later Python code to reuse it without sending the URL again. `list_dir` shows workspace entries, while `preview_file` returns up to 8 KB from a text file for inspection.

Files created under `output/` can be sent to permanent storage with `persist_artifact`. That tool requires a client-provided presigned URL. Small artifacts may also be retrieved from the server’s artifact endpoint using the MCP session ID.

## Setup and configuration

For local development, make `scripts/setup_env.sh` executable, run it, and activate the resulting virtual environment in each new shell. Start the service with `python -m server.main`. Alternatively, run `scripts/docker_run.sh` after making it executable.

Presigned URLs and remote file URLs are supplied as tool arguments rather than documented environment variables.

## Tools and capabilities

- `run_code`: Execute Python with optional pip dependencies and return stdout or stderr.
- `list_dir`: List files and directories in the current session workspace.
- `preview_file`: Read up to 8 KB of a text file.
- `mount_file`: Download a remote file once per session into `mounts/<path>`.
- `persist_artifact`: Upload a file from `output/` to a presigned URL.

The examples cover listing tools, running code, mounting and reusing a CSV, inspecting a workspace, and persisting a generated artifact. hileamlakB/PRIMS MCP server does not document broader external service integrations beyond the presigned upload and remote-file download flows.

## Limitations and notes

The project is marked alpha in the README. Treat arbitrary code execution as an operational risk and evaluate the deployment environment before exposing the endpoint to untrusted users.

Workspace persistence is temporary by design. Files that must survive a session need to be uploaded through `persist_artifact` or otherwise retrieved before cleanup. `preview_file` is intended for quick text inspection and is limited to 8 KB. The server’s documented transports are MCP/stdio and the HTTP endpoint described above.

_Full upstream README: https://allmcps.com/mcp/hileamlakb-prims/readme_

