Run arbitrary JavaScript inside disposable Docker containers and install npm dependencies on the fly.
Connect Node Code Sandbox MCP to Claude, Cursor or any other MCP client and it stops being a tab you switch to. Run arbitrary JavaScript inside disposable Docker containers and install npm dependencies on the fly. The node code sandbox mcp mcp server is what makes that connection.
Node.js server implementing the Model Context Protocol (MCP) for running arbitrary JavaScript in ephemeral Docker containers with on‑the‑fly npm dependency installation.
The toolset is worth reading before you wire it up, because it tells you what the integration is really for:
Session — based tools** (sandbox_initialize ➔ run_js ➔ sandbox_stop) are ideal when you want to:One — shot execution** with run_js_ephemeral is perfect for:run_js_ephemeral — Run a one-off JS script in a brand-new disposable containersandbox_initialize — The sandbox_initialize tool exposed by this serversandbox_exec — The sandbox_exec tool exposed by this serverrun_js — The run_js tool exposed by this serversandbox_stop — The sandbox_stop tool exposed by this serversearch_npm_packages — Search for npm packages by a search term and get their name, description, and a README snippetnpm on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.
Configuration is passed through the environment: FILES_DIR, SANDBOX_MEMORY_LIMIT, SANDBOX_CPU_LIMIT. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
Among the cloud and infrastructure options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Node Code Sandbox MCP's toolset — Session, One, run_js_ephemeral and 5 more — is a fair guide to whether it matches your workflow. It is maintained by alfonsograziano; worth a glance at recent repository activity before you build anything load-bearing on it.
SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.
| Tool | What it does |
|---|---|
| Session | based tools** (sandbox_initialize ➔ run_js ➔ sandbox_stop) are ideal when you want to: |
| One | shot execution** with run_js_ephemeral is perfect for: |
| run_js_ephemeral | Run a one-off JS script in a brand-new disposable container. |
| sandbox_initialize | The sandbox_initialize tool exposed by this server. |
| sandbox_exec | The sandbox_exec tool exposed by this server. |
| run_js | The run_js tool exposed by this server. |
| sandbox_stop | The sandbox_stop tool exposed by this server. |
| search_npm_packages | Search for npm packages by a search term and get their name, description, and a README snippet. |
or with NPX:
```json
{
"mcpServers": {
"node-code-sandbox-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "node-code-sandbox-mcp"],
"env": {
"FILES_DIR": "/Users/alfonsograziano/Desktop/node-sandbox",
"SANDBOX_MEMORY_LIMIT": "512m", // optional
"SANDBOX_CPU_LIMIT": "0.75" // optional
}
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| FILES_DIR | Filesystem location the server is allowed to use. | Optional |
| SANDBOX_MEMORY_LIMIT | Configuration value read at startup. | Optional |
| SANDBOX_CPU_LIMIT | Configuration value read at startup. | Optional |
Manage your whole Supabase project in conversation — database, auth, storage, Edge Functions and branches.
Stop letting your assistant hallucinate n8n node parameters — this server hands it the real schemas, templates and validation.
AWS Labs' official server suite — current AWS docs, CDK guidance, cost analysis and service tools.
Cloud browsers for AI agents — automation sessions that run in Browserbase's fleet, not on your machine.
Workers, KV, R2 and D1 by conversation — Cloudflare's official remote servers for building and observability.
Dashboards, Prometheus and Loki queries, incidents and alerts — observability by conversation.