Integrations
Supports configuration through environment variables stored in .env files, allowing for flexible deployment and configuration of the MCP server.
Provides a complete implementation of n8n's Public API, enabling AI assistants to manage workflows, users, credentials, executions, tags, variables, projects, and audit functionality through natural language interactions.
Includes Swagger documentation for the RESTful API server, making the API endpoints discoverable and testable through a web interface.
n8n MCP Tools
A Model Context Protocol (MCP) server implementation for n8n API integration. This project enables seamless integration between n8n workflows and AI assistants using the MCP protocol.
Features
- Complete implementation of n8n's Public API (v1.1.1)
- MCP tools for all API endpoints
- RESTful API server with Swagger documentation
- Modular architecture for extensibility
- Authentication middleware
Structure
The project is organized into the following components:
- api/endpoints/: API endpoint implementations for each resource type
- api/schemas/: Data model schema definitions
- api/tools/: MCP tool implementations for each resource type
- api/index.js: Main server entry point
- api/config.js: Configuration settings
Getting Started
Prerequisites
- Node.js (v14 or higher)
- npm or yarn
- An n8n instance with an API key
Installation
As a package
From source
- Clone the repository:Copy
- Install dependencies:Copy
- Create a
.env
file with your configuration:Copy - Start the server:Copy
- Access the API documentation:Copy
MCP Tools
The MCP tools enable AI assistants to interact with n8n through natural language. Here are some example tools:
User Tools
get-users
: Get all users from n8n instanceget-user
: Get a specific user by ID or emailcreate-users
: Create one or more usersdelete-user
: Delete a user by ID or emailchange-user-role
: Change a user's global role
Workflow Tools
get-workflows
: Get all workflows from n8n instanceget-workflow
: Get a specific workflow by IDcreate-workflow
: Create a new workflowupdate-workflow
: Update an existing workflowdelete-workflow
: Delete a workflow by IDactivate-workflow
: Activate a workflowdeactivate-workflow
: Deactivate a workflowget-workflow-tags
: Get tags for a workflowupdate-workflow-tags
: Update tags for a workflowtransfer-workflow
: Transfer a workflow to another project
And many more tools for Credentials, Executions, Tags, Variables, Projects, and Audit functionality.
Configuration
The server can be configured using environment variables or by modifying api/config.js
:
N8N_API_BASE_URL
: Base URL for the n8n APIN8N_API_KEY
: API key for authenticationPORT
: Port to run the server onHOST
: Host to bind the server toLOG_LEVEL
: Logging level (info, error, debug)MCP_SOCKET_PATH
: Path for the MCP socket (for STDIO transport)MCP_USE_TCP
: Whether to use TCP for MCP transportMCP_TCP_PORT
: TCP port for MCP transportMCP_TCP_HOST
: TCP host for MCP transport
License
This project is licensed under the MIT License - see the LICENSE file for details.
Publishing
If you're contributing to this package and need to publish a new version:
- Update the version in package.json:Copy
- Publish to npm:Copy
- The postversion script will automatically push the new version to GitHub.
Contributing
Contributions are welcome! Please see our Contributing Guide for details.
Changelog
See the CHANGELOG.md file for details on the changes for each version.
This server cannot be installed
A Model Context Protocol server that enables AI assistants to interact with n8n workflows through natural language, providing access to n8n's complete API functionality including workflow management, user administration, and credential handling.