
How to add PRIMS – Python Runtime Interpreter MCP Server to Windsurf
Run arbitrary Python in a secure, throw-away sandbox from your LLM agent via a single run_code MCP tool. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.
Last updated June 14, 2026 · 28★ · http · no auth
Windsurf config for PRIMS – Python Runtime Interpreter MCP Server
./scripts/setup_env.sh{
"mcpServers": {
"prims-python-runtime-interpreter-mcp-server": {
"serverUrl": "http://localhost:9000/mcp"
}
}
}Remote server — no local install needed. Restart the client after saving the config.
Setup steps
- 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the PRIMS – Python Runtime Interpreter MCP Server config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 5PRIMS – Python Runtime Interpreter MCP Server's tools become available to Cascade.
Before you start
- Python
- A virtual environment created via scripts/setup_env.sh (or Docker)
What PRIMS – Python Runtime Interpreter MCP Server can do in Windsurf
run_codeExecute user-supplied Python in an isolated, throw-away sandbox with optional pip dependencies and file mounts; streams back stdout/stderr.
list_dirList files and directories inside your session workspace.
preview_fileReturn up to 8 KB of a text file from your session workspace for quick inspection.
persist_artifactUpload a file from your output/ directory to a client-provided presigned URL for permanent storage.
mount_fileDownload a remote file once per session into mounts/<path> so it can be reused across run_code calls without re-supplying the URL.
Security
Executes arbitrary user-supplied Python code. Each invocation runs in an isolated, throw-away virtual environment that is deleted after the call, but the server itself is alpha-stage and binds to 0.0.0.0:9000 by default — restrict network exposure accordingly. The persist_artifact tool uploads files to a client-provided presigned URL.
PRIMS – Python Runtime Interpreter MCP Server + Windsurf FAQ
Where is the Windsurf config file?
Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the PRIMS – Python Runtime Interpreter MCP Server config there under the "mcpServers" key and restart the client.
Is PRIMS – Python Runtime Interpreter MCP Server safe to use with Windsurf?
Executes arbitrary user-supplied Python code. Each invocation runs in an isolated, throw-away virtual environment that is deleted after the call, but the server itself is alpha-stage and binds to 0.0.0.0:9000 by default — restrict network exposure accordingly. The persist_artifact tool uploads files to a client-provided presigned URL.
How is code execution isolated?
Each run_code call spins up a fresh virtual environment, installs any requested pip packages, optionally mounts read-only files, runs the code, and then deletes the workspace.
What transport does it use?
MCP over streamable HTTP. Running python -m server.main binds the MCP endpoint at http://0.0.0.0:9000/mcp (clients connect to http://localhost:9000/mcp).
Can I run it in Docker?
Yes. The repo ships a Dockerfile and a scripts/docker_run.sh helper that builds and runs the server, printing the MCP URL when ready.