# n8n Workflow Automation MCP

> n8n MCP Server gives your AI agent full control over node-based workflow automation. You can audit active workflows, pull detailed execution logs for debugging failures, and check system credentials—all without logging into the n8n dashboard. It's diagnostic power for complex business processes.

## Overview
- **Category:** ship-it
- **Price:** Free
- **Tags:** workflow-automation, no-code, api-integration, execution-logs, node-based, business-process-automation

## Description

**n8n MCP Server** gives your AI agent full control over node-based workflow automation. You'll use this server to audit active workflows, pull detailed execution logs for debugging failures, and check system credentials—all without ever having to log into the n8n dashboard yourself. It’s diagnostic power built specifically for complex business processes.

### Inventory Workflows

To get a handle on your automation setup, you can use `list_workflows` to pull an inventory list of every active workflow in the instance. You'll also find `list_workflow_tags`, which retrieves the organizational categories used to group and sort those workflows. Need more detail? Run `get_workflow_details` for a specific workflow ID; that gives you the complete logic map and configuration details for that single process.

### Monitor Execution Health

When something breaks, you don't wanna dig through logs manually. You can start by running `list_workflow_executions`, which lists recent workflow runs and shows their status—success or failure. If a run failed, use `get_execution_details` to retrieve the full, detailed trace logs for that specific attempt. This gets you straight to the error code without any guesswork.

### Audit Credentials and Users

You need to know who's running what and if the keys are safe. Use `list_instance_users` to list every team member who has access to the n8n automation instance. For system security, run `list_stored_credentials`; this shows you metadata for every saved API credential in the system, letting you verify types and IDs without ever seeing a literal secret token.

***

You connect your AI client to this server, and it gives your agent direct, programmatic access to the core diagnostics and metadata of your entire automation setup. You don't have to navigate complex dashboards; you just ask for what you need. The system executes the necessary tool calls and hands you a clean JSON output ready for review.

## Tools

### get_execution_details
Retrieves the full, detailed trace logs for one specific workflow run.

### get_workflow_details
Gets the complete logic map and configuration details for a specified workflow.

### list_instance_users
Lists all team members who have access to the n8n automation instance.

### list_stored_credentials
Shows metadata for every saved API credential in the system, verifying types and IDs.

### list_workflow_executions
Lists a record of recent workflow runs, including their status (success/failure).

### list_workflow_tags
Retrieves the organizational categories used to group and sort workflows.

### list_workflows
Provides an inventory list of all active automation workflows in the instance.

## Prompt Examples

**Prompt:** 
```
List all active workflows in my n8n instance
```

**Response:** 
```
I've retrieved your n8n workflows. Highlights include 'Shopify-to-Slack-Sync' (ID: 12, Active), 'Customer-Onboarding-Email' (ID: 45, Active), and 'Daily-Database-Cleanup' (ID: 78). Would you like to check the last execution status for any of these?
```

**Prompt:** 
```
Show me the last 5 failed executions in n8n
```

**Response:** 
```
Retrieving failed executions… I've identified 5 recent errors. The most recent failure was in workflow 'Lead-Ingestion' (ID: 135) due to an 'Unauthorized' error on the CRM node. Would you like me to fetch the full trace for that execution?
```

**Prompt:** 
```
List all n8n credentials associated with 'Slack'
```

**Response:** 
```
I've identified 2 credentials matching 'Slack': 1) 'Slack-Main-Workspace' (ID: 5, Type: slackApi), and 2) 'Slack-Support-Bot' (ID: 8, Type: slackApi). Both appear to be valid. Would you like to check the tags associated with these workflows?
```

## Capabilities

### Inventory Workflows
List all workflows, check their organizational tags, or retrieve detailed logic maps for a single process.

### Audit Credentials and Users
Get metadata on saved API credentials and list every user who has access to the n8n instance.

### Monitor Execution Health
List recent runs, check success/failure status, and retrieve full trace logs for immediate debugging.

## Use Cases

### Debugging a broken webhook.
The lead sync broke overnight. Instead of navigating to the 'Executions' page, you ask your agent to run `list_workflow_executions` for the 'Lead Sync' workflow. The results point to an ID: 901. You then call `get_execution_details` using that ID and immediately see the exact API error code on the failed node.

### Checking access compliance.
Security mandates a review of all active credentials. You run `list_stored_credentials`. The agent shows you metadata for every credential, confirming if they're expired or if they are linked to sensitive services like 'CRM-Prod'.

### Understanding legacy logic.
A colleague points out a workflow called 'Old Report Gen.' You use `list_workflows` to confirm its existence, then call `get_workflow_details`. The agent spits out the entire JSON structure, letting you understand the complex data flow without ever opening the n8n UI.

### Onboarding a new team member.
You need to verify who has access. You ask your agent to run `list_instance_users`. It gives you a list of everyone, their roles, and confirms that the new hire's account is active and mapped correctly.

## Benefits

- **Stop guessing why workflows fail.** Instead of digging through logs manually, use `get_execution_details` to pull the absolute trace log for any specific run. You see exactly where it broke down.
- **Audit system permissions instantly.** Don't rely on memory when checking who can access what. Use `list_instance_users` and `list_stored_credentials` to get a clear, auditable list of users and API keys.
- **Know your whole process map.** Want to see the full logic of a workflow? Call `get_workflow_details`. You get the node-by-node JSON logic map right in your chat window.
- **Track automation health at a glance.** Use `list_workflow_executions` to check recent runs. It's faster than clicking through the 'Executions' tab just to see if anything failed.
- **Keep things organized.** Need to filter workflows by project? Call `list_workflow_tags` and then use that list in conjunction with `list_workflows` for precise filtering.

## How It Works

The bottom line is: You get a conversational interface to complex machine diagnostics, bypassing manual dashboard navigation entirely.

1. Subscribe to the server and provide your n8n Base URL and API Key.
2. Tell your agent what you need (e.g., 'Show me recent failures in the lead ingestion workflow').
3. The agent runs the necessary tool calls, fetching the data and presenting it to you directly.

## Frequently Asked Questions

**How do I check if my n8n workflow is active using the list_workflows tool?**
The `list_workflows` tool provides an inventory of all workflows. You can filter this output based on status or use the retrieved details with `get_workflow_details` to confirm its current activity settings.

**What if I want to see a failure that happened last month? Can get_execution_details handle old logs?**
`list_workflow_executions` shows recent runs. For older history, you'll need to ensure your n8n instance retains those historical records and then use the appropriate ID with `get_execution_details`.

**Does list_instance_users tell me what roles people have?**
Yes. The `list_instance_users` tool returns metadata about provisioned team users, including their assigned roles within the n8n infrastructure for access control verification.

**Can I use list_workflow_tags to group related workflows?**
Absolutely. Calling `list_workflow_tags` gives you all available organizational categories. You can then reference these tags when asking the agent to filter results from `list_workflows`.

**When I use list_stored_credentials, how do I verify the type of saved credential?**
The tool lists metadata mapping credentials to their system types. It verifies the necessary ID and type without exposing any literal secure tokens, keeping your data safe while you audit.

**Does get_execution_details provide enough information for deep troubleshooting of a failure?**
Yes. This tool retrieves absolute trace logs for a specific execution ID. This lets you pinpoint the exact node and process that failed, making debugging quick and precise.

**How do I get a structural view of a workflow using get_workflow_details?**
The tool pulls detailed JSON logic nodes directly from your instance. This gives you full visibility into link mappings and trigger configurations, letting you understand the underlying data flow.

**Can list_workflow_executions filter results to only show failed runs?**
Yes. You can use this tool to scope down your investigation by filtering executions based on status or time range. This helps narrow down thousands of logs to the specific failures you need.

**Does this work with self-hosted n8n instances?**
Yes. You just need to provide your full n8n Base URL (e.g., https://n8n.your-company.com). Your agent will connect securely to your private instance using your n8n API Key.

**Can I see exactly why an n8n execution failed through my agent?**
Yes. Use the `get_execution` tool with a specific Execution ID. Your agent will retrieve the node-level trace logs, allowing you to see which specific node encountered an error and the resulting output payload for that step.

**Can my agent list the automation credentials saved in my n8n account?**
Absolutely. Use the `list_credentials` tool to identify all stored auth hooks. Your agent will report the credential names and system types (e.g., Slack, GitHub), helping you audit your integrations without exposing literal secure tokens.