/ الدليل / الملعب / mcp-js (V8 sandbox)
● مجتمع r33drichards ⚡ فوري

mcp-js (V8 sandbox)

بواسطة 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.

لماذا تستخدمه

الميزات الأساسية

عرض مباشر

كيف يبدو في الممارسة

mcp-js-v8.replay ▶ جاهز
0/0

التثبيت

اختر العميل

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

افتح Claude Desktop → Settings → Developer → Edit Config. أعد التشغيل بعد الحفظ.

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

يستخدم Cursor نفس مخطط mcpServers مثل Claude Desktop. إعدادات المشروع أولى من الإعدادات العامة.

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

انقر على أيقونة MCP Servers في شريط Cline الجانبي، ثم "Edit Configuration".

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

نفس الصيغة مثل Claude Desktop. أعد تشغيل Windsurf لتطبيق التغييرات.

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

يستخدم Continue مصفوفة من كائنات الخادم بدلاً من خريطة.

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

أضف إلى context_servers. يعيد Zed التحميل تلقائيًا عند الحفظ.

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

أمر من سطر واحد. تحقق باستخدام claude mcp list. احذف باستخدام claude mcp remove.

حالات الاستخدام

استخدامات عملية: mcp-js (V8 sandbox)

Iteratively shape a JSON dataset across multiple tool calls

👤 Data wranglers ⏱ ~15 min intermediate

متى تستخدمه: Multi-step transform where you want to keep intermediate variables.

المتطلبات الأساسية
  • Server/skill installed and authenticated — See repo README
الخطوات
  1. Load data
    eval_js: const data = await fetch('https://example.com/data.json').then(r => r.json()); data.length✓ تم النسخ
    → Length printed
  2. Iterate
    eval_js: const filtered = data.filter(x => x.status === 'active'); filtered.length✓ تم النسخ
    → Filtered count — data still in heap
  3. Snapshot
    snapshot_save name=cleanup-2026-05-21✓ تم النسخ
    → Saved

النتيجة: Notebook-style JS sessions without a notebook.

المزالق
  • 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.
اجمعها مع: filesystem

التركيبات

اجمعها مع خوادم MCP أخرى لتحقيق نتائج x10

mcp-js-v8 + filesystem

Pair with filesystem for complementary capabilities

Use this server together with filesystem to complete a multi-step task.✓ تم النسخ

الأدوات

ما يوفره هذا الـ MCP

الأداةالمدخلاتمتى تستدعيهاالتكلفة
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

التكلفة والحدود

تكلفة التشغيل

حصة API
See provider docs for rate limits
الرموز لكل استدعاء
Varies by tool
التكلفة المالية
See repo README for pricing details
نصيحة
Cache tool results and avoid repeated identical calls.

الأمان

الصلاحيات والأسرار ونطاق الأثر

تخزين بيانات الاعتماد: Use environment variables; never commit secrets
نقل البيانات الخارجي: Tool calls go to the provider's API as documented

استكشاف الأخطاء

الأخطاء الشائعة وحلولها

context expired

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

تحقق: Reload from snapshot_load
memory limit exceeded

Raise MCP_JS_MAX_HEAP_MB or chunk the input.

تحقق: Reduce dataset size and retry

البدائل

mcp-js (V8 sandbox) مقابل البدائل

البديلمتى تستخدمهاالمقايضة
yepcode/mcp-server-jsYou want hosted execution with secretsHosted/paid vs local/free

المزيد

الموارد

📖 اقرأ ملف README الرسمي على GitHub

🐙 تصفح القضايا المفتوحة

🔍 تصفح أكثر من 400 خادم MCP و Skills