- Home
- MCP servers
- MCP V8 Server
MCP V8 Server
- rust
27
GitHub Stars
rust
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"r33drichards-mcp-js": {
"command": "mcp-v8",
"args": [
"--s3-bucket",
"my-bucket-name"
],
"env": {
"MCP_DEBUG": "true",
"AWS_ACCESS_KEY_ID": "YOUR_AWS_ACCESS_KEY_ID",
"AWS_SECRET_ACCESS_KEY": "YOUR_AWS_SECRET_ACCESS_KEY"
}
}
}
}You run the mcp-v8 server to expose a secure, isolated V8 JavaScript runtime as an MCP tool. It lets AI agents execute synchronous JavaScript, persist or restore heap state across runs, and connect through different transports (stdio, HTTP, or SSE) for seamless integration with tools like Claude and Cursor.
How to use
Choose how you want to connect to the server and whether you want to preserve state between executions. In stateless mode, every JavaScript run starts from a fresh V8 isolate with no heap persistence. In stateful mode, you store heap snapshots either on S3 or in a local directory so subsequent runs can reuse context and data.
Popular usage patterns include:
- Running in stdio mode for local development or embedding in other processes.
- Exposing the server over HTTP for networked clients or containerized deployments.
- Streaming responses with SSE for responsive, event-driven workflows.
You can configure storage, transport, and mode at startup. The following options are available:
- S3 for heap snapshots
- Local filesystem directory for heap snapshots
- Stateless mode to skip heap persistence entirely
- HTTP transport on a chosen port
- SSE transport on a chosen port
How to install
Prerequisites: you need a Unix-like environment with curl and a compatible shell. If you plan to build from source, you will also need Rust toolchain.
Install the server using the automated install script. This will place the binary at /usr/local/bin/mcp-v8.
curl -fsSL https://raw.githubusercontent.com/r33drichards/mcp-js/main/install.sh | sudo bash
Additional configuration and security notes
Only one storage option may be active at a time. If you specify multiple storage options, the server will return an error.
In stateless mode there is no heap persistence, which is ideal for one-off computations or serverless environments.
When using HTTP transport, the server upgrades the connection from HTTP to MCP protocol, enabling network-based clients to interact with the JavaScript runtime.
Examples of common configurations
Stateful with S3 storage over the stdio transport:
/usr/local/bin/mcp-v8 --s3-bucket my-bucket-name
Stateful with local filesystem storage over the stdio transport:
/usr/local/bin/mcp-v8 --directory-path /tmp/mcp-v8-heaps
Stateless mode over the stdio transport:
/usr/local/bin/mcp-v8 --stateless
HTTP transport on port 8080 using local storage:
mcp-v8 --directory-path /tmp/mcp-v8-heaps --http-port 8080
Available tools
execute_js
Execute a JavaScript expression or code snippet inside the V8 runtime and return the result.
heap_store
Persist and restore the V8 heap state between executions using the configured storage backend.
stateless_mode
Run JavaScript executions without any heap persistence, ensuring fresh isolates every time.
mcp_integration
Expose the V8 runtime as an MCP tool that can be integrated with Claude, Cursor, and other MCP clients.
transports
Provide multiple transports (stdio, http, SSE) to connect MCP clients to the runtime.