MCP-REPL
by AnEntrypoint
gm-exec
注意:如果您正在寻找 mcp-repl、glootie 或 GM... 它们现在位于:http://github.com/anEntrypoint/gm
适用于 MCP 客户端和 CLI 的代码执行工具。支持多种语言(JS/TS、Python、Go、Rust、C、C++、Deno、Java、bash)。基于 Bun 构建,并使用 PM2 进行进程隔离管理。
Related MCP server: MCP QuickJS Runner
MCP 服务器
添加到您的 MCP 客户端配置中:
{
"mcpServers": {
"gm-exec": {
"command": "bunx",
"args": ["gm-exec", "--mcp"]
}
}
}或全局安装:
bun install -g gm-exec
gm-exec --mcpCLI
bunx gm-exec-cli exec --cwd=/app "console.log('hello')"
bunx gm-exec-cli bash --cwd=/app "npm install && npm test"
bunx gm-exec-cli exec --lang=python --cwd=/app "print('hello')"
bunx gm-exec-cli exec --file=script.js命令
gm-exec-cli exec [options] <code> Execute code (waits up to 15s, then backgrounds)
--lang=<lang> nodejs (default), python, go, rust, c, cpp, java, deno
--cwd=<dir> Working directory
--file=<path> Read code from file
gm-exec-cli bash [--cwd=<dir>] <cmd> Execute bash commands, same 15s ceiling
gm-exec-cli status <task_id> Poll status + drain output of a background task
gm-exec-cli close <task_id> Delete a background task
gm-exec-cli runner start Start the runner manually (PM2, no autorestart)
gm-exec-cli runner stop Stop the runner
gm-exec-cli runner status Show runner PM2 status后台执行
命令有 15 秒的硬性执行上限。如果在此之后仍在运行,进程将被置于后台,您将获得一个带有监控说明的任务 ID:
Backgrounded after 15s — task still running.
Task ID: task_3
Watch output:
gm-exec-cli status task_3
gm-exec-cli close task_3
gm-exec-cli runner stop运行器会在每个命令之前自动启动,并在之后自动停止——除非任务被置于后台,在这种情况下,运行器将保持活动状态,直到您明确停止它。
支持的语言
语言 | 运行时 |
JavaScript / TypeScript | Node.js / Bun |
Python | python3 |
Go | go run |
Rust | rustc |
C | gcc |
C++ | g++ |
Java | javac + java |
Deno | deno run |
bash / sh / zsh | shell |
要求
Bun ≥ 1.0
curl -fsSL https://bun.sh/install | bashResources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AnEntrypoint/gm-exec'
If you have feedback or need assistance with the MCP directory API, please join our Discord server