MCP Js logo

MCP Js

by r33drichards

Runs JavaScript and TypeScript in an isolated V8 sandbox with persistent state, async execution, output capture, and policy-controlled host access.

Install MCP Js

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for r33drichards/mcp-js, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

r33drichards/mcp-js MCP server gives AI agents a sandboxed V8 runtime for executing JavaScript and TypeScript locally. Its primary run_js tool supports either stateful executions backed by heap snapshots or stateless calls that return output directly. Agents can poll and cancel asynchronous jobs, read paginated console output, and optionally access files, networks, subprocesses, modules, WebAssembly, or upstream MCP tools through explicit policies. Reach for it when code execution and programmable data handling are a better fit than a fixed set of narrow tools.

Use cases

  • Run data transformation scripts inside an isolated runtime
  • Maintain JavaScript state across agent turns
  • Process long-running jobs asynchronously
  • Inspect paginated console output from generated code
  • Call approved upstream MCP tools from JavaScript

Key features

  • Sandboxed JavaScript and TypeScript execution
  • Stateful heap snapshots or stateless execution
  • Asynchronous jobs with polling and cancellation
  • Paginated console output capture
  • Policy-gated filesystem, network, subprocess, module, and MCP access
  • Stdio, Streamable HTTP, SSE, and REST transports

Tools5

What MCP Js lets your agent do. Expand a tool for its parameters.

Self-reported~76 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

12/15 checks healthy over the last 80d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars64Stargazers on the source repository.
Last commit2d agoMost recent push to the default branch.
Tools exposed5Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Js works

What r33drichards/mcp-js MCP server does

r33drichards/mcp-js provides an MCP interface to a JavaScript and TypeScript runtime built on an isolated V8 engine. Agents submit code through run_js, allowing them to perform loops, branching, transformations, asynchronous work, and other logic inside the runtime rather than expressing every operation as a separate tool call.

The server supports two execution styles. Stateful mode preserves JavaScript variables and objects across calls through content-addressed V8 heap snapshots. Stateless mode runs each request independently and returns its output and any error in the response. Console messages are captured and can be read incrementally.

How it works

In stateful mode, run_js queues an execution and returns an execution ID. The client can use that ID to inspect status, retrieve the result, read console output, or stop the job. Output supports pagination by either lines or bytes, which is useful for scripts that produce more output than a single response should contain.

The runtime includes JavaScript and TypeScript support, with TypeScript type syntax removed through SWC rather than type-checked. Promises, async/await, timers, and the standard WebAssembly API are available. Optional preloaded WebAssembly modules can be exposed as globals.

Host access is separated from the JavaScript runtime. Network requests, filesystem operations, subprocesses, external module imports, and calls to other MCP servers are disabled until enabled by configuration and OPA/Rego policy. When enabled, scripts can use fetch, filesystem APIs, subprocess interfaces, external npm:, jsr:, or URL modules, and mcp.callTool() or related MCP helpers.

Setup and configuration

The server can be installed with the project’s shell installer, run through Nix, deployed with Docker, built from source, or deployed using the supplied Railway configuration. Supported installer platforms are Linux x86_64, Linux arm64, and macOS Apple Silicon.

MCP clients can connect through stdio. The server also offers Streamable HTTP and a legacy HTTP+SSE transport. Streamable HTTP uses the /mcp endpoint when an HTTP port is enabled. A REST sidecar exposes script execution at /api/exec, accepting JSON requests or raw script bodies.

Configuration can be supplied with command-line flags or one TOML/JSON file passed to --config. The MCP_V8_CONFIG environment variable can identify that file. Settings take precedence in this order: command-line flags, MCP_V8_* environment variables, configuration-file values, then defaults.

Tools and capabilities

  • run_js executes code in stateful or stateless mode.
  • get_execution checks the status and result of a stateful execution.
  • get_execution_output reads stored console output with line- or byte-based pagination.
  • cancel_execution terminates a running execution.
  • list_executions lists executions and their statuses.
  • Heap snapshots can persist state locally, in S3, or through an S3 write-through cache.
  • Policy-controlled integrations include fetch, filesystem access, subprocesses, external modules, and upstream MCP servers.
  • JWKS-based JWT verification and optional Raft clustering are available for deployments that need authentication or replicated session metadata.
  • Native MCP tasks are supported over Streamable HTTP and stdio for clients that declare the tasks extension.

Limitations and notes

The default policy blocks network, filesystem, subprocess, external module, and upstream MCP access. Enabling these capabilities requires deliberate policy configuration. TypeScript syntax is stripped for execution; the runtime does not perform TypeScript type checking. The legacy SSE transport does not provide the native MCP tasks extension. Stateful operation requires heap storage, while stateless mode avoids persisted execution state.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Js

r33drichards/mcp-js is an MCP server that connects AI agents to an isolated V8 JavaScript and TypeScript runtime. Its main tools run code, poll execution status, retrieve paginated console output, cancel running jobs, and list executions. Stateful mode preserves heap data across calls, while stateless mode returns each result directly.

Install it with the project’s shell installer, or run it with Nix, Docker, a source build, or the Railway deployment configuration. The installer places binaries in `/usr/local/bin` and supports Linux x86_64, Linux arm64, and macOS Apple Silicon.

Add `mcp-v8` as a command in the client’s `mcpServers` configuration and pass `--stateless` or another supported argument. Claude Desktop and Cursor use the same MCP configuration style shown by the project; Claude Code can add the server with `claude mcp add`.

Yes, but only after those capabilities are enabled through configuration and OPA/Rego policies. Filesystem operations use the runtime’s filesystem APIs, while network access uses `fetch`; both are denied by default.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Js AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/r33drichards-mcp-js?style=directory)](https://allmcps.com/mcp/r33drichards-mcp-js)
HTML Embed
<a href="https://allmcps.com/mcp/r33drichards-mcp-js"><img src="https://allmcps.com/api/badge/r33drichards-mcp-js?style=directory" alt="MCP Js on AllMCPs" /></a>