From 560e0c5b86d5e44a1537b7c3299cdc5aff3f645e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romuald=20Cz=C5=82onkowski?= <56956555+czlonkowski@users.noreply.github.com> Date: Sun, 7 Dec 2025 23:49:21 +0100 Subject: [PATCH] fix: pass context parameter to handleGetWorkflow in handleValidateWorkflow (#474) (#475) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed n8n_validate_workflow tool failing in multi-tenant mode with error: "n8n API not configured. Please set N8N_API_URL and N8N_API_KEY environment variables." Root cause: handleValidateWorkflow called handleGetWorkflow without the context parameter. Closes #474 Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Romuald Członkowski Co-authored-by: Claude --- CHANGELOG.md | 15 +++++++++++++++ package.json | 2 +- src/mcp/handlers-n8n-manager.ts | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13eb156..11f9914 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.28.8] - 2025-12-07 + +### Bug Fixes + +**Multi-tenant: handleValidateWorkflow missing context parameter (#474)** + +Fixed `n8n_validate_workflow` tool failing in multi-tenant mode with error: +`"n8n API not configured. Please set N8N_API_URL and N8N_API_KEY environment variables."` + +- **Root Cause**: `handleValidateWorkflow` called `handleGetWorkflow` without passing the `context` parameter +- **Impact**: Multi-tenant deployments could not use the `n8n_validate_workflow` tool +- **Solution**: Pass `context` parameter to `handleGetWorkflow` call (line 987) + +**Conceived by Romuald Członkowski - [AiAdvisors](https://www.aiadvisors.pl/en)** + ## [2.28.7] - 2025-12-05 ### Bug Fixes diff --git a/package.json b/package.json index 6202df3..f0cc665 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "n8n-mcp", - "version": "2.28.7", + "version": "2.28.8", "description": "Integration between n8n workflow automation and Model Context Protocol (MCP)", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/mcp/handlers-n8n-manager.ts b/src/mcp/handlers-n8n-manager.ts index 1b37bfc..fafdd1c 100644 --- a/src/mcp/handlers-n8n-manager.ts +++ b/src/mcp/handlers-n8n-manager.ts @@ -984,7 +984,7 @@ export async function handleValidateWorkflow( const input = validateWorkflowSchema.parse(args); // First, fetch the workflow from n8n - const workflowResponse = await handleGetWorkflow({ id: input.id }); + const workflowResponse = await handleGetWorkflow({ id: input.id }, context); if (!workflowResponse.success) { return workflowResponse; // Return the error from fetching