Compare commits

..

3 Commits

Author SHA1 Message Date
czlonkowski
4d4ef64bf6 fix: data tables available on self-hosted too, not just enterprise/cloud
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 22:26:24 +01:00
czlonkowski
984a49d4ec fix: address code review - add spec-compliance comment and mixed-batch test
- Document design choice: !('id' in msg) is strict per JSON-RPC 2.0 §4.1
- Add test: mixed batch (notification + request) with stale session → 400

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 19:45:57 +01:00
czlonkowski
e52a04a291 fix: return 202 for notifications with stale sessions, warn on updateTable columns (#654)
**Issue #654 (critical):** handleRequest() returned HTTP 400 for JSON-RPC
notifications with stale/expired session IDs. Per JSON-RPC 2.0 spec,
notifications don't expect responses. Returning 400 caused Claude's proxy
to interpret the connection as broken, triggering reconnection storms
(930 errors/day, 216 users affected).

Fix: Added isJsonRpcNotification() helper that detects single and batch
notifications (messages with method but no id field). Path C in
handleRequest() now returns 202 Accepted for notifications with stale
sessions instead of 400. Also added TOCTOU null guard in Path B.

**Issue 1 (medium):** updateTable silently accepted columns parameter
via the shared MCP tool schema. Zod stripped it but gave no feedback.

Fix: handleUpdateTable now detects columns in raw args and appends a
warning to the response. Tool schema descriptions clarified that columns
are for createTable only and schema is immutable after creation.

Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 19:21:29 +01:00
3 changed files with 4 additions and 11 deletions

View File

@@ -7,15 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [2.40.4] - 2026-03-22
### Fixed
- **Incorrect data tables availability info**: Removed "enterprise/cloud only" restriction from tool description and documentation — data tables are available on all n8n plans including self-hosted
- **Redundant pitfalls removed**: Removed "Requires N8N_API_URL and N8N_API_KEY" and "enterprise or cloud plans" pitfalls — the first is implicit for all n8n management tools, the second was incorrect
Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en
## [2.40.3] - 2026-03-22
### Fixed

View File

@@ -1,6 +1,6 @@
{
"name": "n8n-mcp",
"version": "2.40.4",
"version": "2.40.3",
"description": "Integration between n8n workflow automation and Model Context Protocol (MCP)",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -14,7 +14,7 @@ export const n8nManageDatatableDoc: ToolDocumentation = {
'Use dryRun: true to preview update/upsert/delete before applying',
'Filter supports: eq, neq, like, ilike, gt, gte, lt, lte conditions',
'Use returnData: true to get affected rows back from update/upsert/delete',
'Requires N8N_API_URL and N8N_API_KEY configured'
'Requires n8n instance with data tables feature enabled'
]
},
full: {
@@ -96,6 +96,8 @@ export const n8nManageDatatableDoc: ToolDocumentation = {
'Use sortBy for deterministic row ordering',
],
pitfalls: [
'Requires N8N_API_URL and N8N_API_KEY configured',
'Requires n8n instance with data tables feature enabled (available on cloud, enterprise, and self-hosted)',
'deleteTable permanently deletes all rows — cannot be undone',
'deleteRows requires a filter — cannot delete all rows without one',
'Column types cannot be changed after table creation via API',