Skip to main content
Glama

start

Launch the n8n automation server on a specified port with optional tunnel for webhook testing, replacing the standard n8n start command.

Instructions

Start n8n server - replaces "n8n start" command

Input Schema

NameRequiredDescriptionDefault
portNoPort to run n8n on (default: 5678)
tunnelNoEnable tunnel for webhook testing

Input Schema (JSON Schema)

{ "properties": { "port": { "description": "Port to run n8n on (default: 5678)", "type": "number" }, "tunnel": { "description": "Enable tunnel for webhook testing", "type": "boolean" } }, "type": "object" }

Implementation Reference

  • Schema definition for the 'start' tool, defining input parameters port and tunnel.
    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', }, }, }, },
  • ToolHandler.handleTool switch case that dispatches 'start' tool call to N8nManager.startN8n.
    case 'start': return await this.n8nManager.startN8n({ port: args?.port as number, tunnel: args?.tunnel as boolean, });
  • Core implementation of starting n8n server: constructs 'n8n start' command with options, executes it in background, 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}`); } }
  • MCP server registers all tools by calling getToolDefinitions() which includes the 'start' tool schema.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: getToolDefinitions(), }));

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mckinleymedia/mcflow-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server