Atlas / MCP servers / alfonsograziano / Node Code Sandbox

Node Code SandboxSAFE

mcp/alfonsograziano/node-code-sandbox

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

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
11 6r · 4w · 1d
Transport
stdio
License
—
Stars
157
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

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

👉 Look at the official website

📦 Available on Docker Hub

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)
Note: Containers run with controlled CPU/memory limits.

Explore Cool Use Cases

If you want ideas for cool and powerful ways to use this library, check out the use cases section on the website It contains a curated list of prompts, examples, and creative experiments you can try with the Node.js Sandbox MCP Server.

⚠️ Prerequisites

To use this MCP server, Docker must be installed and running on your machine.

Tip: Pre-pull any Docker images you'll need to avoid delays during first execution.

Example recommended images:

  • node:lts-slim
  • mcr.microsoft.com/playwright:v1.55.0-noble
  • alfonsograziano/node-chartjs-canvas:latest

Getting started

In order to get started with this MCP server, first of all you need to connect it to a client (for example Claude Desktop).

Once it's running, you can test that it's fully working with a couple of test prompts:

  • Validate that the tool can run:
Create and run a JS script with a console.log("Hello World")

This should run a console.log and in the tool response you should be able to see Hello World.

  • Validate that you can install dependencie
Read from source at commit d41900d4d31bOBSERVED · 2026-10-07
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add my-project --env OPENAI_API_KEY=${OPENAI_API_KEY} -- npx -y [email protected]
claude-desktop
{
  "mcpServers": {
    "my-project": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "OPENAI_API_KEY": "${OPENAI_API_KEY}"
      }
    }
  }
}
03

Exposed tools (11)

6 read · 4 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.

ToolRiskDescription
get_dependency_typesreadGiven an array of npm package names (and optional versions), fetch whether each package ships its own TypeScript definitions or has a corresponding @types/... package, and return the raw .d.ts text. Useful whenwhen you
incomplete-packagereadNo description available.
package1readTest package 1
package2readTest package 2
qualified-packagereadQualified package
run_jswrite
run_js_ephemeralwrite
sandbox_execwriteExecute one or more shell commands inside a running sandbox container. Requires a sandbox initialized beforehand.
sandbox_initializewriteStart a new isolated Docker container running Node.js. Used to set up a sandbox session for multiple commands and scripts.
sandbox_stopdestructiveTerminate and remove a running sandbox container. Should be called after finishing work in a sandbox initialized with sandbox_initialize.
search_npm_packagesreadSearch for npm packages by a search term and get their name, description, and a README snippet.
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (4 observation(s))
Network
declared (5 observation(s))
Shell
none-observed
Dependencies
not all pinned
Secrets in source
none-found

Findings (18)

MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
sandbox_stop
Why it matters. 1 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius
LOWInventory / provenance · inv.hidden_file · CWE-1104
.commitlintrc
.commitlintrc
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
.env.sample
.env.sample
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
.lintstagedrc
.lintstagedrc
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
.prettierignore
.prettierignore
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
.prettierrc.js
.prettierrc.js
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
test/execInSandbox.test.ts:112
'js-sbx-123/../../etc/passwd',
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
test/runJs.test.ts:307
'js-sbx-123/../../etc/passwd',
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
test/stopSandbox.test.ts:105
'js-sbx-123/../../etc/passwd',
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
test/unit/linterUtils.test.ts:2
import { lintAndRefactorCode } from '../../src/linterUtils.ts';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
website/.specify/scripts/bash/common.sh:11
(cd "$script_dir/../../.." && pwd)
LOWObfuscation / stealth · obf.base64_blob · CWE-506, CWE-94
test/runJsEphemeral.test.ts:308
'/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxISEhUSEhIVFhUVFRUVFRUVFRUVFRUVFRUWFhUVFRUYHSggGBolGxUVITEhJSkrLi4uFx8zODMsNygtLisBCgoKDg0OGhAQGy0lHyYtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@eslint/eslintrc, @modelcontextprotocol/sdk, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, dotenv, eslint, eslint-config-prettier, eslint-plugin-n
Why it matters. 28 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
website/package.json
@mdx-js/react, @mdx-js/rollup, @types/react-router-dom, buffer, clsx, ethers, lucide-react, react
Why it matters. 19 dependency range(s) float
Fix. pin exact versions or ship a lockfile
INFOInventory / provenance · inv.oversize · CWE-1104
website/public/images/graph-gpt.png
website/public/images/graph-gpt.png
Why it matters. 1318923 bytes not read
INFOInventory / provenance · inv.oversize · CWE-1104
website/public/images/pillars/hitl_problem.png
website/public/images/pillars/hitl_problem.png
Why it matters. 1286258 bytes not read
INFOInventory / provenance · inv.oversize · CWE-1104
website/public/images/pillars/hitl_solution.png
website/public/images/pillars/hitl_solution.png
Why it matters. 1278223 bytes not read
INFOPrompt injection · prompt.credential_read · CWE-94, CWE-1427
NODE_GUIDELINES.md:75
- **Manage Secrets:** **NEVER** hardcode secrets (API keys, passwords) in the source code. Load them from environment variables (e.g., using `dotenv` in development).
Why it matters. asks the agent to read credentials

Gates applied: no_behavioural_pass.

Audited 2026-10-07 · audit v0.4.1 · source sha d41900d4d31bfull audit observations/trust-audit/mcp-server/alfonsograziano__node-code-sandbox.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-07d41900d4d31bSAFEB89first audit
06

Questions

What is the Node Code Sandbox MCP server?

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

What tools does Node Code Sandbox expose?

11 in total: 6 read-only, 4 that write, and 1 that can delete or overwrite (sandbox_stop). Every one is listed on this page with its risk.

Is Node Code Sandbox safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.

What credentials does Node Code Sandbox need?

It reads OPENAI_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does Node Code Sandbox run?

It speaks stdio, so it runs as a local process your client starts. It is published on npm as my-project at 0.0.0.

How current is this page?

The grade is for one exact copy of the source (d41900d4d31b), read on 2026-10-07. The repository is watched and re-audited when it changes.

Advertisement