n8n-mcp 2.47.12 → 2.47.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +14 -21
- package/dist/mcp/server.js.map +1 -1
- package/dist/utils/redaction.d.ts +1 -0
- package/dist/utils/redaction.d.ts.map +1 -1
- package/dist/utils/redaction.js +29 -0
- package/dist/utils/redaction.js.map +1 -1
- package/dist/utils/ssrf-protection.d.ts +1 -0
- package/dist/utils/ssrf-protection.d.ts.map +1 -1
- package/dist/utils/ssrf-protection.js +24 -6
- package/dist/utils/ssrf-protection.js.map +1 -1
- package/package.json +1 -1
- package/ui-apps/dist/execution-history/index.html +41 -40
- package/ui-apps/dist/health-dashboard/index.html +41 -40
- package/ui-apps/dist/operation-result/index.html +41 -40
- package/ui-apps/dist/validation-summary/index.html +41 -40
- package/ui-apps/dist/workflow-list/index.html +41 -40
package/dist/mcp/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AA2CA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAA2B,MAAM,4BAA4B,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAgHnE,UAAU,gBAAgB;IACxB,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;CACnD;AAED,qBAAa,yBAAyB;IACpC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,EAAE,CAAgC;IAC1C,OAAO,CAAC,UAAU,CAA+B;IACjD,OAAO,CAAC,eAAe,CAAgC;IACvD,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,KA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BzB,OAAO,CAAC,0BAA0B;IAgBlC,OAAO,CAAC,iBAAiB;IA2BzB,OAAO,CAAC,eAAe;IAkDvB,OAAO,CAAC,kBAAkB;IA6C1B,OAAO,CAAC,aAAa;IA+CrB,OAAO,CAAC,0BAA0B;IAgClC,OAAO,CAAC,4BAA4B;YAKtB,oBAAoB;IAsDlC,OAAO,CAAC,gBAAgB;YAiBV,SAAS;YA6CT,kBAAkB;YAqElB,uBAAuB;YAsDvB,iBAAiB;IAqE/B,OAAO,CAAC,qBAAqB;IA8C7B,OAAO,CAAC,uBAAuB;IA4D/B,OAAO,CAAC,wBAAwB;IAkChC,OAAO,CAAC,iBAAiB;YAoDX,mBAAmB;YAoEnB,qBAAqB;IAS7B,OAAO,CAAC,SAAS,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;YAS9B,aAAa;YAcb,iBAAiB;YAoBjB,WAAW;YAwBX,eAAe;IAqB7B,OAAO,CAAC,qBAAqB,CASb;IAEhB,OAAO,CAAC,mBAAmB;YAsDb,mBAAmB;YAwBnB,yBAAyB;IAmEvC,OAAO,CAAC,kBAAkB;YAiBZ,gBAAgB;YA6HhB,2BAA2B;YAiE3B,2BAA2B;IAyEnC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IA0BpB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAgEhC"}
|
package/dist/mcp/server.js
CHANGED
|
@@ -48,6 +48,7 @@ const tools_n8n_manager_1 = require("./tools-n8n-manager");
|
|
|
48
48
|
const tools_n8n_friendly_1 = require("./tools-n8n-friendly");
|
|
49
49
|
const workflow_examples_1 = require("./workflow-examples");
|
|
50
50
|
const logger_1 = require("../utils/logger");
|
|
51
|
+
const redaction_1 = require("../utils/redaction");
|
|
51
52
|
const node_repository_1 = require("../database/node-repository");
|
|
52
53
|
const database_adapter_1 = require("../database/database-adapter");
|
|
53
54
|
const shared_database_1 = require("../database/shared-database");
|
|
@@ -438,15 +439,11 @@ class N8NDocumentationMCPServer {
|
|
|
438
439
|
});
|
|
439
440
|
this.server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
440
441
|
const { name, arguments: args } = request.params;
|
|
441
|
-
logger_1.logger.info('Tool call received
|
|
442
|
+
logger_1.logger.info('Tool call received', {
|
|
442
443
|
toolName: name,
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
hasNodeType: args && 'nodeType' in args,
|
|
447
|
-
hasConfig: args && 'config' in args,
|
|
448
|
-
configType: args && args.config ? typeof args.config : 'N/A',
|
|
449
|
-
rawRequest: JSON.stringify(request.params)
|
|
444
|
+
...(0, redaction_1.summarizeToolCallArgs)(args),
|
|
445
|
+
hasNodeType: !!(args && typeof args === 'object' && 'nodeType' in args),
|
|
446
|
+
hasConfig: !!(args && typeof args === 'object' && 'config' in args),
|
|
450
447
|
});
|
|
451
448
|
const disabledTools = this.getDisabledTools();
|
|
452
449
|
if (disabledTools.has(name)) {
|
|
@@ -482,8 +479,9 @@ class N8NDocumentationMCPServer {
|
|
|
482
479
|
const parsed = JSON.parse(possibleNestedData);
|
|
483
480
|
if (parsed && typeof parsed === 'object') {
|
|
484
481
|
logger_1.logger.warn('Detected n8n nested output bug, attempting to extract actual arguments', {
|
|
485
|
-
|
|
486
|
-
|
|
482
|
+
toolName: name,
|
|
483
|
+
originalArgsKeys: Object.keys(args),
|
|
484
|
+
extractedArgsKeys: Object.keys(parsed),
|
|
487
485
|
});
|
|
488
486
|
if (this.validateExtractedArgs(name, parsed)) {
|
|
489
487
|
processedArgs = parsed;
|
|
@@ -491,7 +489,7 @@ class N8NDocumentationMCPServer {
|
|
|
491
489
|
else {
|
|
492
490
|
logger_1.logger.warn('Extracted arguments failed validation, using original args', {
|
|
493
491
|
toolName: name,
|
|
494
|
-
|
|
492
|
+
extractedArgsKeys: Object.keys(parsed),
|
|
495
493
|
});
|
|
496
494
|
}
|
|
497
495
|
}
|
|
@@ -508,7 +506,7 @@ class N8NDocumentationMCPServer {
|
|
|
508
506
|
processedArgs = JSON.parse(JSON.stringify(processedArgs));
|
|
509
507
|
}
|
|
510
508
|
try {
|
|
511
|
-
logger_1.logger.debug(`Executing tool: ${name}`,
|
|
509
|
+
logger_1.logger.debug(`Executing tool: ${name}`, (0, redaction_1.summarizeToolCallArgs)(processedArgs));
|
|
512
510
|
const startTime = Date.now();
|
|
513
511
|
const result = await this.executeTool(name, processedArgs);
|
|
514
512
|
const duration = Date.now() - startTime;
|
|
@@ -800,8 +798,8 @@ class N8NDocumentationMCPServer {
|
|
|
800
798
|
if (!(requiredField in args)) {
|
|
801
799
|
logger_1.logger.debug(`Extracted args missing required field: ${requiredField}`, {
|
|
802
800
|
toolName,
|
|
803
|
-
|
|
804
|
-
required
|
|
801
|
+
extractedArgsKeys: Object.keys(args),
|
|
802
|
+
required,
|
|
805
803
|
});
|
|
806
804
|
return false;
|
|
807
805
|
}
|
|
@@ -818,7 +816,6 @@ class N8NDocumentationMCPServer {
|
|
|
818
816
|
toolName,
|
|
819
817
|
expectedType,
|
|
820
818
|
actualType,
|
|
821
|
-
fieldValue
|
|
822
819
|
});
|
|
823
820
|
return false;
|
|
824
821
|
}
|
|
@@ -931,7 +928,7 @@ class N8NDocumentationMCPServer {
|
|
|
931
928
|
}
|
|
932
929
|
if (coercedAny) {
|
|
933
930
|
logger_1.logger.warn(`Coerced mistyped params for tool "${toolName}"`, {
|
|
934
|
-
original: Object.fromEntries(Object.entries(args).map(([k, v]) => [k,
|
|
931
|
+
original: Object.fromEntries(Object.entries(args).map(([k, v]) => [k, typeof v])),
|
|
935
932
|
});
|
|
936
933
|
}
|
|
937
934
|
return coerced;
|
|
@@ -942,11 +939,7 @@ class N8NDocumentationMCPServer {
|
|
|
942
939
|
if (disabledTools.has(name)) {
|
|
943
940
|
throw new Error(`Tool '${name}' is disabled via DISABLED_TOOLS environment variable`);
|
|
944
941
|
}
|
|
945
|
-
logger_1.logger.info(`Tool execution: ${name}`,
|
|
946
|
-
args: typeof args === 'object' ? JSON.stringify(args) : args,
|
|
947
|
-
argsType: typeof args,
|
|
948
|
-
argsKeys: typeof args === 'object' ? Object.keys(args) : 'not-object'
|
|
949
|
-
});
|
|
942
|
+
logger_1.logger.info(`Tool execution: ${name}`, (0, redaction_1.summarizeToolCallArgs)(args));
|
|
950
943
|
if (typeof args !== 'object' || args === null) {
|
|
951
944
|
throw new Error(`Invalid arguments for tool ${name}: expected object, got ${typeof args}`);
|
|
952
945
|
}
|