home / mcp / mcp-n8n-builder mcp server

mcp-n8n-builder MCP Server

šŸŖ„ MCP server for programmatic creation and management of n8n workflows. Enables AI assistants to build, modify, and manage workflows without direct user intervention through a comprehensive set of tools and resources for interacting with n8n's REST API.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "spences10-mcp-n8n-builder": {
      "url": "http://localhost:5678/api/v1",
      "headers": {
        "N8N_HOST": "http://localhost:5678/api/v1",
        "CACHE_TTL": "300",
        "LOG_LEVEL": "info",
        "N8N_API_KEY": "your-n8n-api-key",
        "SERVER_NAME": "n8n-workflow-builder",
        "CACHE_ENABLED": "false",
        "SERVER_VERSION": "1.0.0",
        "OUTPUT_VERBOSITY": "concise"
      }
    }
  }
}

You run an MCP server to programmatically create and manage n8n workflows. This server lets you interact with n8n’s REST API to build, modify, validate, and execute workflows through structured tools and clear responses, reducing manual steps and enabling automation.

How to use

Your MCP client communicates with the n8n workflow builder MCP server to perform operations like listing, creating, updating, activating, and reading workflows, as well as listing and inspecting executions. Start by ensuring your n8n instance is reachable and that you have a valid API key. Use the MCP client to invoke tools such as list_workflows, create_workflow, activate_workflow, and list_executions to manage workflows and review run data. Validate node types before creation, and rely on smart suggestions when a requested node type is not available in your n8n instance.

How to install

# Prerequisites
- Node.js (LTS version)
- npm or yarn
- Access to a running n8n instance (with API key)

# Install dependencies and build if required by your environment
npm install

# Run the MCP server in development mode (example command from setup)
npm run dev

Configuration and usage notes

Two MCP connection options are shown for this server. You can connect via HTTP to a remote n8n instance or run a local stdio-based server as a child process.

{
  "mcpServers": {
    "n8n-workflow-builder": {
      "type": "http",
      "url": "http://localhost:5678/api/v1",
      "args": [],
      "env": {
        "N8N_HOST": "http://localhost:5678/api/v1",
        "N8N_API_KEY": "your-n8n-api-key",
        "OUTPUT_VERBOSITY": "concise"
      }
    }
  }
}

Troubleshooting

If you encounter token or validation issues, verify that your N8N_HOST and N8N_API_KEY are correct and that the nodes you plan to use exist in your n8n instance. Use list_available_nodes to confirm node types before creating workflows. Review error messages carefully to identify whether a missing node type or an invalid workflow structure caused the failure.

Examples and advanced usage

You can activate a workflow after creation to enable automatic runs, and you can inspect executions to review outcomes. Break complex workflows into smaller pieces to minimize context size when working with large JSON definitions.

Available tools

list_available_nodes

Lists all available nodes in the n8n instance to ensure you use valid node types before creating or updating workflows.

list_workflows

Lists all workflows with basic information including ID, name, status, creation date, and tags.

create_workflow

Creates a new workflow with specified nodes and connections. Validates node types exist in the n8n instance.

get_workflow

Retrieves complete details of a workflow by its ID.

update_workflow

Updates an existing workflow with new configuration. The entire workflow structure must be provided.

delete_workflow

Deletes a workflow by its ID (permanent).

activate_workflow

Activates a workflow by its ID to enable automatic running.

deactivate_workflow

Deactivates a workflow by its ID to stop automatic runs.

list_executions

Lists workflow execution history with details on status, duration, and timestamps.

get_execution

Retrieves detailed information about a specific workflow execution.