Skip to content

@elad12390/node-runner-mcp

2.1.4
ToolInstructionBundle

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-mcp

Node Runner MCP

Core Philosophy

  1. Controlled execution — Every script runs with configurable memory limits (default: 512MB) and timeouts.
  2. No runaway processes — Automatic termination prevents CI hangs and leaked processes.
  3. Output safety — Truncates excessive output to prevent context overflow.
  4. Validation first — Confirms script exists in package.json before executing.
  5. Use over bash — Always prefer this MCP over raw bash for 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

TaskToolKey params
Run any npm/yarn scriptrun_scriptscript, max_memory_mb, timeout_ms
See available scriptslist_scriptsproject_root
Fresh installinstall_dependenciespackage_manager
Project metadataget_project_infoproject_root

Reference Index

FileContents
(no references)All documentation is self-contained

Command Palette

Search packages, docs, and navigate Tank