From 226fb0aad79756918221aba4a782881d01d4e363 Mon Sep 17 00:00:00 2001 From: czlonkowski <56956555+czlonkowski@users.noreply.github.com> Date: Sun, 29 Jun 2025 19:26:23 +0200 Subject: [PATCH] fix: remove DEBUG console.log statements from MCP server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Commented out console.log statements that were interfering with JSON-RPC communication - Fixed Claude Desktop errors for list_nodes and list_ai_tools - All stdout in MCP servers must be valid JSON messages 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/mcp/server.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mcp/server.ts b/src/mcp/server.ts index 0a4693a..5bf1895 100644 --- a/src/mcp/server.ts +++ b/src/mcp/server.ts @@ -276,7 +276,7 @@ export class N8NDocumentationMCPServer { let query = 'SELECT * FROM nodes WHERE 1=1'; const params: any[] = []; - console.log('DEBUG list_nodes:', { filters, query, params }); // ADD THIS + // console.log('DEBUG list_nodes:', { filters, query, params }); // Removed to prevent stdout interference if (filters.package) { // Handle both formats @@ -451,11 +451,11 @@ export class N8NDocumentationMCPServer { // Debug: Check if is_ai_tool column is populated const aiCount = this.db!.prepare('SELECT COUNT(*) as ai_count FROM nodes WHERE is_ai_tool = 1').get() as any; - console.log('DEBUG list_ai_tools:', { - toolsLength: tools.length, - aiCountInDB: aiCount.ai_count, - sampleTools: tools.slice(0, 3) - }); + // console.log('DEBUG list_ai_tools:', { + // toolsLength: tools.length, + // aiCountInDB: aiCount.ai_count, + // sampleTools: tools.slice(0, 3) + // }); // Removed to prevent stdout interference return { tools,