Node Code Sandbox MCP Server

Run arbitrary JavaScript inside disposable Docker containers and install npm dependencies on the fly.

Local serverstdio

What is the Node Code Sandbox MCP Server?

Run arbitrary JavaScript inside disposable Docker containers and install npm dependencies on the fly.

What the server does

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

  • 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)

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
run_js_ephemeralRun a one-off JS script in a brand-new disposable container.
sandbox_initialize
sandbox_exec
run_js
sandbox_stop
search_npm_packagesSearch for npm packages by a search term and get their name, description, and a README snippet.

How to install the Node Code Sandbox MCP Server

claude mcp add node-code-sandbox --env FILES_DIR=your-value --env SANDBOX_MEMORY_LIMIT=your-value --env SANDBOX_CPU_LIMIT=your-value -- npx -y npm

Configuration

VariableDescriptionRequired
FILES_DIRFilesystem location the server is allowed to use.Optional
SANDBOX_MEMORY_LIMITConfiguration value read at startup.Optional
SANDBOX_CPU_LIMITConfiguration value read at startup.Optional

Example prompts to try

  • “Use Node Code Sandbox MCP to Session.”
  • “Use Node Code Sandbox MCP to One.”
  • “Use Node Code Sandbox MCP to run js ephemeral.”

Frequently asked questions

Run arbitrary JavaScript inside disposable Docker containers and install npm dependencies on the fly. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.