n8n-mcp 2.10.1 → 2.10.3

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.
@@ -0,0 +1,219 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ToolValidation = exports.Validator = exports.ValidationError = void 0;
4
+ class ValidationError extends Error {
5
+ constructor(message, field, value) {
6
+ super(message);
7
+ this.field = field;
8
+ this.value = value;
9
+ this.name = 'ValidationError';
10
+ }
11
+ }
12
+ exports.ValidationError = ValidationError;
13
+ class Validator {
14
+ static validateString(value, fieldName, required = true) {
15
+ const errors = [];
16
+ if (required && (value === undefined || value === null)) {
17
+ errors.push({
18
+ field: fieldName,
19
+ message: `${fieldName} is required`,
20
+ value
21
+ });
22
+ }
23
+ else if (value !== undefined && value !== null && typeof value !== 'string') {
24
+ errors.push({
25
+ field: fieldName,
26
+ message: `${fieldName} must be a string, got ${typeof value}`,
27
+ value
28
+ });
29
+ }
30
+ else if (required && typeof value === 'string' && value.trim().length === 0) {
31
+ errors.push({
32
+ field: fieldName,
33
+ message: `${fieldName} cannot be empty`,
34
+ value
35
+ });
36
+ }
37
+ return {
38
+ valid: errors.length === 0,
39
+ errors
40
+ };
41
+ }
42
+ static validateObject(value, fieldName, required = true) {
43
+ const errors = [];
44
+ if (required && (value === undefined || value === null)) {
45
+ errors.push({
46
+ field: fieldName,
47
+ message: `${fieldName} is required`,
48
+ value
49
+ });
50
+ }
51
+ else if (value !== undefined && value !== null) {
52
+ if (typeof value !== 'object') {
53
+ errors.push({
54
+ field: fieldName,
55
+ message: `${fieldName} must be an object, got ${typeof value}`,
56
+ value
57
+ });
58
+ }
59
+ else if (Array.isArray(value)) {
60
+ errors.push({
61
+ field: fieldName,
62
+ message: `${fieldName} must be an object, not an array`,
63
+ value
64
+ });
65
+ }
66
+ }
67
+ return {
68
+ valid: errors.length === 0,
69
+ errors
70
+ };
71
+ }
72
+ static validateArray(value, fieldName, required = true) {
73
+ const errors = [];
74
+ if (required && (value === undefined || value === null)) {
75
+ errors.push({
76
+ field: fieldName,
77
+ message: `${fieldName} is required`,
78
+ value
79
+ });
80
+ }
81
+ else if (value !== undefined && value !== null && !Array.isArray(value)) {
82
+ errors.push({
83
+ field: fieldName,
84
+ message: `${fieldName} must be an array, got ${typeof value}`,
85
+ value
86
+ });
87
+ }
88
+ return {
89
+ valid: errors.length === 0,
90
+ errors
91
+ };
92
+ }
93
+ static validateNumber(value, fieldName, required = true, min, max) {
94
+ const errors = [];
95
+ if (required && (value === undefined || value === null)) {
96
+ errors.push({
97
+ field: fieldName,
98
+ message: `${fieldName} is required`,
99
+ value
100
+ });
101
+ }
102
+ else if (value !== undefined && value !== null) {
103
+ if (typeof value !== 'number' || isNaN(value)) {
104
+ errors.push({
105
+ field: fieldName,
106
+ message: `${fieldName} must be a number, got ${typeof value}`,
107
+ value
108
+ });
109
+ }
110
+ else {
111
+ if (min !== undefined && value < min) {
112
+ errors.push({
113
+ field: fieldName,
114
+ message: `${fieldName} must be at least ${min}, got ${value}`,
115
+ value
116
+ });
117
+ }
118
+ if (max !== undefined && value > max) {
119
+ errors.push({
120
+ field: fieldName,
121
+ message: `${fieldName} must be at most ${max}, got ${value}`,
122
+ value
123
+ });
124
+ }
125
+ }
126
+ }
127
+ return {
128
+ valid: errors.length === 0,
129
+ errors
130
+ };
131
+ }
132
+ static validateEnum(value, fieldName, allowedValues, required = true) {
133
+ const errors = [];
134
+ if (required && (value === undefined || value === null)) {
135
+ errors.push({
136
+ field: fieldName,
137
+ message: `${fieldName} is required`,
138
+ value
139
+ });
140
+ }
141
+ else if (value !== undefined && value !== null && !allowedValues.includes(value)) {
142
+ errors.push({
143
+ field: fieldName,
144
+ message: `${fieldName} must be one of: ${allowedValues.join(', ')}, got "${value}"`,
145
+ value
146
+ });
147
+ }
148
+ return {
149
+ valid: errors.length === 0,
150
+ errors
151
+ };
152
+ }
153
+ static combineResults(...results) {
154
+ const allErrors = results.flatMap(r => r.errors);
155
+ return {
156
+ valid: allErrors.length === 0,
157
+ errors: allErrors
158
+ };
159
+ }
160
+ static formatErrors(result, toolName) {
161
+ if (result.valid)
162
+ return '';
163
+ const prefix = toolName ? `${toolName}: ` : '';
164
+ const errors = result.errors.map(e => ` • ${e.field}: ${e.message}`).join('\n');
165
+ return `${prefix}Validation failed:\n${errors}`;
166
+ }
167
+ }
168
+ exports.Validator = Validator;
169
+ class ToolValidation {
170
+ static validateNodeOperation(args) {
171
+ const nodeTypeResult = Validator.validateString(args.nodeType, 'nodeType');
172
+ const configResult = Validator.validateObject(args.config, 'config');
173
+ const profileResult = Validator.validateEnum(args.profile, 'profile', ['minimal', 'runtime', 'ai-friendly', 'strict'], false);
174
+ return Validator.combineResults(nodeTypeResult, configResult, profileResult);
175
+ }
176
+ static validateNodeMinimal(args) {
177
+ const nodeTypeResult = Validator.validateString(args.nodeType, 'nodeType');
178
+ const configResult = Validator.validateObject(args.config, 'config');
179
+ return Validator.combineResults(nodeTypeResult, configResult);
180
+ }
181
+ static validateWorkflow(args) {
182
+ const workflowResult = Validator.validateObject(args.workflow, 'workflow');
183
+ let nodesResult = { valid: true, errors: [] };
184
+ let connectionsResult = { valid: true, errors: [] };
185
+ if (workflowResult.valid && args.workflow) {
186
+ nodesResult = Validator.validateArray(args.workflow.nodes, 'workflow.nodes');
187
+ connectionsResult = Validator.validateObject(args.workflow.connections, 'workflow.connections');
188
+ }
189
+ const optionsResult = args.options ?
190
+ Validator.validateObject(args.options, 'options', false) :
191
+ { valid: true, errors: [] };
192
+ return Validator.combineResults(workflowResult, nodesResult, connectionsResult, optionsResult);
193
+ }
194
+ static validateSearchNodes(args) {
195
+ const queryResult = Validator.validateString(args.query, 'query');
196
+ const limitResult = Validator.validateNumber(args.limit, 'limit', false, 1, 200);
197
+ const modeResult = Validator.validateEnum(args.mode, 'mode', ['OR', 'AND', 'FUZZY'], false);
198
+ return Validator.combineResults(queryResult, limitResult, modeResult);
199
+ }
200
+ static validateListNodeTemplates(args) {
201
+ const nodeTypesResult = Validator.validateArray(args.nodeTypes, 'nodeTypes');
202
+ const limitResult = Validator.validateNumber(args.limit, 'limit', false, 1, 50);
203
+ return Validator.combineResults(nodeTypesResult, limitResult);
204
+ }
205
+ static validateWorkflowId(args) {
206
+ return Validator.validateString(args.id, 'id');
207
+ }
208
+ static validateCreateWorkflow(args) {
209
+ const nameResult = Validator.validateString(args.name, 'name');
210
+ const nodesResult = Validator.validateArray(args.nodes, 'nodes');
211
+ const connectionsResult = Validator.validateObject(args.connections, 'connections');
212
+ const settingsResult = args.settings ?
213
+ Validator.validateObject(args.settings, 'settings', false) :
214
+ { valid: true, errors: [] };
215
+ return Validator.combineResults(nameResult, nodesResult, connectionsResult, settingsResult);
216
+ }
217
+ }
218
+ exports.ToolValidation = ToolValidation;
219
+ //# sourceMappingURL=validation-schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation-schemas.js","sourceRoot":"","sources":["../../src/utils/validation-schemas.ts"],"names":[],"mappings":";;;AAQA,MAAa,eAAgB,SAAQ,KAAK;IACxC,YAAY,OAAe,EAAS,KAAc,EAAS,KAAW;QACpE,KAAK,CAAC,OAAO,CAAC,CAAC;QADmB,UAAK,GAAL,KAAK,CAAS;QAAS,UAAK,GAAL,KAAK,CAAM;QAEpE,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AALD,0CAKC;AAcD,MAAa,SAAS;IAIpB,MAAM,CAAC,cAAc,CAAC,KAAU,EAAE,SAAiB,EAAE,WAAoB,IAAI;QAC3E,MAAM,MAAM,GAAyD,EAAE,CAAC;QAExE,IAAI,QAAQ,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC,EAAE,CAAC;YACxD,MAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,SAAS;gBAChB,OAAO,EAAE,GAAG,SAAS,cAAc;gBACnC,KAAK;aACN,CAAC,CAAC;QACL,CAAC;aAAM,I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AC,eAAe,EAAE,WAAW,CAAC,CAAC;IAChE,CAAC;IAKD,MAAM,CAAC,kBAAkB,CAAC,IAAS;QACjC,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;IAKD,MAAM,CAAC,sBAAsB,CAAC,IAAS;QACrC,MAAM,UAAU,GAAG,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC/D,MAAM,WAAW,GAAG,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACjE,MAAM,iBAAiB,GAAG,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;QACpF,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;YACpC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;YAC5D,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;QAE9B,OAAO,SAAS,CAAC,cAAc,CAAC,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,cAAc,CAAC,CAAC;IAC9F,CAAC;CACF;AA/FD,wCA+FC"}
package/package.json CHANGED
@@ -1,24 +1,86 @@
1
1
  {
2
2
  "name": "n8n-mcp",
3
- "version": "2.10.1",
3
+ "version": "2.10.3",
4
4
  "description": "Integration between n8n workflow automation and Model Context Protocol (MCP)",
5
- "dependencies": {
6
- "@modelcontextprotocol/sdk": "^1.13.2",
7
- "express": "^5.1.0",
8
- "dotenv": "^16.5.0",
9
- "sql.js": "^1.13.0",
10
- "uuid": "^10.0.0",
11
- "axios": "^1.7.7"
12
- },
13
- "engines": {
14
- "node": ">=16.0.0"
15
- },
16
- "optionalDependencies": {
17
- "better-sqlite3": "^11.10.0"
18
- },
5
+ "main": "dist/index.js",
19
6
  "bin": {
20
7
  "n8n-mcp": "./dist/mcp/index.js"
21
8
  },
9
+ "scripts": {
10
+ "build": "tsc -p tsconfig.build.json",
11
+ "rebuild": "node dist/scripts/rebuild.js",
12
+ "rebuild:optimized": "node dist/scripts/rebuild-optimized.js",
13
+ "validate": "node dist/scripts/validate.js",
14
+ "test-nodes": "node dist/scripts/test-nodes.js",
15
+ "start": "node dist/mcp/index.js",
16
+ "start:http": "MCP_MODE=http node dist/mcp/index.js",
17
+ "start:http:fixed": "MCP_MODE=http USE_FIXED_HTTP=true node dist/mcp/index.js",
18
+ "start:n8n": "N8N_MODE=true MCP_MODE=http node dist/mcp/index.js",
19
+ "http": "npm run build && npm run start:http:fixed",
20
+ "dev": "npm run build && npm run rebuild && npm run validate",
21
+ "dev:http": "MCP_MODE=http nodemon --watch src --ext ts --exec 'npm run build && npm run start:http'",
22
+ "test:single-session": "./scripts/test-single-session.sh",
23
+ "test:mcp-endpoint": "node scripts/test-mcp-endpoint.js",
24
+ "test:mcp-endpoint:curl": "./scripts/test-mcp-endpoint.sh",
25
+ "test:mcp-stdio": "npm run build && node scripts/test-mcp-stdio.js",
26
+ "test": "vitest",
27
+ "test:ui": "vitest --ui",
28
+ "test:run": "vitest run",
29
+ "test:coverage": "vitest run --coverage",
30
+ "test:ci": "vitest run --coverage --coverage.thresholds.lines=0 --coverage.thresholds.functions=0 --coverage.thresholds.branches=0 --coverage.thresholds.statements=0 --reporter=default --reporter=junit",
31
+ "test:watch": "vitest watch",
32
+ "test:unit": "vitest run tests/unit",
33
+ "test:integration": "vitest run --config vitest.config.integration.ts",
34
+ "test:e2e": "vitest run tests/e2e",
35
+ "lint": "tsc --noEmit",
36
+ "typecheck": "tsc --noEmit",
37
+ "update:n8n": "node scripts/update-n8n-deps.js",
38
+ "update:n8n:check": "node scripts/update-n8n-deps.js --dry-run",
39
+ "fetch:templates": "node dist/scripts/fetch-templates.js",
40
+ "fetch:templates:robust": "node dist/scripts/fetch-templates-robust.js",
41
+ "prebuild:fts5": "npx tsx scripts/prebuild-fts5.ts",
42
+ "test:templates": "node dist/scripts/test-templates.js",
43
+ "test:protocol-negotiation": "npx tsx src/scripts/test-protocol-negotiation.ts",
44
+ "test:workflow-validation": "node dist/scripts/test-workflow-validation.js",
45
+ "test:template-validation": "node dist/scripts/test-template-validation.js",
46
+ "test:essentials": "node dist/scripts/test-essentials.js",
47
+ "test:enhanced-validation": "node dist/scripts/test-enhanced-validation.js",
48
+ "test:ai-workflow-validation": "node dist/scripts/test-ai-workflow-validation.js",
49
+ "test:mcp-tools": "node dist/scripts/test-mcp-tools.js",
50
+ "test:n8n-manager": "node dist/scripts/test-n8n-manager-integration.js",
51
+ "test:n8n-validate-workflow": "node dist/scripts/test-n8n-validate-workflow.js",
52
+ "test:typeversion-validation": "node dist/scripts/test-typeversion-validation.js",
53
+ "test:error-handling": "node dist/scripts/test-error-handling-validation.js",
54
+ "test:workflow-diff": "node dist/scripts/test-workflow-diff.js",
55
+ "test:transactional-diff": "node dist/scripts/test-transactional-diff.js",
56
+ "test:tools-documentation": "node dist/scripts/test-tools-documentation.js",
57
+ "test:url-configuration": "npm run build && ts-node scripts/test-url-configuration.ts",
58
+ "test:search-improvements": "node dist/scripts/test-search-improvements.js",
59
+ "test:fts5-search": "node dist/scripts/test-fts5-search.js",
60
+ "migrate:fts5": "node dist/scripts/migrate-nodes-fts.js",
61
+ "test:mcp:update-partial": "node dist/scripts/test-mcp-n8n-update-partial.js",
62
+ "test:update-partial:debug": "node dist/scripts/test-update-partial-debug.js",
63
+ "test:issue-45-fix": "node dist/scripts/test-issue-45-fix.js",
64
+ "test:auth-logging": "tsx scripts/test-auth-logging.ts",
65
+ "test:docker": "./scripts/test-docker-config.sh all",
66
+ "test:docker:unit": "./scripts/test-docker-config.sh unit",
67
+ "test:docker:integration": "./scripts/test-docker-config.sh integration",
68
+ "test:docker:security": "./scripts/test-docker-config.sh security",
69
+ "sanitize:templates": "node dist/scripts/sanitize-templates.js",
70
+ "db:rebuild": "node dist/scripts/rebuild-database.js",
71
+ "benchmark": "vitest bench --config vitest.config.benchmark.ts",
72
+ "benchmark:watch": "vitest bench --watch --config vitest.config.benchmark.ts",
73
+ "benchmark:ui": "vitest bench --ui --config vitest.config.benchmark.ts",
74
+ "benchmark:ci": "CI=true node scripts/run-benchmarks-ci.js",
75
+ "db:init": "node -e \"new (require('./dist/services/sqlite-storage-service').SQLiteStorageService)(); console.log('Database initialized')\"",
76
+ "docs:rebuild": "ts-node src/scripts/rebuild-database.ts",
77
+ "sync:runtime-version": "node scripts/sync-runtime-version.js",
78
+ "update:readme-version": "node scripts/update-readme-version.js",
79
+ "prepare:publish": "./scripts/publish-npm.sh",
80
+ "update:all": "./scripts/update-and-publish-prep.sh",
81
+ "test:release-automation": "node scripts/test-release-automation.js",
82
+ "prepare:release": "node scripts/prepare-release.js"
83
+ },
22
84
  "repository": {
23
85
  "type": "git",
24
86
  "url": "git+https://github.com/czlonkowski/n8n-mcp.git"
@@ -42,6 +104,40 @@
42
104
  "data/nodes.db",
43
105
  ".env.example",
44
106
  "README.md",
45
- "LICENSE"
46
- ]
47
- }
107
+ "LICENSE",
108
+ "package.runtime.json"
109
+ ],
110
+ "devDependencies": {
111
+ "@faker-js/faker": "^9.9.0",
112
+ "@testing-library/jest-dom": "^6.6.4",
113
+ "@types/better-sqlite3": "^7.6.13",
114
+ "@types/express": "^5.0.3",
115
+ "@types/node": "^22.15.30",
116
+ "@types/ws": "^8.18.1",
117
+ "@vitest/coverage-v8": "^3.2.4",
118
+ "@vitest/runner": "^3.2.4",
119
+ "@vitest/ui": "^3.2.4",
120
+ "axios": "^1.11.0",
121
+ "axios-mock-adapter": "^2.1.0",
122
+ "fishery": "^2.3.1",
123
+ "msw": "^2.10.4",
124
+ "nodemon": "^3.1.10",
125
+ "ts-node": "^10.9.2",
126
+ "typescript": "^5.8.3",
127
+ "vitest": "^3.2.4"
128
+ },
129
+ "dependencies": {
130
+ "@modelcontextprotocol/sdk": "^1.13.2",
131
+ "@n8n/n8n-nodes-langchain": "^1.104.1",
132
+ "dotenv": "^16.5.0",
133
+ "express": "^5.1.0",
134
+ "n8n": "^1.105.2",
135
+ "n8n-core": "^1.104.1",
136
+ "n8n-workflow": "^1.102.1",
137
+ "sql.js": "^1.13.0",
138
+ "uuid": "^10.0.0"
139
+ },
140
+ "optionalDependencies": {
141
+ "better-sqlite3": "^11.10.0"
142
+ }
143
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "n8n-mcp-runtime",
3
+ "version": "2.10.1",
4
+ "description": "n8n MCP Server Runtime Dependencies Only",
5
+ "private": true,
6
+ "dependencies": {
7
+ "@modelcontextprotocol/sdk": "^1.13.2",
8
+ "express": "^5.1.0",
9
+ "dotenv": "^16.5.0",
10
+ "sql.js": "^1.13.0",
11
+ "uuid": "^10.0.0",
12
+ "axios": "^1.7.7"
13
+ },
14
+ "engines": {
15
+ "node": ">=16.0.0"
16
+ },
17
+ "optionalDependencies": {
18
+ "better-sqlite3": "^11.10.0"
19
+ }
20
+ }