MCP-REPL
A secure JavaScript REPL server that enables executing code snippets in a sandboxed environment with memory protection, timeout handling, and comprehensive error reporting.
What is MCP-REPL?
MCP-REPL is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to secure javascript repl server that enables executing code snippets in a sandboxed environment with memory protection, timeout handling, and comprehensive error reporting.
A secure JavaScript REPL server that enables executing code snippets in a sandboxed environment with memory protection, timeout handling, and comprehensive error reporting.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A secure JavaScript REPL server that enables executing code
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-replConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use MCP-REPL
MCP-REPL (powered by the gm-exec package) is a secure multi-language code execution server that lets AI assistants run code snippets in a sandboxed environment with memory protection, a hard 15-second execution timeout, and comprehensive error reporting. It supports JavaScript, TypeScript, Python, Go, Rust, C, C++, Java, Deno, and bash, making it a practical tool for AI-assisted development workflows that require running code to validate logic, test snippets, or execute build commands. Long-running tasks are automatically backgrounded and can be monitored by task ID, preventing the AI from blocking on slow operations.
Prerequisites
- Bun 1.0 or higher installed (required runtime — install via curl -fsSL https://bun.sh/install | bash)
- Language runtimes for the languages you want to execute (Python, Go, Rust toolchain, Java JDK, etc.) must be installed separately
- PM2 process manager is used internally for task management (installed automatically by gm-exec)
- An MCP-compatible AI client such as Claude Desktop or Claude Code
Install Bun (required runtime)
gm-exec requires Bun as its JavaScript runtime. Install it with the official one-liner if not already present.
curl -fsSL https://bun.sh/install | bashInstall gm-exec globally via Bun
Install the gm-exec package globally so it is available as both an MCP server and a CLI tool. Alternatively use bunx for a no-install run.
bun install -g gm-execAdd the MCP server to your client configuration
Register gm-exec as an MCP server in your claude_desktop_config.json using bunx so it always runs the latest version.
{
"mcpServers": {
"gm-exec": {
"command": "bunx",
"args": ["gm-exec", "--mcp"]
}
}
}Restart your MCP client and verify the tools load
Restart Claude Desktop or Claude Code. The server exposes exec, bash, status, close, and runner management commands. Verify by asking the AI to run a simple snippet.
Test execution from the CLI (optional)
Validate that code execution works correctly before using it through the AI assistant by running a quick test directly from the terminal.
bunx gm-exec-cli exec --lang=python "print('hello from gm-exec')"MCP-REPL Examples
Client configuration
Minimal claude_desktop_config.json for the gm-exec MCP server using bunx for automatic version management.
{
"mcpServers": {
"gm-exec": {
"command": "bunx",
"args": ["gm-exec", "--mcp"]
}
}
}Prompts to try
Example prompts for running code snippets, shell commands, and managing long-running tasks through the AI assistant.
- "Run this Python snippet and show me the output: import json; print(json.dumps({'hello': 'world'}))"
- "Execute 'npm install && npm test' in my project directory"
- "Run this JavaScript code: const arr = [1,2,3]; console.log(arr.reduce((a,b) => a+b, 0))"
- "Check the status of background task task_3"
- "Run this Go function and return the result"Troubleshooting MCP-REPL
'bunx: command not found' when the MCP server tries to start
Bun was not installed or is not in the PATH available to your MCP client. Install Bun via 'curl -fsSL https://bun.sh/install | bash', then ensure ~/.bun/bin is in your system PATH (not just your shell's PATH). On macOS you may need to add it to /etc/paths.
Code execution times out after 15 seconds
The 15-second ceiling is intentional for security. Long-running processes are automatically backgrounded. Use the status command with the returned task_id to poll the result: 'bunx gm-exec-cli status <task_id>'.
Python or Go execution fails with 'interpreter not found'
gm-exec requires each language runtime to be independently installed on the host. Install Python via your OS package manager, Go from golang.org, Rust via rustup, etc. The gm-exec package does not bundle language runtimes.
Frequently Asked Questions about MCP-REPL
What is MCP-REPL?
MCP-REPL is a Model Context Protocol (MCP) server that secure javascript repl server that enables executing code snippets in a sandboxed environment with memory protection, timeout handling, and comprehensive error reporting. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install MCP-REPL?
Follow the installation instructions on the MCP-REPL GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with MCP-REPL?
MCP-REPL works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is MCP-REPL free to use?
Yes, MCP-REPL is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
MCP-REPL Alternatives — Similar Developer Tools Servers
Looking for alternatives to MCP-REPL? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up MCP-REPL in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use MCP-REPL?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.