MCP-REPL

v1.0.0Developer Toolsstable

A secure JavaScript REPL server that enables executing code snippets in a sandboxed environment with memory protection, timeout handling, and comprehensive error reporting.

ai-toolsastclaudecode-analysiscode-execution
Share:
122
Stars
0
Downloads
0
Weekly
0/5

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

Execute JavaScript code snippets in a sandboxed, secure environment.
Test code logic with memory protection, timeout handling, and comprehensive error reporting.
AnEntrypoint

Maintainer

LicenseMIT License
Languagejavascript
Versionv1.0.0
UpdatedMay 7, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-repl

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 | bash
2

Install 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-exec
3

Add 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"]
    }
  }
}
4

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.

5

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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-repl": { "command": "npx", "args": ["-y", "mcp-repl"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides