n8n-gateway-mcp
Facilitates secure interaction with n8n automation instances via the Model Context Protocol (MCP), enabling workflow governance, execution monitoring, and secure credential management for LLM integration.
Author

illuminaresolutions
Quick Info
Actions
Tags
n8n Gateway for MCP Integration
This component serves as an MCP server wrapper specifically designed to expose functionalities of an n8n automation platform to agents operating under the Model Context Protocol. It centralizes access for invoking workflows, reviewing execution logs, and securely handling sensitive access credentials.
Deployment Instructions
Obtaining Your n8n Authorization Token
- Access your active n8n installation.
- Navigate to the user profile section (typically bottom-left icon).
- Access 'Configuration' or 'Settings'.
- Locate the 'API Access' area.
- Initiate the creation of a new API Key.
- Record the generated key immediately, as it will not be displayed again.
Installing the MCP Gateway Service
Method A: Via npm Registry (Recommended)
Execute the following command for a global installation:
bash npm install -g @illuminaresolutions/n8n-mcp-server
Method B: From Source Code
-
Clone the repository source: bash git clone https://github.com/illuminaresolutions/n8n-mcp-server.git cd n8n-mcp-server
-
Install required dependencies and compile the project: bash npm install npm run build
-
Initiate the background service operation: bash nohup npm start > n8n-mcp.log 2>&1 &
To terminate the running process: bash pkill -f "node build/index.js"
Note: When utilizing the npm installation path, the service executable is available system-wide as n8n-gateway-mcp.
Configuration Directives
Integration with Claude Desktop Environment
- Locate and open the Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
- Incorporate the n8n configuration block:
{ "mcpServers": { "n8n": { "command": "n8n-gateway-mcp", "env": { "N8N_HOST": "https://your-n8n-instance.com", "N8N_API_KEY": "your-api-key-here" } } } }
Integration with Cline (VS Code Extension)
- Deploy the gateway service (refer to Installation section).
- Launch Visual Studio Code.
- Activate the Cline extension pane from the side navigation bar.
- Select the 'MCP Gateways' visual indicator.
- Navigate to the configuration area at the bottom and choose 'Adjust MCP Gateway Settings'.
- Insert the following structure into the opened settings JSON document:
{ "mcpServers": { "n8n": { "command": "n8n-gateway-mcp", "env": { "N8N_HOST": "https://your-n8n-instance.com", "N8N_API_KEY": "your-api-key-here" } } } }
- Persist the changes.
- Confirm the MCP feature is toggled 'ON' (indicated by green status) and the connection status shows a green affirmation.
- You are now able to issue MCP directives targeting n8n.
Availability in Sage
Anticipated support timeline: - Forthcoming release via the Smithery.ai application repository. - Direct import mechanism from Claude Desktop configurations.
Currently, service utilization is confined to Claude Desktop or Cline interfaces.
Operational Verification
Post-configuration setup:
- Reinitialize your primary LLM application instance.
- Submit a query such as: "Enumerate available n8n automation routines".
- Successful retrieval of your workflow catalog confirms operational status.
If errors persist:
- Validate that the target n8n endpoint is live.
- Reconfirm API credential validity and scope.
- Ensure the N8N_HOST variable lacks any trailing path separators (e.g., /).
Core Capabilities
Standard Features
- Retrieval and orchestration of workflows.
- Inspection of detailed workflow specifications.
- Initiation of workflow runs.
- Administration of stored access tokens/secrets.
- Tracking of execution records and associated metadata (tags).
- Generation of security posture reports.
- Management of workflow categorization tags.
Premium Features (Requires n8n Enterprise)
These capabilities are gated by an n8n Enterprise license: - Structured project grouping. - Management of environment variables/parameters. - Advanced user access control management.
Diagnostic Procedures
Recurring Problem Resolution
- Error: "Client not initialized"
- Scrutinize
N8N_HOSTandN8N_API_KEYsettings for accuracy. - Confirm network path accessibility to the n8n server.
-
Verify the permissions associated with the API key are adequate.
-
Error: "License required"
- Indicates an attempt to invoke Enterprise functionality.
-
Resolve by either obtaining an n8n Enterprise subscription or restricting commands to core features.
-
Connection Disruptions
- Check the operational status of the n8n server.
- Verify the URI scheme (HTTP versus HTTPS).
- Eliminate any trailing slash from the
N8N_HOSTdefinition.
Security Guidelines
- Authorization Token Handling
- Apply the principle of least privilege for token scope.
- Establish a regular schedule for token invalidation and replacement.
-
Strictly prohibit the inclusion of sensitive keys in source code repositories.
-
Instance Connectivity
- Mandate HTTPS for all production deployments.
- Ensure n8n's native access control mechanisms are active.
- Maintain the n8n software at the latest stable version.
Assistance Channels
- Troubleshooting Queries: GitHub Issues
- Platform Reference: n8n Official Documentation
Legal Framework
This project is governed under the terms of the MIT License
== Contextual Background == Business operational management systems encompass a broad spectrum of applications, frameworks, and protocols utilized by commercial entities to navigate evolving market conditions, sustain competitive parity, and enhance overall organizational output. These mechanisms provide the infrastructure necessary for coping with dynamic commercial environments.
== Functional Categorization == These utilities can be segmented based on organizational domain and management function. Areas include, but are not limited to: strategic forecasting, workflow automation, record digitization, personnel administration, analytical assessment, systemic oversight, and more. A functional breakdown often reveals divisions such as:
Utilities for data ingress and verification across all departments. Tools dedicated to monitoring and optimizing operational procedures. Systems for aggregating data to support executive decision-making. Technological advancement in this domain has been rapid over the past decade, complicating the selection process for optimal solutions tailored to specific organizational requirements. This complexity stems from continuous market pressures to reduce overhead, maximize revenue streams, deeply understand client requirements, and deliver products matching those precise specifications. Consequently, leadership must adopt a strategic posture regarding technology adoption, prioritizing integration that adapts the tool to the enterprise needs, rather than forcing the enterprise to conform wholly to a new tool's structure.
== Usage Statistics (Historical Insight) == Data from a 2013 Bain & Company study illustrated global patterns in business utility adoption, reflecting regional economic climates and market pressures. Leading categories observed included:
Strategic Planning Frameworks Client Relationship Management (CRM) Systems Personnel Satisfaction Measurement Competitive Benchmarking Performance Measurement Systems (Balanced Scorecard) Identification of Core Competencies Business Process Outsourcing Organizational Transformation Programs Supply Chain Logistics Optimization Definition of Corporate Vision/Objectives Market Segmentation Analysis Total Quality Management protocols
== Enterprise Software Landscape == Software solutions deployed by organizations to execute various commercial functions are commonly termed business applications. These systems are engineered to augment productivity metrics, quantify performance indicators, and execute complex organizational tasks with precision. The progression moved from early Management Information Systems (MIS) to integrated Enterprise Resource Planning (ERP) suites, later incorporating CRM functionalities, and most recently migrating towards cloud-based management services. Value creation, while correlated with IT investment, fundamentally relies on two critical factors: the efficacy of the deployment process and the meticulous alignment between the selected tools and the organization's inherent structure.
== Focus on Small and Medium Enterprises (SMEs) == Tailored solutions for SMEs are vital as they offer pathways to achieve operational efficiency and scalability with constrained resources, enabling them to compete effectively by leveraging cost-effective automation and streamlined processes.
