Enterprise DNA
M MCP Servers Developer low

alfonsograziano/node-code-sandbox-mcp

by Various

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

A

MCP

alfonsograziano/node-code-sandbox-mcp

Added 1 June 2026

Overview

A Node.js-based Model Context Protocol server that creates disposable Docker containers to execute arbitrary JavaScript code. It provides a sandboxed environment for running untrusted scripts without persistent side effects.

Best for

Best for
Developers building AI-powered code execution or sandboxing tools that need a lightweight, containerized JavaScript runtime

Use cases

  • Run user-submitted JavaScript snippets safely in an AI assistant workflow
  • Test JavaScript code in isolation during development or debugging sessions
  • Execute dynamic code from external sources without affecting the host system

How to use

Tools exposed

  • run_js_ephemeral
  • sandbox_initialize
  • sandbox_exec
  • run_js
  • sandbox_stop
  • search_npm_packages

Tested with

Claude Desktop, VS Code

Example client config

{\n  "mcpServers": {\n    "js-sandbox": {\n      "command": "docker",\n      "args": [\n        "run",\n        "-i",\n        "--rm",\n        "-v",\n        "/var/run/docker.sock:/var/run/docker.sock",\n        "-v",\n        "$HOME/Desktop/sandbox-output:/root",\n        "-e",\n        "FILES_DIR=$HOME/Desktop/sandbox-output",\n        "-e",\n        "SANDBOX_MEMORY_LIMIT=512m",\n        "-e",\n        "SANDBOX_CPU_LIMIT=1",\n        "mcp/node-code-sandbox"\n      ]\n    }\n  }\n}

Notes

A Node.js-based Model Context Protocol server that creates disposable Docker containers to execute arbitrary JavaScript code. It provides a sandboxed environment for running untrusted scripts without persistent side effects.

153 stars on GitHub. Last updated 2025-11-24.

Use cases

  • Run user-submitted JavaScript snippets safely in an AI assistant workflow
  • Test JavaScript code in isolation during development or debugging sessions
  • Execute dynamic code from external sources without affecting the host system

Pros

  • Disposable containers ensure clean state after each execution
  • Simple MCP interface integrates easily with AI tools and assistants
  • Lightweight and focused on JavaScript execution

Cons

  • Requires Docker to be installed and running on the host
  • Only supports JavaScript code execution, no other languages
  • Network access and resource limits depend on container configuration

Indexed from awesome-mcp-servers-punkpeye and enriched against its public facts.

Pros

  • Disposable containers ensure clean state after each execution
  • Simple MCP interface integrates easily with AI tools and assistants
  • Lightweight and focused on JavaScript execution

Cons

  • Requires Docker to be installed and running on the host
  • Only supports JavaScript code execution, no other languages
  • Network access and resource limits depend on container configuration
Free 27-page guide

Get the free Developer’s Field Guide

A 27-page field guide to the AI coding workflow with Claude. Claude Code, MCP servers, the prompt patterns that work, and what to delegate. Free.

Enter your work email. We send it straight over, plus a few short notes worth knowing. Unsubscribe any time.

No spam. Unsubscribe any time.

Running a business, not writing the code? See the MCP servers picked for operators, and get your first one wired up with us.

Operator picks