Virtualization · Developer Tools

Node Code Sandbox MCP logo

Node Code Sandbox MCP

alfonsograziano/node-code-sandbox-mcp

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

Install

docker run -i --rm -v /var/run/docker.sock:/var/run/docker.sock -v $HOME/Desktop/sandbox-output:/root -e FILES_DIR=$HOME/Desktop/sandbox-output -e SANDBOX_MEMORY_LIMIT=512m -e SANDBOX_CPU_LIMIT=0.75 mcp/node-code-sandbox

Client configuration

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

Environment variables

FILES_DIRSANDBOX_MEMORY_LIMITSANDBOX_CPU_LIMIT
GitHub stars
10
Category
Virtualization, Developer Tools
License
MIT
Updated
Oct 6, 2026

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)

Tools (6)

  • run_js_ephemeral

    Run a one-off JS script in a brand-new disposable container.

  • sandbox_initialize

    Start a fresh sandbox container.

  • sandbox_exec

    Run shell commands inside the running sandbox.

  • run_js

    Install npm dependencies and execute JavaScript code.

  • sandbox_stop

    Terminate and remove the sandbox container.

  • search_npm_packages

    Search for npm packages by a search term and get their name, description, and a README snippet.

Details on this page are taken from the project's README. Open README

Supported clients

Clients mentioned in this server's README:

View all
Claude Desktop logo

Claude Desktop

Desktop · Freemium · Proprietary

Anthropic's official Claude AI desktop application. Supports MCP servers to extend functionality.

WindowsMacOS
VS Code GitHub Copilot logo

VS Code GitHub Copilot

Desktop · Freemium · MIT

VS Code integrates MCP with GitHub Copilot through agent mode, allowing direct interaction with MCP-provided tools in your agentic coding workflow. Configure servers in Claude Desktop, workspace, or user settings, with guided MCP installation and secure handling of secrets in input variables to avoid leaking hardcoded keys.

WindowsMacOSLinuxWeb

Related MCP servers

More servers
MCP Jetbrains logo

MCP Jetbrains

JetBrains/mcp-jetbrains

566

Issues & Support: For bugs or feature requests related to the built-in MCP functionality, please use the JetBrains YouTrack.

Virtualization
Docker Compose logo

Docker Compose

ckreiling/mcp-server-docker

358

An MCP server for managing Docker with natural language!

Virtualization
Docker MCP logo

Docker MCP

QuantGeekDev/docker-mcp

253

A powerful Model Context Protocol (MCP) server for Docker operations, enabling seamless container and compose stack management through Claude AI.

Virtualization
k8m logo

k8m

weibaohui/k8m

234

k8m is an AI-driven Mini Kubernetes AI Dashboard lightweight console tool designed to simplify cluster management.

Virtualization
Code Sandbox MCP logo

Code Sandbox MCP

Automata-Labs-team/code-sandbox-mcp

144

A secure sandbox environment for executing code within Docker containers. This MCP server provides AI applications with a safe and isolated environment for running code while maintaining security through containerization.

Virtualization
Proxmox MCP Server logo

Proxmox MCP Server

canvrno/ProxmoxMCP

90

A Python-based Model Context Protocol (MCP) server for interacting with Proxmox hypervisors, providing a clean interface for managing nodes, VMs, and containers.

Virtualization