Attach to inspector
debug_attachAttach to a running Node.js inspector by WebSocket URL, host/port, or process ID, then return a new session ID for debugging.
Instructions
Attach to an existing Node inspector on loopback and return a new sessionId. Provide wsUrl, host+port (GET /json/list), or pid (enables inspector if needed). Runs the target as the MCP user. launch executes a process; evaluate runs JavaScript inside it. Only use on a trusted local workspace. Inspector is bound to 127.0.0.1.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "debug_attach"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | Attach by process id. Enables the inspector with process._debugProcess or SIGUSR1 if it is not already listening. Loopback only | |
| host | No | Inspector host. Default 127.0.0.1. Non-loopback is rejected | |
| port | No | Inspector HTTP port used for /json/list | |
| label | No | Optional label shown in debug_list_sessions | |
| wsUrl | No | Full inspector WebSocket URL, e.g. ws://127.0.0.1:9229/<uuid> |