n8n MCP Server
Enables management of n8n workflows, executions, credentials, tags, and variables via MCP tools. Supports stdio, Claude Code, and Claude Web with optional Authentik OAuth.
README
n8n MCP Server
MCP Server untuk n8n REST API, dibangun dengan FastMCP. Ekspos tool untuk mengelola workflows, executions, credentials, tags, dan variables langsung dari MCP client (Claude Desktop, Claude Code, Claude Web).
Dipakai lewat tiga kanal: stdio, Claude Code, dan Claude Web (claude.ai). Otentikasi memakai Authentik sebagai identity provider (untuk Claude Web).
Tools yang tersedia
| Kategori | Tool | Deskripsi |
|---|---|---|
| Workflow | list_workflows |
Daftar semua workflow |
| Workflow | get_workflow |
Ambil detail satu workflow |
| Workflow | create_workflow |
Buat workflow baru |
| Workflow | update_workflow |
Perbarui workflow |
| Workflow | delete_workflow |
Hapus workflow |
| Workflow | activate_workflow |
Aktifkan workflow |
| Workflow | deactivate_workflow |
Nonaktifkan workflow |
| Execution | list_executions |
Daftar eksekusi (dengan filter) |
| Execution | get_execution |
Ambil detail satu eksekusi |
| Execution | delete_execution |
Hapus eksekusi |
| Credential | list_credentials |
Daftar credentials |
| Credential | get_credential |
Ambil detail credential |
| Credential | create_credential |
Buat credential baru |
| Credential | delete_credential |
Hapus credential |
| Tag | list_tags |
Daftar semua tag |
| Tag | create_tag |
Buat tag baru |
| Tag | update_tag |
Perbarui nama tag |
| Tag | delete_tag |
Hapus tag |
| Variable | list_variables |
Daftar semua variable |
| Variable | create_variable |
Buat variable baru |
| Variable | delete_variable |
Hapus variable |
| Audit | get_audit_log |
Ambil audit log n8n |
Cara pakai per kanal
1. stdio — Claude Desktop / Claude Code lokal
Tidak perlu auth jaringan; client men-spawn proses langsung.
{
"mcpServers": {
"n8n-mcp": {
"command": "uvx",
"args": ["--from", "git+https://github.com/andhit-r/n8n-mcp@v0.1.0", "n8n-mcp"],
"env": {
"N8N_API_BASE_URL": "http://localhost:5678/api/v1",
"N8N_API_KEY": "your-n8n-api-key"
}
}
}
}
Atau via Docker (stdio):
{
"mcpServers": {
"n8n-mcp": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "MCP_TRANSPORT=stdio",
"-e", "N8N_API_BASE_URL=http://host.docker.internal:5678/api/v1",
"-e", "N8N_API_KEY=your-n8n-api-key",
"ghcr.io/andhit-r/n8n-mcp:latest"
]
}
}
}
2. Claude Code
# stdio (langsung, tanpa server terpisah)
claude mcp add n8n-mcp -- uvx --from "git+https://github.com/andhit-r/n8n-mcp@v0.1.0" n8n-mcp
# remote (server HTTP yang sudah berjalan)
claude mcp add --transport http n8n-mcp https://n8n-mcp.example.com/mcp
3. Claude Web (claude.ai) — remote, WAJIB OAuth Authentik
Jalankan server sebagai service HTTP di URL publik HTTPS, daftarkan sebagai Custom Connector di claude.ai.
docker run -d -p 8000:8000 \
-e N8N_API_BASE_URL=https://your-n8n.example.com/api/v1 \
-e N8N_API_KEY=your-n8n-api-key \
-e MCP_BASE_URL=https://n8n-mcp.example.com \
-e AUTHENTIK_BASE_URL=https://auth.example.com \
-e AUTHENTIK_APP_SLUG=n8n-mcp \
-e AUTHENTIK_CLIENT_ID=... \
-e AUTHENTIK_CLIENT_SECRET=... \
ghcr.io/andhit-r/n8n-mcp:latest
Dirilis via GitHub (GitHub Release + image GHCR). Tidak tersedia di PyPI. Install dari sumber:
pip install "git+https://github.com/andhit-r/n8n-mcp@v0.1.0".
Konfigurasi n8n API
Aktifkan Public REST API di n8n: Settings → n8n API → Create an API key. Pastikan akun memiliki izin yang sesuai (admin direkomendasikan).
| Variabel | Wajib | Contoh |
|---|---|---|
N8N_API_BASE_URL |
Ya | http://localhost:5678/api/v1 |
N8N_API_KEY |
Ya | n8n_api_xxx... |
N8N_TIMEOUT |
Tidak | 30 (detik, default) |
Otentikasi (Authentik)
Server memilih auth otomatis dari environment:
| Mekanisme | Untuk | Aktif jika |
|---|---|---|
| OAuth Authentik | Claude Web / browser | AUTHENTIK_* + MCP_BASE_URL diisi |
| API Key statis | VS Code / CLI | MCP_API_KEY diisi |
| (tanpa auth) | stdio / jaringan lokal | tidak ada yang diisi |
Buat OAuth2/OIDC Provider + Application di Authentik (Redirect URI
https://<MCP_BASE_URL>/auth/callback, scope openid profile email).
Transport (environment)
| Variabel | Default | Keterangan |
|---|---|---|
MCP_TRANSPORT |
stdio |
stdio, http, atau sse |
MCP_HOST / MCP_PORT |
127.0.0.1 / 8000 |
bind saat http/sse |
MCP_BASE_URL |
— | URL publik (wajib untuk OAuth Authentik) |
Deployment cloud: uvicorn n8n_mcp.asgi:app --host 0.0.0.0 --port 8000.
Pengembangan
pip install -e .
cp .env.example .env # isi N8N_API_BASE_URL dan N8N_API_KEY
python -m n8n_mcp # jalankan lokal (stdio)
make test # gate test (lint + unit)
Lisensi
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 模型以安全和受控的方式获取实时的网络信息。