n8n_workflow_versions
Manage n8n workflow version history: list, compare, rollback, delete, or prune versions. Restore previous versions or clean up old snapshots from local or native sources.
Instructions
Manage workflow version history, rollback, comparison, and cleanup. Six modes:
list: Show version history for a workflow
get: Get details of a specific version
rollback: Restore workflow to a previous version (creates backup first)
diff: Compare two versions
delete: Delete specific version or all versions for a workflow
prune: Manually trigger pruning to keep N most recent versions
Two sources:
source: 'local' (default) - snapshots n8n-mcp takes before it changes a workflow. Scoped to your n8n instance, works on any n8n version, and covers only changes made through n8n-mcp. Old backups are pruned automatically (10 most recent per workflow, plus an age-based retention window).
source: 'native' - n8n's own workflow history, the same list the n8n UI shows, including edits made by people in the UI. Needs an n8n MCP access token and the workflow's "Available in MCP" setting; supports list, get, rollback and diff only. Native rollback is not pre-validated.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Operation mode (default: list) | list |
| limit | No | Max versions to return in list mode (native: capped at 50) | |
| offset | No | Skip this many versions in native list mode | |
| source | No | Which history to read: 'local' (n8n-mcp snapshots, default) or 'native' (n8n's own version history). delete and prune are local-only. | local |
| deleteAll | No | Delete all versions for workflow (delete mode only) | |
| timeoutMs | No | Client deadline for the native call (default 30000) | |
| versionId | No | Version ID. local: numeric snapshot id (number or numeric string); native: n8n's version id string. Required for get and diff, for a single-version delete, and for native rollback; optional for local rollback. | |
| workflowId | No | Workflow ID (required for list, rollback, delete, prune, diff; required for every native mode) | |
| exposeToMcp | No | Native only. When n8n refuses the workflow because it is not available in MCP, enable that setting on the workflow and retry once. This is a visible, persistent workflow setting - confirm with the user first. | |
| maxVersions | No | Keep N most recent versions (prune mode only) | |
| toVersionId | No | The second version to compare against in diff mode (same id format as versionId) | |
| validateBefore | No | Validate workflow structure before rollback (local only; accepted and ignored for native) |