LabscoMCP early access ↗
chrishayukMCP SERVER

MCP Code Sandbox Server

Give an agent a throwaway sandbox to run Python in, then close it when the work is done.

by chrishayuk ↗Sandboxed Code ExecutionCommunity

LABSCO SUMMARY

Code that runs somewhere other than your laptop.

The sandbox is created for the task and closed after it, so an agent can install a package and run code it just wrote without any of it touching your filesystem.

What it is

A Python MCP server that hands out isolated sandbox environments for code execution, backed by E2B behind an abstract interpreter interface so another backend can be swapped in. Ten tools create a sandbox, run code in it, install packages, check its status and close it (or do all of that in one call), and list, read, write and upload files inside it.

What you get

  • An isolated sandbox created on demand
  • Python executed inside that sandbox
  • Packages installed into the sandbox before the code that needs them runs
  • The current status of a sandbox you created
  • The sandbox closed when the task is finished

Requirements

Python 3.10 or higher, plus fastmcp, python-dotenv and e2b-code-interpreter. An E2B key in the environment covers the default backend, and a second environment variable selects which backend is used, defaulting to e2b. Code runs on E2B's infrastructure, not on your machine.

Setup effort

Build from source — git clone https://github.com/chrishayuk/mcp-code-sandbox.git