MCP QuickJS Runner
Provides a secure environment to execute arbitrary JavaScript code inside a sandboxed QuickJS WASM environment, capturing standard output, standard error, and execution errors.
Utilizes Node.js's built-in WASI implementation to instantiate and run the QuickJS WASM module, enabling secure JavaScript code execution with captured I/O.
Leverages WebAssembly to create a secure sandbox for JavaScript code execution through a pre-compiled QuickJS engine targeting the WebAssembly System Interface (WASI).
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP QuickJS Runnerconsole.log('Hello, World!');"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP QuickJS Runner
A server implementing the Model Context Protocol (MCP) that provides a tool to securely execute arbitrary JavaScript code within a QuickJS engine compiled to WebAssembly (WASM) and run using Node.js's built-in WASI implementation.
Description
This server acts as an MCP tool provider. It exposes a single tool, run_javascript_code, which takes a string of JavaScript code as input. The code is then executed inside a sandboxed QuickJS WASM environment. The server captures the standard output (stdout) and standard error (stderr) streams from the execution and returns them, along with any execution errors, back to the MCP client.
This allows language models or other MCP clients to safely execute potentially untrusted JavaScript code snippets without compromising the host system.
Related MCP server: Node Code Sandbox MCP
Features
Secure Execution: Runs JavaScript in a WASM sandbox using QuickJS and Node.js WASI.
Standard I/O Capture: Captures
stdoutandstderrfrom the executed JavaScript code.Error Reporting: Reports runtime errors from QuickJS and non-zero exit codes.
MCP Integration: Exposes functionality as a standard MCP tool over
stdio.Built with TypeScript: Provides type safety during development.
How it Works
WASM Module: Uses a pre-compiled QuickJS engine (
qjs-wasi.wasm) targeting the WebAssembly System Interface (WASI).Node.js WASI: Leverages the
node:wasimodule in Node.js to instantiate and run the WASM module.Stdio Redirection (Temporary Files): To capture
stdoutandstderrfrom the WASM environment, the server currently relies on the standard approach compatible withnode:wasi:A temporary directory is created on the host filesystem using
node:fs/promisesandnode:os.Temporary files for
stdoutandstderrare opened within this directory.The real OS file descriptors for these files are passed to the
WASIinstance during initialization (stdout: fd,stderr: fd).The QuickJS WASM module writes its output to these descriptors, which gets routed by WASI to the temporary files.
After execution finishes, the server closes the file handles and reads the content of the temporary files.
The temporary directory and files are cleaned up.
(Note: Attempts to use in-memory pipes or virtual filesystems like
memfswere unsuccessful becausenode:wasicurrently requires real OS file descriptors for stdio.)
MCP Communication: The server uses
@modelcontextprotocol/sdkto listen for MCP requests viastdioand respond with the execution results formatted according to the protocol.
Prerequisites
Node.js (v23.x or later recommended, check
node:wasicompatibility for your specific version)The QuickJS WASM file (
qjs-wasi.wasm) must be present in the same directory as the compiled server script (e.g.,./dist/qjs-wasi.wasmrelative to./dist/server.js). You may need to obtain or compile this separately.
Installation
Clone the repository (if applicable).
Install dependencies:
npm install
Usage
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.Last updated1765
- 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.Last updated71544
- Alicense-qualityDmaintenanceAutomatically converts JavaScript modules into MCP-compatible servers, making any JavaScript function accessible to AI systems through secure sandboxing with automatic type inference.Last updated5MIT
- Alicense-qualityDmaintenanceEnables 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.Last updated9121Apache 2.0
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