start
Launch the n8n automation server to execute workflows, configure ports, and enable webhook testing tunnels.
Instructions
Start n8n server - replaces "n8n start" command
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Port to run n8n on (default: 5678) | |
| tunnel | No | Enable tunnel for webhook testing |
Implementation Reference
- src/n8n/manager.ts:950-995 (handler)Core implementation of the 'start' tool: executes 'n8n start' CLI command with optional port and tunnel options, starts in background, and returns success message with URL.async startN8n(options: { port?: number; tunnel?: boolean; } = {}): Promise<any> { try { let command = 'n8n start'; if (options.port) { command = `N8N_PORT=${options.port} ${command}`; } if (options.tunnel) { command += ' --tunnel'; } console.error(`Starting n8n: ${command}`); // Start n8n in background exec(command, (error, stdout, stderr) => { if (error) { console.error(`n8n error: ${error}`); } }); // Give it a moment to start await new Promise(resolve => setTimeout(resolve, 2000)); const port = options.port || 5678; const url = options.tunnel ? 'Check console for tunnel URL' : `http://localhost:${port}`; return { content: [ { type: 'text', text: `🚀 n8n started successfully!\n\n` + `🌐 URL: ${url}\n` + `🔧 Port: ${port}\n` + `${options.tunnel ? '🌍 Tunnel: Enabled\n' : ''}` + `\nUse Ctrl+C to stop n8n when done.`, }, ], }; } catch (error: any) { throw new Error(`Failed to start n8n: ${error.message}`); } }
- src/tools/handler.ts:185-189 (handler)ToolHandler.handleTool() switch case that routes 'start' tool calls to N8nManager.startN8n() with parsed arguments.case 'start': return await this.n8nManager.startN8n({ port: args?.port as number, tunnel: args?.tunnel as boolean, });
- src/tools/registry.ts:323-339 (registration)Registers the 'start' MCP tool in getToolDefinitions() array with name, description, and inputSchema.{ name: 'start', description: 'Start n8n server - replaces "n8n start" command', inputSchema: { type: 'object', properties: { port: { type: 'number', description: 'Port to run n8n on (default: 5678)', }, tunnel: { type: 'boolean', description: 'Enable tunnel for webhook testing', }, }, }, },
- src/tools/registry.ts:326-337 (schema)Input schema definition for the 'start' tool validating port (number) and tunnel (boolean) parameters.inputSchema: { type: 'object', properties: { port: { type: 'number', description: 'Port to run n8n on (default: 5678)', }, tunnel: { type: 'boolean', description: 'Enable tunnel for webhook testing', }, },