NativeAIHub
n8n

n8n

Workflow automation platform. Search, execute, and monitor n8n workflows directly from Claude Code.

MCP Serverยท3 sectionsยท1 min read
workflowdevops
Install Prompt

Paste this into Claude Code to set it up:

I want to add the n8n MCP Server to my Claude Code setup.

IMPORTANT: Never use Read/Edit tools on ~/.claude.json. Use jq via Bash instead.

Prerequisites: You need a running n8n instance (self hosted or cloud) and an API key. Generate the API key from your n8n settings under API section.

Run this command to add the MCP server (replace the URL and key with your actual values):
```bash
jq '.mcpServers["n8n"] = {"type": "stdio", "command": "npx", "args": ["-y", "n8n-mcp-server"], "env": {"N8N_API_URL": "https://your-n8n-instance.com/api/v1", "N8N_API_KEY": "your-api-key"}}' ~/.claude.json > /tmp/claude-json-tmp && mv /tmp/claude-json-tmp ~/.claude.json
```

After adding, restart Claude Code. The server connects to your n8n instance and lets the agent search, inspect, and execute workflows.

01What It Does

Trigger your automations without leaving the terminal

n8n is a powerful workflow automation platform that connects hundreds of services. The MCP server lets your AI agent interact with your n8n instance directly: search for workflows by name, inspect their configuration, and execute them on demand. This is useful when you have automation workflows for data processing, notifications, or deployments that you want to trigger as part of a larger conversation with your agent.
๐Ÿ”
Search WorkflowsFind workflows by name or tag. Quickly locate the right automation from your entire n8n library without opening the UI.
โ–ถ๏ธ
Execute WorkflowsTrigger any workflow on demand with optional input data. Run data processing, notification, or deployment pipelines directly from your conversation.
๐Ÿ“Š
Inspect DetailsView workflow configuration, node structure, and execution history. Understand what a workflow does before running it.

02Setup

# Add to ~/.claude.json under mcpServers
"n8n": {
  "type": "stdio",
  "command": "npx",
  "args": ["-y", "n8n-mcp-server"],
  "env": {
    "N8N_API_URL": "https://your-instance.com/api/v1",
    "N8N_API_KEY": "your-api-key"
  }
}
Your n8n API key has access to all workflows in your instance, including the ability to execute them. Be cautious with production workflows that have side effects (sending emails, modifying databases, triggering external services).

03Usage Patterns

๐Ÿ”„
Pipeline OrchestrationTrigger data processing or ETL workflows as part of a larger task. The agent can execute n8n workflows after completing code changes or deployments.
๐Ÿ””
Notification WorkflowsExecute notification workflows to alert team members about completed tasks, deployments, or important events discovered during the conversation.