Claude MCP Setup Guide – Complete Configuration

Transform Claude Desktop into an n8n automation expert with Model Context Protocol servers

Transform Claude Desktop into an n8n automation expert with Model Context Protocol servers.
เปลี่ยน Claude Desktop ให้เป็นผู้เชี่ยวชาญด้านระบบอัตโนมัติ n8n ด้วย Model Context Protocol servers


📋 Prerequisites / ข้อกำหนดเบื้องต้น:

  • Node.js: Install from nodejs.org (required for NPX commands)
    ติดตั้ง Node.js จาก nodejs.org (จำเป็นสำหรับคำสั่ง NPX)
  • Claude Desktop: Download from claude.ai/desktop
    ดาวน์โหลด Claude Desktop จาก claude.ai/desktop
  • n8n Instance: Running n8n with API access enabled
    n8n ที่ทำงานอยู่และเปิดใช้งาน API

Step 0: Install Node.js (If Not Already Installed)

ขั้นตอนที่ 0: ติดตั้ง Node.js (หากยังไม่ได้ติดตั้ง)

Check if Node.js is already installed by opening Command Prompt and typing: / ตรวจสอบว่า Node.js ติดตั้งแล้วหรือไม่โดยเปิด Command Prompt และพิมพ์:

node --version

If you see a version number (like v20.x.x), Node.js is installed. If not, follow these steps: / หากเห็นหมายเลขเวอร์ชัน (เช่น v20.x.x) แสดงว่า Node.js ติดตั้งแล้ว หากไม่ ให้ทำตามขั้นตอนเหล่านี้:

📥 Node.js Installation Steps / ขั้นตอนการติดตั้ง Node.js

  1. Download Node.js / ดาวน์โหลด Node.js:

    • Visit nodejs.org
    • Download the LTS version (recommended) / ดาวน์โหลดเวอร์ชัน LTS (แนะนำ)
    • Choose the Windows Installer (.msi) / เลือก Windows Installer (.msi)
  2. Run the Installer / รันตัวติดตั้ง:

    • Double-click the downloaded .msi file / ดับเบิลคลิกไฟล์ .msi ที่ดาวน์โหลด
    • Follow the installation wizard / ทำตามตัวช่วยการติดตั้ง
    • Accept all default settings / ใช้การตั้งค่าเริ่มต้นทั้งหมด
    • Important: Make sure "Add to PATH" is checked / สำคัญ: ให้แน่ใจว่าเลือก "Add to PATH"
  3. Verify Installation / ตรวจสอบการติดตั้ง:

    • Open a new Command Prompt / เปิด Command Prompt ใหม่
    • Type: node --version / พิมพ์: node --version
    • Type: npx --version / พิมพ์: npx --version
    • Both should show version numbers / ทั้งคู่ควรแสดงหมายเลขเวอร์ชัน

💡 Tip: If the commands don't work, restart your computer and try again. This ensures the PATH environment variable is updated.
เคล็ดลับ: หากคำสั่งไม่ทำงาน ให้รีสตาร์ทคอมพิวเตอร์และลองใหม่ เพื่อให้แน่ใจว่า PATH environment variable ได้รับการอัปเดต


Step 1: Locate Claude Desktop Configuration

ขั้นตอนที่ 1: หาไฟล์การตั้งค่า Claude Desktop

Find your Claude Desktop configuration file. The location depends on your operating system: / หาไฟล์การตั้งค่าของ Claude Desktop ตำแหน่งขึ้นอยู่กับระบบปฏิบัติการ:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

💡 Pro Tip: If the file doesn't exist, create it in the correct location for your operating system.
เคล็ดลับ: หากไฟล์ไม่มีอยู่ ให้สร้างไฟล์ในตำแหน่งที่ถูกต้องสำหรับระบบปฏิบัติการของคุณ


Step 2: Create or Edit Configuration File

ขั้นตอนที่ 2: สร้างหรือแก้ไขไฟล์การตั้งค่า

Enter your details below to generate a personalized configuration: / กรอกรายละเอียดของคุณด้านล่างเพื่อสร้างการตั้งค่าที่เหมาะกับคุณ:

🔧 Configuration Generator / เครื่องมือสร้างการตั้งค่า

n8n Instance URL / URL ของ n8n:

https://your-n8n-instance.com

n8n API Key / API Key ของ n8n:

n8n_api_xxxxxxxxxxxxxxxxxxxxxxxx

Generated Configuration:

{
  "mcpServers": {
    "n8n-mcp": {
      "command": "npx",
      "args": ["n8n-mcp"],
      "env": {
        "MCP_MODE": "stdio",
        "LOG_LEVEL": "error",
        "DISABLE_CONSOLE_OUTPUT": "true",
        "N8N_API_URL": "https://your-n8n-instance.com/api/v1",
        "N8N_API_KEY": "your-api-key-here"
      }
    },
    "n8n-manager": {
      "command": "npx",
      "args": [
        "-y",
        "@leonardsellem/n8n-mcp-server"
      ],
      "env": {
        "N8N_API_URL": "https://your-n8n-instance.com/api/v1",
        "N8N_API_KEY": "your-api-key-here"
      }
    }
  }
}

🔑 Getting Your n8n API Key / การขอ API Key ของ n8n:

  1. Log into your n8n instance / เข้าสู่ระบบ n8n ของคุณ
  2. Go to Settings → Personal → API Keys / ไปที่ Settings → Personal → API Keys
  3. Click "Create API Key" / คลิก "Create API Key"
  4. Copy the generated key / คัดลอก key ที่สร้างขึ้น

Step 3: Restart Claude Desktop

ขั้นตอนที่ 3: รีสตาร์ท Claude Desktop

After saving your configuration file, restart Claude Desktop completely: / หลังจากบันทึกไฟล์การตั้งค่าแล้ว ให้รีสตาร์ท Claude Desktop ให้สมบูรณ์:

  • Windows: Close Claude Desktop completely and reopen it
    ปิด Claude Desktop ให้หมดและเปิดใหม่
  • macOS: Quit Claude Desktop (Cmd+Q) and relaunch
    ออกจาก Claude Desktop (Cmd+Q) และเปิดใหม่
  • Linux: Close and restart Claude Desktop
    ปิดและรีสตาร์ท Claude Desktop

💡 Important: Make sure to completely quit Claude Desktop, not just close the window. MCP servers only load when Claude Desktop starts up.
สำคัญ: ต้องออกจาก Claude Desktop ให้สมบูรณ์ ไม่ใช่แค่ปิดหน้าต่าง MCP servers จะโหลดเมื่อ Claude Desktop เริ่มต้นเท่านั้น


Step 4: Test Your Setup

ขั้นตอนที่ 4: ทดสอบการตั้งค่า

Test your MCP configuration by asking Claude to help with n8n workflows: / ทดสอบการตั้งค่า MCP โดยขอให้ Claude ช่วยเหลือกับ n8n workflows:

🧪 Test Commands to Try / คำสั่งทดสอบที่ลองได้:

  • "Show me all my n8n workflows" / "แสดง n8n workflows ทั้งหมดของฉัน"
  • "Help me create a workflow that triggers on a webhook" / "ช่วยสร้าง workflow ที่ trigger จาก webhook"
  • "What are the properties of the HTTP Request node?" / "HTTP Request node มี properties อะไรบ้าง"
  • "Create a simple workflow to send a Slack message" / "สร้าง workflow ง่ายๆ สำหรับส่งข้อความ Slack"

If everything works correctly, Claude will be able to: / หากทุกอย่างทำงานถูกต้อง Claude จะสามารถ:

  • List and manage your existing n8n workflows / แสดงรายการและจัดการ n8n workflows ที่มีอยู่
  • Provide detailed information about n8n nodes / ให้ข้อมูลละเอียดเกี่ยวกับ n8n nodes
  • Help create new workflows with proper configuration / ช่วยสร้าง workflows ใหม่ด้วยการตั้งค่าที่ถูกต้อง
  • Access your local files through the filesystem server / เข้าถึงไฟล์ในเครื่องผ่าน filesystem server

Troubleshooting

การแก้ไขปัญหา

Common issues and solutions: / ปัญหาที่พบบ่อยและวิธีแก้ไข:

Common Issues & Solutions / ปัญหาที่พบบ่อยและวิธีแก้ไข:

"MCP server not found"
Check JSON syntax and ensure file is saved properly
ตรวจสอบ syntax ของ JSON และให้แน่ใจว่าบันทึกไฟล์ถูกต้อง

"Connection failed"
Verify your n8n URL and API key are correct
ตรวจสอบ n8n URL และ API key ให้ถูกต้อง

"NPX command not found"
Install Node.js from nodejs.org
ติดตั้ง Node.js จาก nodejs.org

"Permission denied"
Run Claude Desktop as administrator or check file permissions
เรียกใช้ Claude Desktop ในฐานะ administrator หรือตรวจสอบสิทธิ์ไฟล์


🎉 Congratulations! / ยินดีด้วย!

You've successfully set up Claude MCP with n8n integration. Claude can now help you build, manage, and optimize your n8n workflows with expert-level knowledge!
คุณได้ตั้งค่า Claude MCP กับการรวม n8n เรียบร้อยแล้ว Claude สามารถช่วยคุณสร้าง จัดการ และปรับปรุง n8n workflows ด้วยความรู้ระดับผู้เชี่ยวชาญ!

Need help? Visit the n8n-MCP GitHub repository for more information.
ต้องการความช่วยเหลือ? เยี่ยมชม n8n-MCP GitHub repository สำหรับข้อมูลเพิ่มเติม


Quick Reference

Configuration File Locations:

# Windows
%APPDATA%\Claude\claude_desktop_config.json

# macOS
~/Library/Application Support/Claude/claude_desktop_config.json

# Linux
~/.config/Claude/claude_desktop_config.json

Complete Configuration Template:

{
  "mcpServers": {
    "n8n-mcp": {
      "command": "npx",
      "args": ["n8n-mcp"],
      "env": {
        "MCP_MODE": "stdio",
        "LOG_LEVEL": "error",
        "DISABLE_CONSOLE_OUTPUT": "true",
        "N8N_API_URL": "https://your-n8n-instance.com/api/v1",
        "N8N_API_KEY": "your-api-key-here"
      }
    },
    "n8n-manager": {
      "command": "npx",
      "args": [
        "-y",
        "@leonardsellem/n8n-mcp-server"
      ],
      "env": {
        "N8N_API_URL": "https://your-n8n-instance.com/api/v1",
        "N8N_API_KEY": "your-api-key-here"
      }
    }
  }
}

Verification Commands:

# Check Node.js installation
node --version
npx --version

# Test MCP functionality in Claude Desktop
"Show me all my n8n workflows"
"Help me create a workflow that triggers on a webhook"

Troubleshooting Checklist:

  • ✅ Node.js installed with NPX available
  • ✅ Configuration file saved in correct location
  • ✅ JSON syntax is valid
  • ✅ n8n URL and API key are correct
  • ✅ Claude Desktop restarted completely
  • ✅ Test commands work in chat

Need help? Contact us at ShantiLink.com 💬