n8n MCP Server
Wraps the n8n self-hosted REST API to let Claude and MCP-compatible LLMs manage workflows, executions, credentials, and more via natural language.
README
n8n MCP Server
A Model Context Protocol (MCP) server that wraps the n8n self-hosted REST API, letting Claude (and any MCP-compatible LLM client) manage your n8n instance through natural language.
Features
30+ tools covering:
| Domain | Operations |
|---|---|
| Workflows | list, get, create, update, delete, activate, deactivate, archive, unarchive, manage tags |
| Executions | list, get, delete, retry, stop |
| Credentials | list, get, get schema, create, update, delete, test |
| Tags | list, create, update, delete |
| Variables | list, create, update, delete |
| Projects | list, create |
| Users | list |
| System | security audit, discover API capabilities, manage community packages |
Prerequisites
- Node.js 18+
- A self-hosted n8n instance (v1.0+)
- An n8n REST API key (see Getting an API Key)
Getting an API Key
- Open your n8n instance
- Go to Settings → n8n API
- Click Create an API key
- Copy the generated key — you will not be able to see it again
The API key inherits the permissions of the user who created it. Use an owner account to unlock all tools (credential listing, user management, audit).
Installation
git clone https://git.verzth.work/mcp/n8n.git
cd n8n
npm install
npm run build
Configuration
Claude Desktop
Add the following entry to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"n8n": {
"command": "node",
"args": ["/absolute/path/to/n8n/dist/index.js"],
"env": {
"N8N_BASE_URL": "https://your-n8n-instance.example.com",
"N8N_API_KEY": "your-api-key-here"
}
}
}
}
Replace /absolute/path/to/n8n with the actual directory where you cloned the repo.
Claude Code (CLI)
Add to your project's .claude/settings.json or global ~/.claude/settings.json:
{
"mcpServers": {
"n8n": {
"command": "node",
"args": ["/absolute/path/to/n8n/dist/index.js"],
"env": {
"N8N_BASE_URL": "https://your-n8n-instance.example.com",
"N8N_API_KEY": "your-api-key-here"
}
}
}
}
Environment Variables
| Variable | Required | Description |
|---|---|---|
N8N_BASE_URL |
✅ | Base URL of your n8n instance (e.g. https://n8n.example.com) |
N8N_API_KEY |
✅ | API key from n8n Settings → n8n API |
Usage Examples
Once configured, you can ask Claude things like:
List all active workflows in n8n
Show me the last 10 failed executions
Activate the workflow named "Daily Report"
Create a new tag called "production" and apply it to workflow abc123
Test the Slack credential
Run a security audit on my n8n instance
What community packages do I have installed?
Development
# Install dependencies
npm install
# Build TypeScript
npm run build
# Watch mode (auto-rebuild on change)
npm run dev
Project Structure
src/
├── index.ts # Entry point — server init + transport
├── types.ts # TypeScript interfaces
├── constants.ts # Shared constants (limits, pagination)
├── services/
│ └── n8n-client.ts # Axios client + error handler
└── tools/
├── workflows.ts # Workflow management tools
├── executions.ts # Execution management tools
├── credentials.ts # Credential management tools
├── tags.ts # Tag management tools
├── variables.ts # Variable management tools
└── misc.ts # Projects, users, audit, packages
Transport
This server uses stdio transport, which means it runs as a subprocess of the MCP client. It does not expose any network ports and all authentication credentials are passed via environment variables — they never touch the codebase.
Security Notes
- API keys are read from environment variables only — never hardcode them
- The server only talks to the n8n instance you configure
- Destructive tools (
delete,uninstall) are annotated withdestructiveHint: trueso clients can prompt for confirmation - Credential secret data is intentionally excluded from
n8n_list_credentialsandn8n_get_credentialresponses (n8n API design — secrets are write-only)
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。