n8n-free-mcp
# n8n-free-mcp
**Free & open-source MCP server for [n8n](https://n8n.io).** Manage your workflows, debug executions and control your self-hosted n8n instance directly from Claude Code, Claude Desktop, Cursor, or any [Model Context Protocol](https://modelcontextprotocol.io) client.
- ð 100% free, MIT licensed â no paywalls, no telemetry
- ð Built for self-hosted / homelab n8n instances (works with n8n Cloud too)
- ð Uses n8n's official public API (`/api/v1`) with your own API key
- ðŠķ Tiny: one file, two dependencies (`@modelcontextprotocol/sdk` + `zod`)
- ð§ Context-friendly: list tools return compact summaries instead of dumping full workflow JSON
## Tools
| Tool | Description |
|---|---|
| `list_workflows` | List workflows (id, name, active, tags, node count) with filters + pagination |
| `get_workflow` | Full workflow JSON: nodes, connections, settings |
| `create_workflow` | Create a new workflow from n8n-format JSON |
| `update_workflow` | Replace a workflow (read-only fields stripped automatically) |
| `activate_workflow` / `deactivate_workflow` | Toggle a workflow's triggers |
| `delete_workflow` | Delete a workflow (irreversible â ïļ) |
| `list_executions` | List executions, filter by status (`error`/`success`/`waiting`) or workflow |
| `get_execution` | Execution detail â with `includeData=true` returns per-node I/O for debugging |
| `delete_execution` | Delete an execution record |
| `list_tags` | List instance tags |
| `check_connection` | Verify the instance is reachable and the API key works |
## Setup
### 1. Get an n8n API key
In your n8n instance: **Settings â n8n API â Create an API key**.
### 2. Install
```bash
git clone https://github.com/jserna0001/n8n-free-mcp.git
cd n8n-free-mcp
npm install
npm run build
```
### 3. Configure your MCP client
**Claude Code:**
```bash
claude mcp add --scope user n8n \
--env N8N_API_URL=https://your-n8n-instance.com \
--env N8N_API_KEY=your-api-key \
-- node /path/to/n8n-free-mcp/dist/index.js
```
**Claude Desktop / Cursor / other clients** (`claude_desktop_config.json`, `mcp.json`, etc.):
```json
{
"mcpServers": {
"n8n": {
"command": "node",
"args": ["/path/to/n8n-free-mcp/dist/index.js"],
"env": {
"N8N_API_URL": "https://your-n8n-instance.com",
"N8N_API_KEY": "your-api-key"
}
}
}
}
```
**Alternative: `.env` file.** Instead of passing env vars from the client, copy `.env.example` to `.env` in the project root and fill it in. Environment variables from the client take precedence.
### 4. Try it
Ask your assistant things like:
- *"List my n8n workflows"*
- *"Show me the failed executions of the last runs and diagnose the error"*
- *"Deactivate the workflow called X"*
- *"Duplicate this workflow but change the webhook path"*
## Notes
- The n8n public API does not expose credential *values* (by design). Credential management tools are intentionally out of scope.
- `update_workflow` performs a full replace (`PUT`), as required by the n8n API â fetch with `get_workflow`, modify, then update.
- n8n API keys are JWTs with an expiration date. If you start getting 401s, generate a new key.
## Contributing
Issues and PRs welcome. Ideas on the roadmap:
- [ ] Trigger workflows via webhook test URLs
- [ ] Variables & projects endpoints
- [ ] npm package (`npx n8n-free-mcp`)
- [ ] Docker image
## License
[MIT](LICENSE) ÂĐ Justine Serna
TDQS
Scored across 12 tools
Each tool targets a distinct operation: activation, CRUD for workflows, execution management, tag listing, and connection check. No ambiguity between tools with similar verbs (e.g., activate vs. create vs. update) due to clear resource differentiation.
All tool names follow a consistent verb_noun convention in snake_case (e.g., activate_workflow, list_executions, check_connection), making the toolset predictable and easy to navigate for an agent.
With 12 tools covering workflow CRUD, activation, execution management, tags, and connection verification, the count is well-scoped for the n8n domain. Neither too few nor excessive.
The toolset provides comprehensive lifecycle coverage for workflows and executions. A minor gap is the absence of a manual trigger/run tool, but the core operations are fully covered.