n8n Agent Harness + MCP + Claude: Complete Setup Guide

Annotated n8n workflow canvas showing Chat Trigger, Google Drive search, Aggregate node, AI Agent, execution tool logs for Search Skill Files and Get Skill File, and formatted output.

TL;DR: n8n’s new Agent Harness ships a built-in MCP server. Enable it in Settings → MCP, copy the Server URL, then attach it to Claude Desktop/Web (Connectors) or Claude Code with claude mcp add n8n <URL>. About 15 minutes later you have an agent that writes and runs n8n workflows from plain English. No custom code.

What You Need Before You Start

  • An n8n instance, Cloud or self-hosted, on version 1.0 or later
  • Claude Desktop, a Claude Web account, or the Claude Code CLI
  • Comfort with n8n basics — nodes, connections, executions

Step 1: Turn On n8n’s Built-In MCP Server

n8n now ships an MCP server inside the product. You don’t need a separate Docker container or the community package.

  1. Open your n8n instance and go to Settings → MCP.
  2. Flip Instance-level MCP to Enabled.
  3. Copy the Server URL it shows (https://your-instance.n8n.cloud/mcp or your self-hosted equivalent).
  4. Optional: turn on OAuth so each user authorizes separately.

Self-hosted users: MCP needs a public HTTPS address. Localhost alone won’t work — use ngrok, a Cloudflare Tunnel, or your real domain.

Step 2A: Attach It to Claude Desktop or Claude Web

  1. Open the Claude Desktop app or claude.ai.
  2. Go to Settings → Connectors (Desktop) or Settings → Integrations (Web).
  3. Click Add MCP Server.
  4. Paste your n8n Server URL.
  5. With OAuth, finish the popup authorization. With an API key, generate one in n8n under Settings → API first.
  6. Click Connect.

n8n’s tools then show up in Claude’s toolbox: workflow_create, workflow_update, workflow_execute, workflow_list, node_types_list.

Step 2B: Attach It to Claude Code (CLI)

If you’d rather stay in the terminal:

  1. Confirm Claude Code is installed and authenticated with claude auth login.
  2. Run claude mcp add n8n <YOUR_N8N_SERVER_URL>.
  3. Run /mcp inside Claude Code to approve the connection.
  4. Test it with "List my n8n workflows".

Prefer OAuth over API keys here. It scopes access to your session and keeps long-lived keys out of your shell history.

Step 3: Build Your First Agent Workflow

Time to prove the wiring works. Paste this into Claude:

Create an n8n workflow that:
1. Triggers on a webhook
2. Uses an AI Agent node to summarize the incoming JSON
3. Posts the summary to a Slack channel
4. Returns the Slack message timestamp

Give me the workflow JSON and execute it.

Behind that single prompt, Claude calls node_types_list to pick the right nodes, workflow_create to build the JSON, and workflow_execute to run it. Open n8n → Workflows and the new workflow is sitting there, already executed.

Real Workflow Test & Limitations

Exact Commands and Settings I Used

# In n8n (UI only)
Settings → MCP → Enable Instance-level MCP → Copy Server URL

# Claude Desktop / Web
Settings → Connectors → Add MCP Server → paste URL

# Claude Code
claude mcp add n8n https://your-instance.n8n.cloud/mcp
/mcp        # approve the connection

# Test prompts
"List my n8n workflows"
"Create a workflow that triggers on a webhook, summarizes with an AI Agent, posts to Slack"

Setup I tested against: n8n 1.12.0 on Cloud, Streamable HTTP transport, OAuth 2.0 auth, Claude Sonnet 4.5. The test workflow was four nodes — Webhook → AI Agent → Slack → Respond — and ran end to end in roughly two seconds.

What It Actually Costs

Component Cost
n8n Cloud Starter $20/mo (₹1,680/mo)
n8n Cloud Pro $50/mo (₹4,200/mo)
Self-hosted VPS ~$5–10/mo (₹420–840/mo)
Claude API (Sonnet 4.5) ~$3–15 per 1M tokens in/out
Claude Desktop / Web Included in Pro and Max plans

Where It Falls Short

  • A public URL is mandatory. Self-hosted installs behind localhost simply won’t connect.
  • Built-in is simpler, not more powerful. The community n8n-mcp package still offers more options for local-only development.
  • Execution caps bite. Cloud Starter allows 2,500 executions a month, Pro 10,000. Chatty agents burn through that fast.
  • Debugging is rough. MCP calls surface in the n8n Execution log under an MCP tab — there’s no dedicated MCP debugger yet.
  • Tool lists go stale. Claude can miss nodes you just added. Reconnect (or /mcp) to refresh.
  • No per-user isolation. Instance-level MCP exposes every workflow to every connected client. User-scoped access is still on the roadmap.

Common Mistakes & Quick Fixes

Mistake What You See Fix
Installing community n8n-mcp out of habit Extra container, more config Just use Settings → MCP → Enable Instance-level MCP
Claude Code can’t see n8n tools Empty tool list Run /mcp to approve, verify the URL, restart Claude Code
OAuth callback fails on self-hosted Redirect URI mismatch Set N8N_MCP_OAUTH_CALLBACK_URL to your public URL plus /mcp/oauth/callback
Webhook never fires from Claude Execution stuck on “waiting for webhook” Hit the webhook URL manually first with curl or Postman

Where to Take This Next

  • Multi-agent chains: stack AI Agent nodes with distinct roles — planner, coder, reviewer.
  • RAG in the loop: add Qdrant or Pinecone retrieval before the agent reasons.
  • Human approval gates: drop a “Wait for Webhook” node mid-flow and pause until someone signs off.
  • Scheduled agents: cron trigger plus AI Agent gives you autonomous daily jobs — reports, monitors, cleanups.

FAQ

Do I need n8n Cloud, or can I self-host?

Both work. Self-hosting is free apart from infrastructure, but you must expose a public HTTPS URL for MCP. Cloud handles HTTPS, updates, and scaling for you.

Can I use this on the free Claude tier?

Claude Desktop and Web include Connectors on the free tier. Claude Code needs a Pro or Max plan for MCP. Check Anthropic’s current pricing before you commit.

What’s the difference between built-in MCP and community n8n-mcp?

Built-in is maintained by n8n, takes two clicks, and is instance-level only. The community package gives more configuration, per-user access, and stdio transport for local-only setups. Most beginners should start with built-in.

How do I secure my n8n MCP endpoint?

Use OAuth so each person authorizes individually. If you must use API keys, rotate them and trim n8n API permissions to the minimum. On self-hosted, put n8n behind Cloudflare Access, Tailscale, or a VPN.

Video Credit: Tutorial demonstrated by Julian Ivanov. Watch the full walkthrough on YouTube. Key timestamps: 3:45–8:20 for MCP server setup; 12:10–18:30 for the AI Agent node walkthrough.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top