/ Verzeichnis / Playground / mcp-js (V8 sandbox)
● Community r33drichards ⚡ Sofort

mcp-js (V8 sandbox)

von r33drichards · r33drichards/mcp-js

Run untrusted JS in a V8 isolate — persistent heap, S3-backed snapshots.

mcp-js exposes a V8 isolate as an MCP code-execution tool. It can persist the heap across calls (so variables survive between tool calls) and snapshot to S3 — useful for long-running data-prep sessions where you want JavaScript state without standing up a notebook.

Warum nutzen

Hauptfunktionen

Live-Demo

In der Praxis

mcp-js-v8.replay ▶ bereit
0/0

Installieren

Wählen Sie Ihren Client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "mcp-js-v8": {
      "command": "mcp-js",
      "args": []
    }
  }
}

Öffne Claude Desktop → Settings → Developer → Edit Config. Nach dem Speichern neu starten.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "mcp-js-v8": {
      "command": "mcp-js",
      "args": []
    }
  }
}

Cursor nutzt das gleiche mcpServers-Schema wie Claude Desktop. Projektkonfiguration schlägt die globale.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "mcp-js-v8": {
      "command": "mcp-js",
      "args": []
    }
  }
}

Klicken Sie auf das MCP-Servers-Symbol in der Cline-Seitenleiste, dann "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "mcp-js-v8": {
      "command": "mcp-js",
      "args": []
    }
  }
}

Gleiche Struktur wie Claude Desktop. Windsurf neu starten zum Übernehmen.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "mcp-js-v8",
      "command": "mcp-js",
      "args": []
    }
  ]
}

Continue nutzt ein Array von Serverobjekten statt einer Map.

~/.config/zed/settings.json
{
  "context_servers": {
    "mcp-js-v8": {
      "command": {
        "path": "mcp-js",
        "args": []
      }
    }
  }
}

In context_servers hinzufügen. Zed lädt beim Speichern neu.

claude mcp add mcp-js-v8 -- mcp-js 

Einzeiler. Prüfen mit claude mcp list. Entfernen mit claude mcp remove.

Anwendungsfälle

Praxisnahe Nutzung: mcp-js (V8 sandbox)

Iteratively shape a JSON dataset across multiple tool calls

👤 Data wranglers ⏱ ~15 min intermediate

Wann einsetzen: Multi-step transform where you want to keep intermediate variables.

Voraussetzungen
  • Server/skill installed and authenticated — See repo README
Ablauf
  1. Load data
    eval_js: const data = await fetch('https://example.com/data.json').then(r => r.json()); data.length✓ Kopiert
    → Length printed
  2. Iterate
    eval_js: const filtered = data.filter(x => x.status === 'active'); filtered.length✓ Kopiert
    → Filtered count — data still in heap
  3. Snapshot
    snapshot_save name=cleanup-2026-05-21✓ Kopiert
    → Saved

Ergebnis: Notebook-style JS sessions without a notebook.

Fallstricke
  • V8 isolate has no Node APIs by default. If you need fs/net, opt in explicitly — V8 isolate has no Node APIs by default. If you need fs/net, opt in explicitly — and remember Claude can then write to disk.
Kombinieren mit: filesystem

Kombinationen

Mit anderen MCPs für 10-fache Wirkung

mcp-js-v8 + filesystem

Pair with filesystem for complementary capabilities

Use this server together with filesystem to complete a multi-step task.✓ Kopiert

Werkzeuge

Was dieses MCP bereitstellt

WerkzeugEingabenWann aufrufenKosten
eval_js context_id, code Run a JS snippet, optionally with state from prior calls free (local)
snapshot_save context_id, name Persist current heap free / S3 PUT
snapshot_load name Resume an earlier session free / S3 GET

Kosten & Limits

Was der Betrieb kostet

API-Kontingent
See provider docs for rate limits
Tokens pro Aufruf
Varies by tool
Kosten in €
See repo README for pricing details
Tipp
Cache tool results and avoid repeated identical calls.

Sicherheit

Rechte, Secrets, Reichweite

Credential-Speicherung: Use environment variables; never commit secrets
Datenabfluss: Tool calls go to the provider's API as documented

Fehlerbehebung

Häufige Fehler und Lösungen

context expired

Contexts expire after the configured idle window. Use snapshot_save before long pauses.

Prüfen: Reload from snapshot_load
memory limit exceeded

Raise MCP_JS_MAX_HEAP_MB or chunk the input.

Prüfen: Reduce dataset size and retry

Alternativen

mcp-js (V8 sandbox) vs. andere

AlternativeWann stattdessenKompromiss
yepcode/mcp-server-jsYou want hosted execution with secretsHosted/paid vs local/free

Mehr

Ressourcen

📖 Offizielle README auf GitHub lesen

🐙 Offene Issues ansehen

🔍 Alle 400+ MCP-Server und Skills durchsuchen