Provides comprehensive workflow management capabilities for n8n instances, including creating, updating, deleting, and executing workflows, managing workflow activation states, and retrieving webhook URLs for integration with external systems.
n8n-mcp
An MCP (Model Context Protocol) server for managing n8n workflows. This server allows AI agents to create, retrieve, update, and manage n8n workflows through the n8n API.
Features
- List Workflows: Get all workflows from your n8n instance
- Get Workflow: Retrieve a specific workflow by ID
- Create Workflow: Create new workflows with nodes and connections
- Update Workflow: Modify existing workflows
- Delete Workflow: Remove workflows
- Activate/Deactivate: Control workflow execution state
Installation
From GitHub Packages
From Source
Configuration
Set the following environment variables:
Option 1: API Key Authentication
Option 2: Basic Authentication
Usage
As an MCP Server
The server runs on stdio and implements the MCP protocol for integration with AI agents.
As a CLI Tool
For testing and development, you can use the CLI interface:
Available Tools
- list_workflows - List all workflows
- get_workflow - Get workflow by ID
- create_workflow - Create a new workflow
- update_workflow - Update existing workflow
- delete_workflow - Delete a workflow
- activate_workflow - Activate a workflow
- deactivate_workflow - Deactivate a workflow
- webhook_urls - Get webhook URLs for a webhook node
- run_once - Execute a workflow manually once
Example Workflow Creation
Webhook URLs
The webhook_urls
tool helps you get the correct webhook URLs for webhook nodes in your workflows. This is useful for:
- Getting URLs to configure external systems that need to call your webhooks
- Testing webhook endpoints during development
- Documentation and integration guides
Prerequisites for Webhook Nodes
For the webhook_urls
tool to work correctly, your webhook node must:
- Be of type
n8n-nodes-base.webhook
- Have a
path
parameter configured - Be part of an existing workflow
URL Format
The tool returns URLs in n8n's standard format:
- Test URL:
${baseUrl}/webhook-test/${path}
- Used for testing during workflow development - Production URL:
${baseUrl}/webhook/${path}
- Used when the workflow is active
Example Usage
Manual Workflow Execution
The run_once
tool allows you to manually execute workflows, which is useful for:
- Testing workflows during development
- Triggering workflows programmatically
- Running workflows with specific input data
- Debugging workflow issues
Workflow Types
The tool handles different workflow types gracefully:
- Manual Workflows: Workflows that start with manual triggers (e.g., Start node)
- Trigger Workflows: Workflows with automatic triggers (e.g., Webhook, Cron, etc.)
Input Data
You can optionally provide input data when executing a workflow:
Response Format
The tool returns execution details:
Development
Setup
Testing
Scripts
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
All contributions are welcome! Please make sure to update tests as appropriate and follow the existing code style.
Releases
This project uses automated releases. When a new release is published on GitHub:
- The release workflow automatically triggers
- The package is built and tested
- If all tests pass, the package is published to GitHub Packages
- The package can then be installed using:
npm install @get2knowio/n8n-mcp
To create a new release:
- Update the version in
package.json
- Create a new release on GitHub with a tag matching the version
- The automated workflow will handle the rest
License
MIT
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables AI agents to create, retrieve, update, and manage n8n workflows through the n8n API. Supports full workflow lifecycle management including activation, deactivation, and deletion operations.