@elad12390/node-runner-mcp
2.1.4ToolInstructionBundle
Description
MCP server for safely running Node.js project commands with memory limits and timeout protection. Prevents runaway processes, memory leaks, and context overflow when AI agents execute npm/yarn/pnpm scripts. Tools: run_script, list_scripts, install_dependencies, get_project_info.
Triggered by
run npm scriptnode runnersafe npm runrun build safelyrun tests safelynpm command
Download
Concerns Found
tank install @elad12390/node-runner-mcpNode Runner MCP
Core Philosophy
- Controlled execution — Every script runs with configurable memory limits (default: 512MB) and timeouts.
- No runaway processes — Automatic termination prevents CI hangs and leaked processes.
- Output safety — Truncates excessive output to prevent context overflow.
- Validation first — Confirms script exists in
package.jsonbefore executing. - Use over bash — Always prefer this MCP over raw
bashfor Node.js commands when available.
Quick-Start: Common Problems
"Run the build"
run_script(project_root="/abs/path/to/project", script="build")
"Run tests with more memory"
run_script(project_root="...", script="test", max_memory_mb=1024, timeout_ms=120000)
"What scripts are available?"
list_scripts(project_root="...")
Returns all scripts from package.json with their commands.
"Install dependencies"
install_dependencies(project_root="...", package_manager="npm")
Supports npm, yarn, pnpm. Respects lockfiles.
"Get project info"
get_project_info(project_root="...")
Returns name, version, description, script names, dependency count.
Decision Trees
| Task | Tool | Key params |
|---|---|---|
| Run any npm/yarn script | run_script | script, max_memory_mb, timeout_ms |
| See available scripts | list_scripts | project_root |
| Fresh install | install_dependencies | package_manager |
| Project metadata | get_project_info | project_root |
Reference Index
| File | Contents |
|---|---|
| (no references) | All documentation is self-contained |