home / mcp / n8n mcp server

N8N MCP Server

MCP for managing n8n projects

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "codehalwell-n8n-mcp": {
      "command": "python",
      "args": [
        "-m",
        "mcp_server"
      ],
      "env": {
        "LOG_LEVEL": "info",
        "RATE_LIMIT": "60",
        "N8N_API_KEY": "YOUR_API_KEY",
        "N8N_API_URL": "https://your-n8n.example.com",
        "N8N_VERSION": "0.214.0"
      }
    }
  }
}

You have an MCP server that lets you build, manage, and run any n8n workflow through the n8n REST API. It removes node-type restrictions, provides comprehensive tooling, and adds monitoring, security, and operational features to your n8n instance. This guide walks you through using the server, installing it, and leveraging its tools to create powerful automation workflows.

How to use

Install and run the MCP server, then connect your MCP client to start building workflows. You can create, validate, and execute workflows that use any n8n node type, manage credentials securely, and monitor executions in real time. Use the available tools to list, create, update, activate, and delete workflows; trigger executions and inspect results; manage credentials; discover node types; and view system metrics and health. You can also enable webhook endpoints, run bulk operations, and observe audit logs for a complete governance trail.

How to install

1) Configure your n8n connection:
cp .env.template .env
# Edit .env with your n8n URL and API key

2) Install dependencies:
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

3) Run MCP server:
python -m mcp_server  # Runs health check then starts server

Configuration and usage notes

The MCP server reads configuration from environment variables. Typical options include the URL of your n8n instance and the API key needed to access it. You can adjust rate limits, logging verbosity, and the target n8n version if applicable. Audit logs capture destructive operations and credentials are redacted in outputs for security.

Operationally, you start the server once you have a running Python environment and a configured n8n connection. The server exposes a rich set of tools for workflow management, execution monitoring, credential handling, node discovery, and health metrics.

Examples and patterns

Create and manage a complex workflow by combining webhook triggers, HTTP requests, conditional branching, and notifications. You can trigger executions with custom payloads, route results through different paths, and persist data to a database. Use the discovery tools to inspect available node types and documentation for each node, then assemble workflows that reflect your business logic.

Available tools

validate_workflow

Validate workflow specifications offline to ensure correctness before deployment.

list_workflows

List workflows with optional filters such as name or active status.

create_workflow

Create a new workflow with dry-run options, auto-activate, or overwrite existing ones.

get_workflow

Fetch the full JSON representation of a workflow by ID or name.

update_workflow

Apply partial updates to an existing workflow by ID or name.

delete_workflow

Remove workflows from the MCP server.

activate_workflow

Enable or disable a workflow's execution.

duplicate_workflow

Clone an existing workflow with a customizable suffix.

execute_workflow

Trigger a workflow run with a specific payload.

get_webhook_urls

Retrieve webhook endpoints for a workflow.

bulk_activate_workflows

Activate or deactivate multiple workflows in parallel.

bulk_delete_workflows

Delete multiple workflows in parallel.

list_executions

View execution history with optional filters by workflow.

get_execution

Get detailed information and results for a specific execution.

delete_execution

Clean up execution history to manage storage.

list_credentials

List all credentials, with optional filtering by type.

get_credential

View credential details with sensitive data redacted.

create_credential

Add new credentials for workflows and API access.

update_credential

Modify existing credentials.

delete_credential

Remove credentials from the store.

list_node_types

Discover all available node types exposed by your n8n instance.

get_node_type

Retrieve detailed documentation and parameters for a specific node type.

get_circuit_breaker_stats

Monitor API health and current circuit breaker state.

reset_circuit_breaker

Manually reset the circuit breaker after n8n recovery.

get_metrics

Collect comprehensive metrics such as requests, latency, and cache status.

get_health_status

Perform overall health checks with detailed status information.

reset_metrics

Reset all collected metrics to start fresh.