productivity
n8n MCP, CLI, and Lua Integration for AI Agents
n8n integration docs for AI agents: MCP gateway setup, n8n CLI commands, Lua API reference, credentials, and function schemas.
7 functions 6 read 1 write API key auth
n8n for agents
Credentials can be configured manually in web or CLI hosts.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Machine-Readable Metadata
- integration_slug
n8n- route_slug
n8n- package
n8n- auth_strategy
api_keyAPI key- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
true
Quick Links
Lua APIAgent-facing namespace and function reference. n8n CLIHeadless setup and direct function calls. n8n MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
n8n MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for n8n.
Claude Code n8n MCP setup for Claude Code. Cursor n8n MCP setup for Cursor. Codex n8n MCP setup for Codex. OpenAI Agents n8n MCP setup for OpenAI Agents SDK. Claude Agent SDK n8n MCP setup for Claude Agent SDK. Vercel AI SDK n8n MCP setup for Vercel AI SDK. LangChain n8n MCP setup for LangChain. LangGraph n8n MCP setup for LangGraph. CrewAI n8n MCP setup for CrewAI. MCP clients n8n MCP setup for Generic MCP Clients.
n8n CLI Matrix
Use these pages for direct n8n CLI workflows in scripts, CI, cron, and agent wrappers.
CI n8n CLI for CI. Cron Jobs n8n CLI for cron jobs. Shell Scripts n8n CLI for shell scripts. Headless Automation n8n CLI for headless automation. Coding Agents n8n CLI for coding agents.
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
n8n.n8n_list_workflows | Read read | 2 | List n8n workflows. Supports pagination with cursor and limit parameters. |
n8n.n8n_get_workflow | Read read | 1 | Get detailed information about a specific n8n workflow, including its nodes, connections, and settings. |
n8n.n8n_create_workflow | Write write | 5 | Create a new n8n workflow. Requires a name. Optionally define nodes, connections, and settings. |
n8n.n8n_list_executions | Read read | 4 | List n8n workflow executions. Supports filtering by status and workflow ID, with pagination. |
n8n.n8n_get_execution | Read read | 1 | Get detailed information about a specific n8n workflow execution, including status, data, and node results. |
n8n.n8n_list_credentials | Read read | 2 | List n8n credentials. Supports pagination with cursor and limit parameters. |
n8n.n8n_get_current_user | Read read | 0 | Get the authenticated n8n user's profile information, including name, email, and role. |