Rust-based Model Context Protocol (MCP) server that embeds a V8 JavaScript runtime with optional persistent heap snapshots (S3 or local FS).
https://github.com/r33drichards/mcp-jsStop losing context every time you restart Claude or Cursor. This MCP server embeds a V8 JavaScript runtime directly into your AI workflow with persistent heap snapshots—your variables, functions, and state survive between conversations.
You're working on a complex calculation with Claude, building up data structures and intermediate results. Then the conversation ends or you restart the app—everything's gone. You're back to square one, re-explaining context and rebuilding state.
Most AI coding assistants treat each interaction as isolated. But real development work is iterative. You build functions, test them, refine them, and accumulate useful utilities over time.
This MCP server changes that. It gives Claude, Cursor, and other MCP-compatible agents access to a persistent V8 JavaScript environment. Your code, variables, and state automatically persist between sessions through heap snapshots stored in S3 or locally.
Key benefits:
Multi-step data analysis: Process datasets incrementally, keeping intermediate results between AI interactions. Build up aggregations, filters, and transformations that persist.
Algorithm development: Implement complex algorithms step-by-step with your AI assistant. Test different approaches while maintaining previous iterations and helper functions.
Utility library building: Create and refine JavaScript utilities during AI conversations. These functions remain available for future sessions.
Stateful calculations: Work on financial models, scientific computations, or any complex math that requires maintaining intermediate state.
Get running in under 2 minutes:
# Install via script
curl -fsSL https://raw.githubusercontent.com/r33drichards/mcp-js/main/install.sh | sudo bash
Claude Desktop integration:
{
"mcpServers": {
"js": {
"command": "/usr/local/bin/mcp-v8 --s3-bucket my-bucket-name"
}
}
}
Cursor integration:
{
"mcpServers": {
"js": {
"command": "/usr/local/bin/mcp-v8 --directory-path /tmp/mcp-v8-heaps"
}
}
}
Choose S3 for persistent cloud storage or local filesystem for development work.
Built on Rust and V8 for performance and security. The server creates isolated JavaScript contexts that automatically snapshot to your chosen storage backend. When you start a new AI session, your previous JavaScript state loads automatically.
The runtime is intentionally sandboxed—no network access, no filesystem access, no npm packages. This keeps it secure while providing the core JavaScript functionality you need for calculations, data manipulation, and algorithm development.
Perfect for developers who want their AI coding sessions to build on each other rather than starting from scratch every time.