Node.js Sandbox

Node.js Sandbox

A Node.js–based Model Context Protocol server that spins up disposable Docker containers to execute arbitrary JavaScript.

10K+

6

7 Tools

Signed
Built by Docker
Add to Docker Desktop

Version 4.43 or later needs to be installed to add the server automatically

Tools

NameDescription
run_jsInstall npm dependencies and run JavaScript code inside a running sandbox container. After running, you must manually stop the sandbox to free resources. The code must be valid ESModules (import/export syntax). Best for complex workflows where you want to reuse the environment across multiple executions. When reading and writing from the Node.js processes, you always need to read from and write to the "./files" directory to ensure persistence on the mounted volume.
run_js_ephemeralRun a JavaScript snippet in a temporary disposable container with optional npm dependencies, then automatically clean up. The code must be valid ESModules (import/export syntax). Ideal for simple one-shot executions without maintaining a sandbox or managing cleanup manually. When reading and writing from the Node.js processes, you always need to read from and write to the "./files" directory to ensure persistence on the mounted volume. This includes images (e.g., PNG, JPEG) and other files (e.g., text, JSON, binaries). Example: ```js import fs from "fs/promises"; await fs.writeFile("./files/hello.txt", "Hello world!"); console.log("Saved ./files/hello.txt"); ```

Manual installation

You can install the MCP server using:

Installation for

Related servers