N8n Local Setup
FreeNot checkedRun the open-source n8n-mcp locally and connect your n8n instance to MCP-compatible AI agents like Codex and Claude Code.
About
Run the open-source n8n-mcp locally and connect your n8n instance to MCP-compatible AI agents like Codex and Claude Code.
README
n8n MCP Local Setup
Run the open source n8n-mcp locally and connect your own n8n instance to Codex, Claude Code, or any MCP-compatible AI agent.
No Docker. No hosted api.n8n-mcp.com. Your n8n API key stays on your machine.
Install
You only need Node.js 18+.
npx -y github:pedrogrigs/n8n-mcp-local-setup install
The installer asks for three things:
| Input | Example |
|---|---|
| n8n URL | https://n8n.example.com |
| n8n API key | Your n8n user API key |
| Local MCP port | 3007 |
When it finishes, your local MCP endpoint is ready at:
http://127.0.0.1:3007/mcp
Restart Codex or Claude Code after install so they reload MCP configuration.
Why Use This
The hosted n8n MCP endpoint is convenient, but a local setup is better when you want control.
| Hosted bridge | Local bridge with this repo |
|---|---|
| API key leaves your machine | API key stays in your user folder |
| Depends on a third-party endpoint | Runs on 127.0.0.1 |
| Manual client setup | Codex and Claude Code configured automatically |
| Remote availability matters | Works while your computer is on |
What It Configures
The installer automatically:
- Installs the npm package
n8n-mcp - Runs the correct HTTP entrypoint for
n8n-mcp - Generates a strong local bearer token
- Starts a local MCP server on
127.0.0.1 - Enables autostart on login
- Configures Codex if installed
- Configures Claude Code if installed
- Replaces old configs pointing to
https://api.n8n-mcp.com - Verifies
/health - Verifies MCP
tools/listwhen possible
Platform Support
| System | Autostart method |
|---|---|
| Windows | User Scheduled Task |
| macOS | User LaunchAgent |
| Linux | systemd user service |
| Linux fallback | XDG autostart entry |
Common Commands
Check status:
npx -y github:pedrogrigs/n8n-mcp-local-setup status
Run diagnostics:
npx -y github:pedrogrigs/n8n-mcp-local-setup doctor
Restart the local server:
npx -y github:pedrogrigs/n8n-mcp-local-setup restart
Print generic MCP client snippets:
npx -y github:pedrogrigs/n8n-mcp-local-setup snippets
Non-Interactive Install
Use this only in a secure shell session.
macOS/Linux:
N8N_API_KEY="your-api-key" npx -y github:pedrogrigs/n8n-mcp-local-setup install --yes --url https://your-n8n.example.com --port 3007
Windows PowerShell:
$env:N8N_API_KEY="your-api-key"
npx -y github:pedrogrigs/n8n-mcp-local-setup install --yes --url https://your-n8n.example.com --port 3007
Where Secrets Are Stored
The installer creates a local runtime folder:
| System | Folder |
|---|---|
| Windows | %USERPROFILE%\.n8n-mcp-local |
| macOS/Linux | ~/.n8n-mcp-local |
That folder contains config.json with your n8n API key and local MCP token.
Do not publish or share that file.
Codex
The installer updates ~/.codex/config.toml and creates a backup before editing.
After installing, restart Codex and run:
/mcp
You should see n8n-mcp pointing to:
http://127.0.0.1:3007/mcp
Claude Code
If the claude command exists, the installer uses Claude Code's MCP CLI to add the local HTTP server at user scope.
After installing, restart Claude Code.
You can verify with:
claude mcp list
Agent Prompt
If you prefer to let a local coding agent run the setup, send it this prompt:
prompts/AGENT_INSTALL_PROMPT.md
The prompt includes the important implementation detail learned from real setup: for HTTP mode, run node_modules/n8n-mcp/dist/mcp/index.js, not the npm n8n-mcp stdio wrapper.
Generic MCP Config
For clients that support HTTP:
{
"mcpServers": {
"n8n-mcp": {
"type": "http",
"url": "http://127.0.0.1:3007/mcp",
"headers": {
"Authorization": "Bearer <your-local-token>"
}
}
}
}
For clients that only support stdio:
{
"mcpServers": {
"n8n-mcp": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://127.0.0.1:3007/mcp",
"--header",
"Authorization: Bearer <your-local-token>"
]
}
}
}
Troubleshooting
Node.js is missing or too old:
Install Node.js LTS from https://nodejs.org, then run the installer again.
Codex or Claude Code does not show the MCP:
npx -y github:pedrogrigs/n8n-mcp-local-setup doctor
Port already in use:
npx -y github:pedrogrigs/n8n-mcp-local-setup install --port 3010
Rotate the local bearer token:
npx -y github:pedrogrigs/n8n-mcp-local-setup install --rotate-token
Project Status
This project is intentionally small: a focused installer and supervisor for local n8n-mcp.
Pull requests are welcome for:
- More MCP clients
- Better Linux desktop fallbacks
- Improved diagnostics
- Safer migration paths from existing configs
See CONTRIBUTING.md and SECURITY.md.
License
MIT
Install N8n Local Setup in Claude Desktop, Claude Code & Cursor
unyly install n8n-mcp-local-setupInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add n8n-mcp-local-setup -- npx -y github:pedrogrigs/n8n-mcp-local-setupFAQ
Is N8n Local Setup MCP free?
Yes, N8n Local Setup MCP is free — one-click install via Unyly at no cost.
Does N8n Local Setup need an API key?
No, N8n Local Setup runs without API keys or environment variables.
Is N8n Local Setup hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install N8n Local Setup in Claude Desktop, Claude Code or Cursor?
Open N8n Local Setup on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare N8n Local Setup with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
