Overseas access: www.kdjingpai.com
Bookmark Us

N8N2MCP is an open source tool designed to help users convert n8n workflows into Model Context Protocol (MCP) server. It enables users to create automated processes through n8n's visual editor and quickly deploy them as MCP servers that seamlessly integrate with AI assistants such as Claude, Cursor or Super Chain. Users can simply configure AI assistants to invoke these workflows as custom tools. n8N2MCP provides a web-based workflow management platform and an efficient MCP routing system for developers or teams that need to rapidly deploy automated tasks. The project is hosted on GitHub in an open source model that encourages users to contribute code and feedback.

 

Function List

  • Convert n8n workflows to MCP servers to support AI assistant invocations.
  • Provides a web interface for easy management, deployment and configuration of workflows.
  • Supports one-click deployment to generate locally hosted MCP servers.
  • Built-in MCP router ensures efficient server creation and request processing.
  • Supports integration with platforms such as Claude, Cursor and Super Chain.
  • Provides security management mechanisms, including credential management, API key rotation, and HTTPS support.
  • Supports Supabase database for storing user configuration and workflow data.
  • Use Playwright for n8n authentication and browser automation.

Using Help

Installation process

To use the N8N2MCP, you need to complete the installation and configuration locally or on the server. The following are the detailed steps:

  1. Cloning Codebase
    Run the following command in a terminal to clone the N8N2MCP project locally:

    git clone https://github.com/Super-Chain/N8N2MCP.git
    cd N8N2MCP
    
  2. Installation of dependencies
    Use the Python package manager to install the required dependencies for your project:

    pip install -r requirements.txt
    
  3. Install Playwright Browser
    N8N2MCP relies on Playwright for authentication and automation of n8n. Run the following command to install the browser binary:

    playwright install
    

    Note: If Playwright is not properly installed, the system will use the default credentials, resulting in limited functionality.

  4. Configuring Environment Variables
    Copy the sample environment configuration file and edit it:

    cp .env.example .env
    

    Open with a text editor .env file, fill in the following key configuration:

    • Supabase Configuration:
      SUPABASE_URL=https://your-project-id.supabase.co
      SUPABASE_KEY=your_supabase_anon_key
      SUPABASE_SERVICE_KEY=your_supabase_service_role_key
      
    • n8n Configuration:
      X_N8N_API_KEY=your_n8n_api_key
      N8N_BASE_URL=https://your-n8n-instance.com
      N8N_USERNAME=your_n8n_username
      N8N_PASSWORD=your_n8n_password
      
    • MCP router configuration:
      N8N_BUILDER_URL=http://localhost:6545
      FLASK_HOST=0.0.0.0
      FLASK_PORT=5000
      MCP_HOST=0.0.0.0
      MCP_PORT=6545
      

    Please replace with the actual configured values to ensure that the n8n instance and Supabase service are accessible.

  5. Running the MCP Router
    Start the MCP router to process the request:

    cd mcp_router
    python mcp_router.py --log-level debug
    

    Debug Mode (--log-level debug) Detailed logs can be viewed for easy troubleshooting.

  6. test item
    Test that the workflow parser and MCP router are functioning properly:

    python -m agent_marketplace.n8n_workflow_parser
    python -m mcp_router.mcp_router
    

Main Functions

1. Converting n8n workflows to MCP servers

  • Create or edit workflows in the n8n interface and design automated tasks using the visual editor.
  • The N8N2MCP can be accessed through the N8N2MCP's web interface (which by default runs on the http://localhost:5000) upload n8n workflow JSON file or template link.
  • When you click the Deploy button, the system parses the workflow and generates an MCP server. Once generated, the system returns a server URL (e.g. http://localhost:6545).
  • Paste this URL into an MCP-enabled AI assistant (such as the Claude (or Cursor) to invoke the workflow functionality.

2. Managing the MCP server

  • Visit the Agent Marketplace (web interface) to view a list of deployed MCP servers.
  • Servers can be paused, deleted, or reconfigured to support dynamic adjustment of workflow parameters.
  • Use the Supabase database to manage user configurations and data, ensuring data isolation and security.

3. Integration of AI assistants

  • Add the MCP server URL as a custom tool in Claude, Cursor, or Super Chain.
  • The AI assistant calls the server via the MCP protocol to perform tasks in the workflow, such as data processing, API calls, or automation operations.
  • Example: If the workflow includes the ability to send an email, AI Assistant can trigger the email to be sent directly.

4. Security management

  • Regularly rotate the n8n API key and Supabase key to ensure security.
  • Enable HTTPS in production environments and use SSL certificates to protect data transfers.
  • Configure a row-level security (RLS) policy to ensure user data isolation.

caveat

  • Ensure that the n8n instance is up and running and can be accessed via the N8N_BASE_URL Access.
  • The installation and configuration of Playwright is critical to n8n authentication, and failure to configure it properly may result in limited functionality.
  • Flask debug mode can be enabled for debugging:
    export FLASK_DEBUG=1
    
  • probe .env file for all configuration items to avoid deployment failures due to configuration errors.

application scenario

  1. Automated marketing tasks
    Developers can design n8n workflows to automate the delivery of marketing emails or analyze subscriber data, and once converted to an MCP server, the AI assistant can trigger personalized emails based on customer behavior.
  2. Data processing and integration
    Data analysts can use N8N2MCP to deploy complex data processing processes, such as crawling data from APIs and storing it in databases, as MCP servers for AI assistants to call to generate reports.
  3. AI Assistant Enhancement
    Claude or Cursor With the N8N2MCP, users can extend AI capabilities, such as integrating n8n workflows into the AI assistant for file management, data analysis, or code generation.
  4. Rapid Prototyping
    Startups can utilize the N8N2MCP to rapidly deploy automated prototypes, test business processes, and validate feature viability with AI assistants.

QA

  1. What AI assistants are supported by N8N2MCP?
    Currently, it supports MCP-compatible AI assistants such as Claude, Cursor and Super Chain. It may be extended to more platforms in the future.
  2. Does it require n8n expertise to use?
    A basic understanding of n8n's workflow creation is required, but N8N2MCP's web interface simplifies the deployment process without in-depth programming knowledge.
  3. How do I ensure server security?
    It is recommended to use HTTPS, rotate API keys regularly, enable RLS policies, and avoid storing user credentials on the server side.
  4. What if Playwright fails to install?
    Check network connections to ensure operation playwright install command. If this fails, try downloading the browser binary manually, or contact community support.
0Bookmarked
0kudos

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

inbox

Contact Us

Top

en_USEnglish