n8n-mcp exposes practical workflow tools through the Model Context Protocol. Configure MCP-compatible clients with https://mcp.n8nworkflow.com/mcp and a platform API key to route tool calls through the gateway.
Authentication
Clients call the hosted endpoint with a platform Bearer key. n8n API keys stay encrypted inside the gateway.
Workflow operations
Tools cover listing, reading, creating, validating, patching, activating and rolling back workflows.
Execution support
Agents can trigger workflow executions and inspect recent execution history when permitted.
Server-side controls
Every call passes through authentication, quotas, audit logging and SSRF-protected outbound requests.
Workflow Agent mode
Use Workflow Agent mode for production n8n workflow creation, repair, validation and deployment. Use Code Agent mode for repository code, docs, tests and Dashboard changes.
Template-first production
When an agent creates a workflow, it searches templates first, adapts a close match when available and only drafts from scratch after checking local node knowledge.
Knowledge-backed nodes
Agents use node search, node essentials and node validation before a node enters the workflow draft, including credential hints and operation-specific settings.
Diff and partial updates
Existing workflows are changed through previewed patches and safe partial updates where possible, instead of replacing the entire workflow JSON.
Deploy and test gates
Validation errors block deployment. Warnings require review before activation, and deploy/test results are captured for audit and rollback.
Workflow safety model
Never Trust Defaults
Webhook, HTTP, branch, merge, email and AI nodes must declare their critical behavior explicitly before deployment.
Server-side policy
Read-only tools cannot mutate n8n. Disabled, destructive or high-risk operations fail closed unless policy and confirmation requirements are met.
Full-update controls
Full workflow updates are a fallback for changes that cannot be represented as a patch. Large or uncertain edits should start from an inactive draft clone.
Agent Console
The Dashboard Agent Console presents the plan, template match, node sources, validation, diff preview, confirmation state, deploy/test result and rollback entry point.
Available tools
list_workflows
JSON-RPC toolRead-only
List workflows from the user's n8n instance. Returns workflow IDs, names, and active status.
{
"type": "object",
"properties": {
"active": {
"type": "boolean",
"description": "Filter by active state"
},
"limit": {
"type": "number",
"default": 50,
"description": "Max number of workflows to return"
}
}
}
get_workflow
JSON-RPC toolRead-only
Get detailed information about a specific workflow including its nodes and connections.
Conservative Workflow Simplification: propose low-risk cleanup candidates without modifying the workflow. Only static-proof suggestions are returned; node removals are review candidates, not automatically applied.
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"description": "Workflow ID to inspect for conservative simplification"
}
}
}
preview_workflow_simplification
JSON-RPC toolRead-only
Preview conservative workflow simplification for selected candidate nodes without mutating n8n. Rejects nodes that are not current approved simplification candidates.
Create a workflow from a high-level blueprint (recommended). Automatically compiles to valid n8n JSON, validates, and creates. Much easier than create_workflow.
Automatically analyze and fix common errors in a workflow. Detects missing required parameters, broken connections, invalid node configurations, and provides actionable repair suggestions.
{
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"description": "ID of the workflow to analyze and fix"
},
"autoApply": {
"type": "boolean",
"default": false,
"description": "If true, automatically apply fixes. If false, return suggested fixes only."
},
"confirm": {
"type": "boolean",
"description": "Required with confirmationToken when autoApply is true."
},
"confirmationToken": {
"type": "string",
"description": "Short-lived token returned by the previous fix_workflow_errors confirmation challenge."
},
"useAI": {
"type": "boolean",
"default": false,
"description": "Use AI to analyze complex errors and suggest intelligent fixes."
}
}
}
get_workflow_history
JSON-RPC toolRead-only
Get the audit history for a workflow: who changed what and when, with before/after snapshots. Use the returned audit log id with rollback_workflow.
{
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"description": "The workflow ID to get history for"
},
"limit": {
"type": "number",
"default": 20,
"description": "Max number of history entries to return"
}
}
}
rollback_workflow
JSON-RPC toolConfirmation required
⚠️ MEDIUM RISK: Roll a workflow back to a previous state captured in its audit history. Restores the before-snapshot of the given audit log entry. Find the id with get_workflow_history.
{
"type": "object",
"required": [
"auditLogId"
],
"properties": {
"auditLogId": {
"type": "string",
"description": "Audit log id to roll back to (from get_workflow_history)"
},
"reason": {
"type": "string",
"description": "Reason for the rollback (recommended)"
},
"confirm": {
"type": "boolean",
"description": "Required with confirmationToken to confirm this rollback."
},
"confirmationToken": {
"type": "string",
"description": "Short-lived token returned by the previous rollback_workflow confirmation challenge."
}
}
}
get_audit_statistics
JSON-RPC toolRead-only
Summarize workflow audit activity over time (counts by operation and by day). Useful for understanding usage patterns.
{
"type": "object",
"properties": {
"days": {
"type": "number",
"default": 30,
"description": "Number of days to analyze"
}
}
}
detect_suspicious_activity
JSON-RPC toolRead-only
Analyze recent audit history for suspicious patterns such as bulk deletions or activity during unusual hours.
{
"type": "object",
"properties": {
"hours": {
"type": "number",
"default": 24,
"description": "Number of hours to analyze"
}
}
}