# Node.js Sandbox

Node.js Sandbox runs JavaScript in disposable Docker containers and returns script output. Use it to execute code with npm packages or retrieve files the script creates.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: alfonsograziano
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/alfonsograziano/node-code-sandbox-mcp
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/nodejs-sandbox

## What it does

The MCP server runs each one-off JavaScript job in a fresh container. It prepares `index.js` and a `package.json`, installs the requested npm packages, executes the script, then returns its stdout. Files saved in the working directory can also be returned, but that feature applies to one-off runs.

Docker must be installed and running before the server can start containers. You can choose a Docker image, and detached mode keeps a container alive after a script finishes. Separate tools also let you run shell commands in an existing sandbox.

## Requirements
- Needs: Docker

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- run JavaScript in a separate Docker container
- install npm packages for a script run
- retrieve an image or file created by a script
- execute a shell command in a running container

## Example prompts
- Run JavaScript that creates `report.json` and prints a message when it is done.
- Use the `qrcode` npm package to make a QR image and save it to a file.
- Start a sandbox, then check the Node.js version inside it.

## Similar
- [clickhouse-js-node-rowbinary](https://affpapa.org/en/nevibecode/skills/clickhouse-js-node-rowbinary.md) — skill · 6700 installs
- [integration-javascript_node](https://affpapa.org/en/nevibecode/skills/integration-javascript-node.md) — skill · 131 installs
- [backend-node](https://affpapa.org/en/nevibecode/rules/backend-node.md) — rule · ★ 1198 repo stars
- [node-ops](https://affpapa.org/en/nevibecode/skills/node-ops.md) — skill · ★ 88 repo stars
- [comfyui-node-frontend](https://affpapa.org/en/nevibecode/skills/comfyui-node-frontend.md) — skill · ★ 321 repo stars
- [clickhouse-js-node-coding](https://affpapa.org/en/nevibecode/skills/clickhouse-js-node-coding.md) — skill · 7300 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
