Provides an MCP server to manage n8n workflows via the MCP interface, including workflows, credentials, tags, variables, and executions.
Configuration
View docs{
"mcpServers": {
"get2knowio-n8n-mcp": {
"command": "n8n-mcp",
"args": [],
"env": {
"N8N_API_KEY": "YOUR_API_KEY",
"N8N_BASE_URL": "http://localhost:5678",
"N8N_PASSWORD": "test",
"N8N_USERNAME": "test"
}
}
}
}You run an MCP server that bridges n8n workflows with AI agents, giving you programmatic control to create, read, update, and manage workflows and related resources through a unified interface. This server simplifies automations, testing, and integration by exposing workflow operations, credential handling, tag and variable management, and execution data via MCP-compatible tooling.
Use an MCP client to interact with the server. You can run the MCP server locally via stdio or connect to it through a remote HTTP endpoint if provided. You will manage workflows, credentials, tags, variables, and executions, and you can drive actions with CLI commands or via MCP-enabled agents.
Key tasks you’ll perform include listing workflows, creating or updating workflows, activating or deactivating them, managing credentials and credential aliases, tagging, handling variables, pulling from source control, examining executions, and running a workflow once for testing.
Prerequisites: Node.js and npm should be available on your system. Ensure you have network access for npm packages.
# Global install option (recommended for quick start)
npm i -g @get2knowio/n8n-mcp
# Or run directly without installing
npx @get2knowio/n8n-mcpConfigure access to your n8n instance. You can authenticate with API keys or basic authentication. Use environment variables to supply credentials and the base URL of your n8n instance.
# API key authentication
export N8N_BASE_URL=http://localhost:5678
export N8N_API_KEY=your_api_key_here
# Basic authentication
export N8N_BASE_URL=http://localhost:5678
export N8N_USERNAME=your_username
export N8N_PASSWORD=your_passwordStart the MCP server in stdio mode for integration with AI agents. You can run it after installation.
# Global install path
n8n-mcp
# Or using npx without installation
npx @get2knowio/n8n-mcpIf you prefer the CLI, you can list, get, create, and manage resources directly from the command line. All CLI output is structured JSON by default.
n8n-mcp list
n8n-mcp get 1
n8n-mcp create path/to/workflow.json
n8n-mcp activate 1For traceable errors and easier troubleshooting, enable debug logging and optional source maps when developing or debugging.
MCP_DEBUG=debug MCP_ENABLE_SOURCE_MAPS=1 npm start 2>server.logCreate a new workflow that uses a webhook, then test the deployment by running the workflow manually or triggering it via the webhook.
List all workflows available in the connected n8n instance.
Retrieve a single workflow by its ID.
Create a new workflow with nodes and connections.
Update an existing workflow, with optional optimistic concurrency.
Delete a workflow by its ID.
Activate a workflow to enable automatic running.
Deactivate a workflow to stop automatic running.
List all credentials available in the n8n instance.
Resolve a credential alias to its actual credential ID.
Pull changes from source control to synchronize workflows.
Fetch the JSON schema for a credential type.
List tags associated with a specific workflow.
Assign tags to a workflow by name or ID.
Transfer a workflow to a different project or owner (enterprise feature).
Transfer a credential to a different project or owner (enterprise feature).
List workflow executions with pagination support.
Get details for a specific execution by ID.
Delete an execution record.
Get webhook URLs for a webhook node in a workflow.
Execute a workflow once for testing or manual runs.
List all key-value variables with pagination.
Create a new variable, enforcing unique keys.
Update an existing variable value.
Delete a variable by ID.
List all tags with optional pagination.
Get a tag by ID.
Create a new tag with a name and optional color.
Update an existing tag's name or color.
Delete a tag by ID.