MCP QuickJS Runner
MCP QuickJS ランナー
モデル コンテキスト プロトコル (MCP) を実装するサーバー。WebAssembly (WASM) にコンパイルされた QuickJS エンジン内で任意の JavaScript コードを安全に実行し、Node.js の組み込み WASI 実装を使用して実行するためのツールを提供します。
説明
このサーバーはMCPツールプロバイダーとして機能します。run_javascript_code run_javascript_code単一のツールを公開しており、このツールはJavaScriptコードの文字列を入力として受け取ります。コードはサンドボックス化されたQuickJS WASM環境内で実行されます。サーバーは実行から標準出力( stdout )と標準エラー( stderr )ストリームをキャプチャし、実行エラーとともにMCPクライアントに返します。
これにより、言語モデルやその他の MCP クライアントは、ホスト システムを危険にさらすことなく、信頼できない可能性のある JavaScript コード スニペットを安全に実行できるようになります。
Related MCP server: Node Code Sandbox MCP
特徴
安全な実行: QuickJS と Node.js WASI を使用して、WASM サンドボックスで JavaScript を実行します。
**標準 I/O キャプチャ:**実行された JavaScript コードから
stdoutとstderrをキャプチャします。エラー報告: QuickJS からの実行時エラーとゼロ以外の終了コードを報告します。
MCP 統合:
stdio経由で標準 MCP ツールとして機能を公開します。**TypeScript で構築:**開発中に型の安全性を提供します。
仕組み
WASM モジュール: WebAssembly System Interface (WASI) をターゲットとした、事前コンパイルされた QuickJS エンジン (
qjs-wasi.wasm) を使用します。Node.js WASI: Node.js の
node:wasiモジュールを活用して、WASM モジュールをインスタンス化して実行します。stdio リダイレクト (一時ファイル): WASM 環境から
stdoutとstderrをキャプチャするために、サーバーは現在、node:wasiと互換性のある標準的なアプローチに依存しています。node:fs/promisesとnode:os使用して、ホスト ファイルシステム上に一時ディレクトリが作成されます。このディレクトリ内で
stdoutおよびstderrの一時ファイルが開かれます。これらのファイルの**実際の OS ファイル記述子は、**初期化中に
WASIインスタンスに渡されます (stdout: fd、stderr: fd)。QuickJS WASM モジュールは出力をこれらの記述子に書き込み、WASI によって一時ファイルにルーティングされます。
実行が終了すると、サーバーはファイル ハンドルを閉じ、一時ファイルの内容を読み取ります。
一時ディレクトリとファイルがクリーンアップされます。
(注:
node:wasi現在 stdio に実際の OS ファイル記述子を必要とするため、メモリ内パイプやmemfsなどの仮想ファイルシステムを使用する試みは失敗しました。)
**MCP 通信:**サーバーは
@modelcontextprotocol/sdkを使用して、stdio経由で MCP 要求をリッスンし、プロトコルに従ってフォーマットされた実行結果で応答します。
前提条件
Node.js (v23.x 以降を推奨、特定のバージョンの
node:wasi互換性を確認してください)QuickJS WASMファイル(
qjs-wasi.wasm)は、コンパイル済みのサーバースクリプトと同じディレクトリ(例:./dist/qjs-wasi.wasm``./dist/server.js)に配置する必要があります。このファイルは別途入手またはコンパイルする必要がある場合があります。
インストール
リポジトリをクローンします (該当する場合)。
依存関係をインストールします:
npm install
使用法
node server.tsThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseBqualityDmaintenanceProvides a secure, isolated JavaScript execution environment with configurable time and memory limits for safely running code from Claude.1255
- FlicenseAqualityBmaintenanceA secure Node.js execution environment that allows coding agents and LLMs to run JavaScript dynamically, install NPM packages, and retrieve results while adhering to the Model Control Protocol.71344
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to interact with MCP servers by writing TypeScript/JavaScript code instead of direct tool calls. Provides a code execution sandbox that accesses MCP servers through HTTP proxy endpoints.9123Apache 2.0
- FlicenseNot gradedqualityDmaintenanceExecutes TypeScript code in a secure sandbox with IPC-bridged access to MCP tools like filesystem operations and network requests.3
Related MCP Connectors
Execute code in 8 languages (Python, JS, TS, Go, Java, C++, C, Bash) in gVisor sandboxes.
Host static HTML pages, generate PDFs, screenshots, scrape JS sites, run sandboxed JavaScript.
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jlucaso1/mcp-javascript-sandbox'
If you have feedback or need assistance with the MCP directory API, please join our Discord server