- Explore MCP Servers
- mcp-js
Mcp Js
What is Mcp Js
mcp-js is a Rust-based Model Context Protocol (MCP) server that provides a V8 JavaScript runtime for AI agents like Claude and Cursor. It enables the execution of JavaScript code in a secure environment and supports persistent heap snapshots.
Use cases
Use cases for mcp-js include developing AI agents that utilize JavaScript for processing, integrating with other MCP clients, and maintaining stateful interactions in AI applications.
How to use
To use mcp-js, install it using the provided install script. After installation, run the server with either S3 or a local directory for heap storage by specifying the appropriate command line arguments.
Key features
Key features of mcp-js include V8 JavaScript execution, support for persistent heap snapshots via S3 or local filesystem, implementation of the MCP protocol for integration with AI tools, and configurable storage options.
Where to use
mcp-js can be used in modern AI development environments, particularly for applications that require JavaScript execution and state persistence across sessions.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Js
mcp-js is a Rust-based Model Context Protocol (MCP) server that provides a V8 JavaScript runtime for AI agents like Claude and Cursor. It enables the execution of JavaScript code in a secure environment and supports persistent heap snapshots.
Use cases
Use cases for mcp-js include developing AI agents that utilize JavaScript for processing, integrating with other MCP clients, and maintaining stateful interactions in AI applications.
How to use
To use mcp-js, install it using the provided install script. After installation, run the server with either S3 or a local directory for heap storage by specifying the appropriate command line arguments.
Key features
Key features of mcp-js include V8 JavaScript execution, support for persistent heap snapshots via S3 or local filesystem, implementation of the MCP protocol for integration with AI tools, and configurable storage options.
Where to use
mcp-js can be used in modern AI development environments, particularly for applications that require JavaScript execution and state persistence across sessions.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
mcp-v8: V8 JavaScript MCP Server
A Rust-based Model Context Protocol (MCP) server that exposes a V8 JavaScript runtime as a tool for AI agents like Claude and Cursor. Supports persistent heap snapshots via S3 or local filesystem, and is ready for integration with modern AI development environments.
Features
- V8 JavaScript Execution: Run arbitrary JavaScript code in a secure, isolated V8 engine.
- Heap Snapshots: Persist and restore V8 heap state between runs, supporting both S3 and local file storage.
- MCP Protocol: Implements the Model Context Protocol for seamless tool integration with Claude, Cursor, and other MCP clients.
- Configurable Storage: Choose between S3 or local directory for heap storage at runtime.
Installation
Install mcp-v8 using the provided install script:
curl -fsSL https://raw.githubusercontent.com/r33drichards/mcp-js/main/install.sh | sudo bash
This will automatically download and install the latest release for your platform to /usr/local/bin/mcp-v8 (you may be prompted for your password).
Advanced users: If you prefer to build from source, see the Build from Source section at the end of this document.
Command Line Arguments
mcp-v8 supports the following command line arguments:
--s3-bucket <bucket>: Use AWS S3 for heap snapshots. Specify the S3 bucket name. (Conflicts with--directory-path)--directory-path <path>: Use a local directory for heap snapshots. Specify the directory path. (Conflicts with--s3-bucket)
Note: You must specify either --s3-bucket or --directory-path. If neither is provided, the server defaults to S3 with the bucket name test-mcp-js-bucket.
Quick Start
After installation, you can run the server directly. Choose one of the following options:
# Use S3 for heap storage (recommended for cloud/persistent use)
mcp-v8 --s3-bucket my-bucket-name
# Use local filesystem directory for heap storage (recommended for local development)
mcp-v8 --directory-path /tmp/mcp-v8-heaps
Integration
Claude for Desktop
- Install the server as above.
- Open Claude Desktop → Settings → Developer → Edit Config.
- Add your server to
claude_desktop_config.json:
{
"mcpServers": {
"js": {
"command": "/usr/local/bin/mcp-v8 --s3-bucket my-bucket-name"
}
}
}
- Restart Claude Desktop. The new tools will appear under the hammer icon.
Cursor
- Install the server as above.
- Create or edit
.cursor/mcp.jsonin your project root:
{
"mcpServers": {
"js": {
"command": "/usr/local/bin/mcp-v8 --directory-path /tmp/mcp-v8-heaps"
}
}
}
- Restart Cursor. The MCP tools will be available in the UI.
Example Usage
- Ask Claude or Cursor: “Run this JavaScript:
1 + 2” - Use heap snapshots to persist state between runs.
Heap Storage Options
You can configure heap storage using the following command line arguments:
- S3:
--s3-bucket <bucket>- Example:
mcp-v8 --s3-bucket my-bucket-name - Requires AWS credentials in your environment.
- Example:
- Filesystem:
--directory-path <path>- Example:
mcp-v8 --directory-path /tmp/mcp-v8-heaps
- Example:
Note: Only one storage backend can be used at a time. If both are provided, the server will return an error.
Limitations
While mcp-v8 provides a powerful and persistent JavaScript execution environment, there are limitations to its runtime.
- No
async/awaitor Promises: Asynchronous JavaScript is not supported. All code must be synchronous. - No
fetchor network access: There is no built-in way to make HTTP requests or access the network. - No
console.logor standard output: Output fromconsole.logor similar functions will not appear. To return results, ensure the value you want is the last line of your code. - No file system access: The runtime does not provide access to the local file system or environment variables.
- No
npm installor external packages: You cannot install or import npm packages. Only standard JavaScript (ECMAScript) built-ins are available. - No timers: Functions like
setTimeoutandsetIntervalare not available. - No DOM or browser APIs: This is not a browser environment; there is no access to
window,document, or other browser-specific objects.
Build from Source (Advanced)
If you prefer to build from source instead of using the install script:
Prerequisites
- Rust (nightly toolchain recommended)
- (Optional) AWS credentials for S3 storage
Build the Server
cd server
cargo build --release
The built binary will be located at server/target/release/server. You can use this path in the integration steps above instead of /usr/local/bin/mcp-v8 if desired.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










