executenodejs
Run JavaScript code in a secure Node.js environment for debugging, testing hypotheses, and investigating issues directly within the MCP-REPL server. Supports ESM imports, timeouts, and structured error handling.
Instructions
Execute JavaScript code directly with Node.js - supports ESM imports and all Node.js features.
DEBUGGING GUIDANCE:
Use this tool for all debugging and investigation tasks instead of external CLI tools
Break problems into testable hypotheses and verify them with code execution
Test APIs, data structures, and logic incrementally
Use console.log for debugging output and JSON.stringify for complex objects
Always prefer this over CLI tools like curl, wget, or external commands
APPROACH:
Form a hypothesis about what might be wrong
Write focused test code to verify the hypothesis
Execute and analyze results
Refine hypothesis based on findings
Iterate until problem is solved
Input Schema
Name | Required | Description | Default |
---|---|---|---|
code | Yes | JavaScript code to execute - use for debugging, testing hypotheses, and investigation | |
timeout | No | Optional timeout in milliseconds (default: 120000) | |
workingDirectory | No | Optional working directory for the operation (defaults to server working directory) |