node-code-sandbox-mcp

MCP.Pizza Chef: alfonsograziano

Your assistant writes a small JavaScript program, runs it inside a throwaway Docker container, and hands back whatever it printed or saved, including charts, images and converted files. Seven tools cover one-shot runs, longer sessions, shell commands, package type lookups and npm search. Nothing needs to be paid for or signed up to, but Docker must be installed and running first. Scripts run with your computer's network wide open, and the code has not been updated since November 2025.

Coding
Data
Files/PDF

Use This MCP server To

Turn a list of numbers into a chart image Try out a small script without installing anything myself Generate a QR code and save it to a folder Rename or resize a batch of files in one go Check what a package does before I rely on it Convert a data file into a tidier format

README

🐢🚀 Node.js Sandbox MCP Server

Node.js server implementing the Model Context Protocol (MCP) for running arbitrary JavaScript in ephemeral Docker containers with on‑the‑fly npm dependency installation.

Website Preview

👉 Look at the official website

📦 Available on Docker Hub

Features

  • Start and manage isolated Node.js sandbox containers
  • Execute arbitrary shell commands inside containers
  • Install specified npm dependencies per job
  • Run ES module JavaScript snippets and capture stdout
  • Tear down containers cleanly
  • Detached Mode: Keep the container alive after script execution (e.g. for long-running servers)

Note: Containers run with controlled CPU/memory limits.

Explore Cool Use Cases

If you want ideas for cool and powerful ways to use this library, check out the use cases section on the website It contains a curated list of prompts, examples, and creative experiments you can try with the Node.js Sandbox MCP Server.

⚠️ Prerequisites

To use this MCP server, Docker must be installed and running on your machine.

Tip: Pre-pull any Docker images you'll need to avoid delays during first execution.

Example recommended images:

  • node:lts-slim
  • mcr.microsoft.com/playwright:v1.55.0-noble
  • alfonsograziano/node-chartjs-canvas:latest

Getting started

In order to get started with this MCP server, first of all you need to connect it to a client (for example Claude Desktop).

Once it's running, you can test that it's fully working with a couple of test prompts:

node-code-sandbox-mcp FAQ

Is this still being maintained?
The code has not changed since November 2025, so it has been quiet for roughly eight months. It still installs and runs, but nothing new has landed for a while and open issues are sitting unanswered.
Do I need to pay for anything or get a key?
No. There is no account and no key. You do need Docker Desktop installed and running on your computer, which is free for personal use but has paid tiers for larger companies.
How isolated is the sandbox really?
Less than the description suggests. Memory and processor caps are applied only for the three images the project knows about, so a different image can run with no cap at all. Every run also uses your computer's own network connection, meaning a script can reach anything on your home network and any private service running on your machine.
Can I use this to make a chart from my own numbers?
Yes, and this is one of its best uses. You describe the chart, it writes and runs the drawing code, and the finished image comes back into the chat and into your output folder.
Which apps does it work in?
Claude Desktop and VS Code are the documented ones. Any app that can start a local MCP server from a command will work the same way.
How do I actually get files back?
Only if you set an output folder when installing it and the script writes into the folder it mounts there. Without that setting there is no shared folder at all, and you get text output only.
Is the Docker install option safe to copy?
Read it before you paste. The suggested Docker command shares your machine's Docker control socket with the container, which gives it broad control over containers on your computer. The plain npx option does not do that.
How hard is setup for a non-developer?
Fairly hard. You need Docker installed, running and pre-loaded with the right images, and you edit a config file by hand. Budget an evening if you have never used Docker.