Skip to main content

Generic n8n Chat Trigger MCP server - any n8n chatbot as an MCP tool

Project description

n8n Chatbot MCP Server

Python MCP License: MIT PyPI

Turn any n8n Chat Trigger webhook into an MCP tool. Just provide the webhook URL — the server auto-discovers the chatbot name, description, welcome message, and required headers from the n8n Chat Trigger page.

Features

  • Zero Config — Only the webhook URL is required, everything else is auto-discovered
  • Auto-Discovery — Extracts name, description, welcome message, and X-Instance-Id from the chat UI
  • Multi-Turn — Session ID support for contextual conversations
  • Multiple Bots — Register as many n8n chatbots as you want, each as a separate MCP server
  • Additive Description — Auto-discovered subtitle + optional extra context via env var

Quick Start

Claude Code

claude mcp add my-chatbot \
  -e N8N_CHATBOT_URL="https://n8n.example.com/webhook/my-bot/chat" \
  -- uvx n8n-chatbot-mcp

Claude Desktop

Add to your config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "my-chatbot": {
      "command": "uvx",
      "args": ["n8n-chatbot-mcp"],
      "env": {
        "N8N_CHATBOT_URL": "https://n8n.example.com/webhook/my-bot/chat"
      }
    }
  }
}

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "my-chatbot": {
      "command": "uvx",
      "args": ["n8n-chatbot-mcp"],
      "env": {
        "N8N_CHATBOT_URL": "https://n8n.example.com/webhook/my-bot/chat"
      }
    }
  }
}

Windsurf

Add to Windsurf MCP config:

{
  "mcpServers": {
    "my-chatbot": {
      "command": "uvx",
      "args": ["n8n-chatbot-mcp"],
      "env": {
        "N8N_CHATBOT_URL": "https://n8n.example.com/webhook/my-bot/chat"
      }
    }
  }
}

VS Code

Add to your VS Code settings (JSON):

"mcp": {
  "servers": {
    "my-chatbot": {
      "type": "stdio",
      "command": "uvx",
      "args": ["n8n-chatbot-mcp"],
      "env": {
        "N8N_CHATBOT_URL": "https://n8n.example.com/webhook/my-bot/chat"
      }
    }
  }
}

Gemini CLI

Add to ~/.gemini/settings.json:

{
  "mcpServers": {
    "my-chatbot": {
      "command": "uvx",
      "args": ["n8n-chatbot-mcp"],
      "env": {
        "N8N_CHATBOT_URL": "https://n8n.example.com/webhook/my-bot/chat"
      }
    }
  }
}

GitHub Copilot

Add to ~/.copilot/mcp-config.json:

{
  "mcpServers": {
    "my-chatbot": {
      "command": "uvx",
      "args": ["n8n-chatbot-mcp"],
      "env": {
        "N8N_CHATBOT_URL": "https://n8n.example.com/webhook/my-bot/chat"
      }
    }
  }
}

OpenAI Codex

Add to ~/.codex/config.toml:

[mcp_servers.my-chatbot]
command = "uvx"
args = ["n8n-chatbot-mcp"]

[mcp_servers.my-chatbot.env]
N8N_CHATBOT_URL = "https://n8n.example.com/webhook/my-bot/chat"

Install from Source

cd n8n-chatbot-mcp
pip install -e .

Configuration

Environment Variable Required Default Description
N8N_CHATBOT_URL Yes Full n8n Chat Trigger webhook URL
N8N_CHATBOT_DESCRIPTION No Extra context appended to auto-discovered description
N8N_CHATBOT_TIMEOUT No 120 Request timeout in seconds

Auto-Discovery

At startup the server makes a single GET request to the webhook URL and parses the n8n Chat Trigger HTML to extract:

  • Chatbot name (from i18n.title) — used as the MCP server name
  • Chatbot description (from i18n.subtitle) — used in the tool description
  • Welcome message (from initialMessages) — included in tool context
  • X-Instance-Id header — sent with every POST request

N8N_CHATBOT_DESCRIPTION is additive: the auto-discovered subtitle is always included, and the env var value is appended after it.

Multiple Chatbots

Register as many n8n chatbots as you need — each one is a separate MCP server entry:

{
  "mcpServers": {
    "hr-bot": {
      "command": "uvx",
      "args": ["n8n-chatbot-mcp"],
      "env": {
        "N8N_CHATBOT_URL": "https://n8n.example.com/webhook/hr-bot/chat"
      }
    },
    "it-bot": {
      "command": "uvx",
      "args": ["n8n-chatbot-mcp"],
      "env": {
        "N8N_CHATBOT_URL": "https://n8n.example.com/webhook/it-bot/chat",
        "N8N_CHATBOT_DESCRIPTION": "Also helps with VPN and system access issues"
      }
    }
  }
}

Tool

ask_chatbot — Send a question to the chatbot

Sends a question to the n8n chatbot and returns the response.

Parameter Type Required Description
question string Yes The question to ask
session_id string No Session ID for multi-turn conversations (auto-generated if omitted)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

n8n_chatbot_mcp-1.0.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

n8n_chatbot_mcp-1.0.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file n8n_chatbot_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: n8n_chatbot_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for n8n_chatbot_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 dfe0e5d0ae73587d003eaf8035a077e75dd422eff2b14acaca413091eb08bc29
MD5 7e69f4a9c87cf0ce3accd9cceb2a39b6
BLAKE2b-256 373b4152bbc1e17486fdcb2e6133941cac4329734532843b740c8f87d744b0b5

See more details on using hashes here.

File details

Details for the file n8n_chatbot_mcp-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for n8n_chatbot_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c6c3bb9b61333f48f5dcd6b53c55782e1919426cabc87c57e972eb03ec0a6e6
MD5 11b9be375ef4dda7139e8375a9a2d79f
BLAKE2b-256 43895645763ddaab22e7fd60bb630fd000a57220838b90e1c07f4470e51df8c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page