
An MCP server that allows you to run Node.js scripts and npm commands, with permission prompts via
An MCP server that allows you to run Node.js scripts and npm commands, with permission prompts via node-notifier.
·
An MCP server that allows you to run Node.js scripts and npm commands, with permission prompts via node-notifier.
npm installnpm run buildsrc/index.ts - Main MCP server implementationtest.js - Sample test script to run with the servernpm run build{
"mcpServers": {
"node-runner": {
"command": "npx",
"args": ["-y", "mcp-node@latest"],
"env": {
"DISABLE_NOTIFICATIONS": "true", // Optional: disable permission prompts
"EVAL_DIRECTORIES": "/path/to/safe/dir1:/path/to/safe/dir2" // Optional: additional allowed eval directories
}
}
}
}env configuration to disable notification prompts as shown aboveStarts a Node.js server that continues running in the background, even after the command completes.
Parameters:
scriptPath: Path to the Node.js server script to executecwd: Directory to run the server inserverName: (Optional) Friendly name for the server (defaults to the script filename)nodeArgs: (Optional) Arguments to pass to the Node.js executable itselfargs: (Optional) Array of arguments to pass to the server scriptExample prompt: "Start an Express server from server.js and keep it running"
Example usage:
start-node-server({
scriptPath: "/absolute/path/to/server.js",
cwd: "/absolute/path/to/project",
serverName: "My Express API",
args: ["--port", "3000"]
});Lists all running Node.js servers started via the MCP server.
Parameters:
showLogs: (Optional) Boolean to include recent logs in the output (default: false)serverId: (Optional) Server ID to get details for a specific serverExample prompt: "Show me all running Node.js servers"
Example to view detailed logs for a specific server:
list-servers({
serverId: "server-1234567890-1234",
showLogs: true
});Stops a running Node.js server.
Parameters:
serverId: ID of the server to stopforce: (Optional) Boolean to force kill the server with SIGKILL instead of SIGTERM (default: false)Example prompt: "Stop the Node.js server with ID server-1234567890-1234"
Example to forcefully terminate a server:
stop-server({
serverId: "server-1234567890-1234",
force: true
});Retrieves the last N lines of logs from a running server with filtering options. This tool is essential for debugging and monitoring server behavior without having to stop it.
Parameters:
serverId: ID of the server to get logs fromlines: (Optional) Number of log lines to retrieve (default: 50)filter: (Optional) String to filter logs (case-insensitive)stdout: (Optional) Boolean to include stdout logs (default: true)stderr: (Optional) Boolean to include stderr logs (default: true)Key features:
Example prompt: "Show me the last 100 logs from the server with ID server-1234567890-1234"
Example to view only error output:
get-server-logs({
serverId: "server-1234567890-1234",
stderr: true,
stdout: false
});Example with text filtering:
get-server-logs({
serverId: "server-1234567890-1234",
lines: 100,
filter: "error"
});Executes a Node.js script file.
Parameters:
scriptPath: Path to the Node.js script to executenodeArgs: (Optional) Arguments to pass to the Node.js executable itselfargs: (Optional) Array of arguments to pass to the scriptstdin: (Optional) Text to provide as standard input to the scriptcwd: (Optional) Directory to run the script in (defaults to OS temp directory if not specified)timeout: (Optional) Timeout in milliseconds after which the process is killed (defaults to 60000ms)Example prompt: "Run the test.js script with arguments 'hello' and 'world'"
Example with working directory:
run-node-script({
scriptPath: "/absolute/path/to/my-script.js",
args: ["arg1", "arg2"],
cwd: "/absolute/path/to/project"
});Example with timeout:
run-node-script({
scriptPath: "/absolute/path/to/long-running-script.js",
timeout: 10000 // Kill after 10 seconds
});Executes an npm script from a package.json file.
Parameters:
packageDir: Directory containing the package.jsonscriptName: Name of the script to runargs: (Optional) Array of arguments to pass to the scriptstdin: (Optional) Text to provide as standard input to the scriptExample prompt: "Run the 'start' script from the package.json in the current directory"
Executes npm install to install all dependencies or a specific package.
Parameters:
packageDir: Directory containing package.jsondependency: (Optional) Specific dependency to install (leave empty to install all dependencies from package.json)Example prompt: "Install express in the current project"
Example usage:
run-npm-install({
packageDir: "/absolute/path/to/project",
dependency: "express"
});Executes JavaScript code directly.
Parameters:
code: JavaScript code to executeevalDirectory: (Optional) Directory to execute the code instdin: (Optional) Text to provide as standard input to the codetimeout: (Optional) Timeout in milliseconds after which the process is killed (defaults to 5000ms)Example prompt: "Run this JavaScript code: console.log('Hello world');"
Example with timeout:
run-node-eval({
code: `
// This code would be terminated after 3 seconds
console.log('Starting long operation...');
setTimeout(() => {
console.log('This will never be logged');
}, 5000);
`,
timeout: 3000 // Kill after 3 seconds
});Fetches documentation for an npm module, including README and metadata. Downloads the package, extracts the README, and caches results to avoid redundant downloads.
Parameters:
packageName: Name of the npm packageversion: (Optional) Specific version to fetch (defaults to latest)Key features:
npm viewExample prompt: "Show me the documentation for the express package"
Example usage:
fetch-npm-docs({
packageName: "express",
version: "4.18.2"
});Lists all available Node.js versions installed via NVM (Node Version Manager).
Parameters: None
Example prompt: "Show me all installed Node.js versions"
Selects a specific Node.js version to use for subsequent script executions.
Parameters:
version: Node.js version to use (e.g., 'v18.20.5', 'system', 'lts/*', or other NVM aliases)Example prompt: "Use Node.js version 18 for running scripts"
Displays information about the currently selected Node.js version.
Parameters: None
Example prompt: "What Node.js version is currently being used?"
// Example script: process-data.js
process.stdin.on('data', (data) => {
const input = data.toString().trim();
console.log(`Received: ${input}`);
// Process the input...
});You can execute this with standard input and a specific working directory:
run-node-script({
scriptPath: "/absolute/path/to/process-data.js",
stdin: "This is input data",
cwd: "/absolute/path/to/my-project-directory" // Sets the working directory for the script
});run-node-eval({
code: `
let data = '';
process.stdin.on('data', (chunk) => { data += chunk; });
process.stdin.on('end', () => {
console.log('Received:', data);
});
`,
stdin: "Data to process"
});// First read the file
const fileContent = read_file({ path: "/absolute/path/to/data.txt" });
// Then pass it as standard input to a script
run-node-script({
scriptPath: "/absolute/path/to/process-data.js",
stdin: fileContent,
cwd: "/absolute/path/to/working-directory"
});This MCP server provides a complete solution for running and monitoring Node.js servers in the background:
Starting Servers: Use start-node-server to launch servers that keep running even after the command completes.
Monitoring: Monitor server logs in real-time with get-server-logs to keep track of activity and troubleshoot issues.
Process Management: View all running servers with list-servers and get detailed information about their status.
Graceful Shutdown: Stop servers gracefully with stop-server, preserving any in-flight operations.
// 1. Start a server
const serverInfo = start-node-server({
scriptPath: "/path/to/server.js",
cwd: "/path/to/project",
serverName: "API Server"
});
// Extract server ID from the response
const serverId = serverInfo.content[0].text.match(/Server ID: ([\w-]+)/)[1];
// 2. Monitor logs in real-time (periodic polling)
get-server-logs({
serverId: serverId,
lines: 20
});
// 3. Filter logs for errors only
get-server-logs({
serverId: serverId,
filter: "error",
lines: 50
});
// 4. When finished, stop the server
stop-server({
serverId: serverId
});When troubleshooting server issues, you can use a combination of tools:
list-serversget-server-logsstop-server({ serverId, force: true })Displays information about the Node.js environment running the MCP server.
URI template: node-version://info
Example prompt: "What version of Node.js is being used to run the scripts?"
Lists all available npm scripts in a package.json file.
URI template: npm-scripts://{directory}
Example prompt: "Show me the available npm scripts in this project"
Set DISABLE_NOTIFICATIONS=true to automatically approve all permission requests without showing notification prompts:
# Run with notifications disabled
DISABLE_NOTIFICATIONS=true npm run devThis is useful for automation scenarios or when you don't want to be prompted for each action.
Specify a colon-separated list of directories where JavaScript code can be evaluated using the run-node-eval tool:
# Allow code evaluation in specific directories
EVAL_DIRECTORIES=/path/to/dir1:/path/to/dir2 npm run devBy default, only the system temporary directory is allowed. This environment variable lets you add additional safe directories.
MIT
Pick your client and paste the snippet. Each one is the same server, written the way that client expects it.
claude mcp add node-runner -- npx -y mcp-node@latest{
"mcpServers": {
"node-runner": {
"env": {
"EVAL_DIRECTORIES": "",
"DISABLE_NOTIFICATIONS": ""
},
"args": [
"-y",
"mcp-node@latest"
],
"command": "npx"
}
}
}code --add-mcp '{"name":"node-runner","env":{"EVAL_DIRECTORIES":"","DISABLE_NOTIFICATIONS":""},"args":["-y","mcp-node@latest"],"command":"npx"}'[mcp_servers.node-runner]
command = "npx"
args = ["-y", "mcp-node@latest"]Runs locally on your device. Your client starts the server itself, so nothing has to be hosted.
Paste this prompt into your agent. It reads this page and does the setup for you.
Read https://aiagentslisting.com/mcp/node-runner-mcp-server to learn what the "Node Runner MCP Server" MCP server does and how to install it. Add it to my coding agent's MCP configuration as documented on that page, then confirm the server connects and list the tools it exposes.Agents can also browse this directory over MCP at https://aiagentslisting.com/api/mcp
| Name | What it does |
|---|---|
list-node-versions | Get available Node.js versions installed via NVM |
select-node-version | Select a specific Node.js version to use for subsequent script executions |
get-node-version | Get the version of Node.js the scripts will be executed with |
run-node-script | Execute a Node.js script file locally |
run-node-eval | Execute JavaScript code directly with Node.js eval. Optionally specify a directory to execute in. |
run-npm-script | Execute an npm script from package.json |
run-npm-install | Execute npm install to install all dependencies or a specific package |
start-node-server | Start a Node.js server that continues running in the background |
list-servers | List all running Node.js servers started via MCP |
stop-server | Stop a running Node.js server |
get-server-logs | Get the last N lines of logs from a running server |
| Name | What it does |
|---|---|
npm-scripts | No description provided. |
Read live from the server on September 26, 2026.
Maintain this server? Claiming proves you own the listing and earns the last 4 points.
Claim this listingPaste this line near the top of your repository's README. The badge always renders the current score.
[](https://aiagentslisting.com/mcp/node-runner-mcp-server)Nothing comparable is listed yet.
v1.2.0Release notesv1.0.0Release notesConnect to the AI Agents Listing MCP server at https://aiagentslisting.com/api/mcp using the HTTP transport and complete the sign-in when it asks. Then call the submit_review tool for the listing "node-runner-mcp-server" with a rating from 1 to 5 and a short note on what worked and what did not.No reviews yet
Be the first to share your experience with this tool.
One email a week. New agents, MCP servers and skills, and what is actually getting traction.