n8n CLI Toolkit.
Full command-line control of your n8n instance, for you and your agents. Create, edit, debug, and monitor workflows without clicking through the UI. 80+ commands, a built-in catalog of 543 nodes you can search and inspect, multi-instance profiles, and zero external dependencies. Python stdlib only.
- n8n that you can grep and script list, diff, and bulk-activate workflows from the terminal instead of clicking through the editor.
- An agent that debugs your runs ask Claude which workflows failed in the last day and why, and it pulls the executions and groups the errors.
- One toolkit, every instance named profiles switch between n8n Cloud and self-hosted with a flag, so your environments stay separate.
Connect it with Claude.
Paste this into Claude Code. Claude reads the local blueprint, installs the CLI, and walks you through pointing it at your n8n instance, then confirms the connection before doing anything else.
How this fits in the OS.
Python, an n8n instance (Cloud or self-hosted), an n8n API key, and the blueprints/n8n-cli-toolkit/ files in your local workshop repo.
A zero-dependency Python CLI, n8n-cli, that talks to the n8n REST API. This is a CLI path, not an MCP path. The agent calls it through Bash.
Your agent can create workflows from a description, debug failed executions, audit credentials, and back up an instance, all from the terminal.
What changes for you.
n8n's visual editor is great for building, but slow for managing at scale. When you have dozens of workflows, you want to treat them like code.
- You stop hunting through tabs. Grep your workflows, diff them, and bulk-activate them from one place.
- Your agent debugs for you. "Which workflows failed in the last 24 hours?" returns grouped errors and likely causes.
- Your environments stay separate. Named profiles keep Cloud and self-hosted instances from getting crossed.
Before you start.
Three things specific to this build
- An n8n instance you can reach, either n8n Cloud or a self-hosted instance.
- Python 3.9 or newer. The toolkit has zero external dependencies, just stdlib.
- 1Password or Infisical ready for your n8n API key. You will never paste it into Claude chat.
The CLI is Python stdlib only. No requests, no click, no rich. That keeps it portable and easy for an agent to call from Bash on any machine.
The build.
Four checkpoints. It is plug and play. The agent runs the commands, but you create the API key and type it in yourself.
Get your n8n API key
2 minIn your n8n instance, create an API key and note your instance URL:
Settings, then n8n API, then Create an API key. Copy the key and your instance URL, for example https://yourname.app.n8n.cloud.
Install the CLI
1 minLet Claude install the toolkit:
Read blueprints/n8n-cli-toolkit/ and install the n8n-cli for me. It is Python stdlib only, so there are no extra dependencies to manage.
Configure a profile
2 minPoint the CLI at your instance with a named profile:
n8n-cli config set-profile main --url YOUR_INSTANCE_URL --key YOUR_API_KEY --default
Confirm the connection
2 minCheck the connection, then do one safe read:
n8n-cli health
Then ask Claude: "List my workflows and tell me which ones failed in the last 24 hours."
When it works.
You know the connection is real when four things happen in order:
n8n-cli healthreports your instance. Health and active workflow count come back.- A list command returns your workflows. The CLI can read your instance.
- The node catalog searches. You can inspect any of the 543 nodes without opening a browser.
- Claude can act on a plain-English request. "Create a workflow that posts new Typeform responses to Slack" turns into a real workflow.
If you get stuck.
Common failure modes, ranked by how often they waste time:
- Health check fails with an auth error. Recheck the API key and instance URL in your profile.
- Wrong instance. If you manage more than one, confirm you are using the right
--profile. - Self-hosted URL refused. Make sure the instance is reachable from your machine and the API is enabled.
- Key in git. Stop. Move it to 1Password/Infisical or an env var, then re-run
git status --short.
Where to go next.
Once n8n is connected, these are the natural next moves.