Logotipo de N8N2MCP

N8N2MCP

Organización
Super-Chain

Convert N8N agent / workflow into MCP servers, you can use it in Claude / Cursor / Super Chain

EditorSuper-Chain
RepositorioN8N2MCP
IdiomaHTML
Forks
36
Estrellas
132
Herramientas disponibles
0
Tipo de transportestdio
LicenciaMIT
Enlaces
  • Conecta herramientas a flujos de trabajo con IA

    N8N2MCP ofrece funciones MCP que pueden usar los clientes y agentes de IA compatibles.

  • 0 herramientas disponibles

    Explora a continuación las acciones que se pueden invocar, con sus nombres y descripciones cuando el servidor los proporcione.

  • Configuración lista para copiar

    Usa los ejemplos de instalación para configurar este servidor en tu cliente MCP preferido.

  • Indicadores de interés en el código abierto

    132 estrellas y 36 forks en el repositorio enlazado.

Transform your N8N workflows into MCP servers instantly

A comprehensive platform that converts N8N workflows into Model Context Protocol (MCP) servers, enabling seamless integration with AI assistants like Claude, Cursor, and other MCP-compatible platforms. Build powerful automation tools using N8N's visual workflow editor and deploy them as callable AI functions. Demo

✨ How to use

  1. Copy the N8N template link/JSON from any workflow

  2. Map your credentials through our intuitive interface

  3. Deploy with one click!

Your N8N workflow gets deployed and creates a local hosted MCP server. Just paste the server URL into Claude, Cursor, Super Chain, or any MCP-compatible platform!

🎯 Key Features

🤖 MCP Server Creation

Convert your N8N workflows into MCP servers that AI assistants can use as custom tools

🔄 Dual Architecture

  • Agent Marketplace: Web-based workflow management and deployment platform
  • MCP Router: High-performance MCP server creation and routing system

🛠️ Comprehensive Workflow Management

  • Browse and deploy pre-built workflow templates
  • Upload and manage your custom N8N workflows
  • Real-time credential configuration and testing
  • One-click deployment to your N8N instance

🏗️ Architecture

📦 Installation

Prerequisites

  • Python 3.11+
  • N8N Instance (cloud.n8n.io or self-hosted)
  • Supabase Account (for data storage)
  • Playwright (required for N8N authentication)
  • Docker (optional, for containerized deployment)

⚠️ Important: Playwright installation is required for N8N workflow execution. The system will use dummy credentials if Playwright is not properly installed, limiting functionality.

Quick Start

Option 1: Docker Compose (Recommended)

  1. Clone the repository

    bash
    git clone https://github.com/Super-Chain/N8N2MCP.git
    cd N8N2MCP
  2. Configure environment

    bash
    cp env.example .env
    # Edit .env with your actual configuration values
  3. Start with Docker Compose

    bash
    docker-compose up -d

    This starts:

  4. View logs

    bash
    docker-compose logs -f

Option 2: Manual Installation

  1. Clone the repository

    bash
    git clone https://github.com/Super-Chain/N8N2MCP.git
    cd N8N2MCP
  2. Install dependencies

    bash
    pip install -r requirements.txt
  3. Install Playwright browsers (Required)

    bash
    playwright install
    # This downloads the necessary browser binaries for N8N authentication
  4. Configure environment

    bash
    # Copy and edit the .env file (see Environment Configuration section)
    cp .env.example .env
    # 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
    
    # Server Configuration
    FLASK_HOST=0.0.0.0
    FLASK_PORT=5000
    MCP_HOST=0.0.0.0
    MCP_PORT=6545
    
    # Optional: Authentication credentials (auto-populated)
    N8N_AUTH=
    N8N_BROWSER_ID=   
  5. Start both servers

    bash
    python main.py

    This starts:

  6. Access to UI Front end : http://localhost:5000

Configuration Notes:

  • SUPABASE_URL: Your Supabase project URL
  • SUPABASE_KEY: Anon key for client-side operations
  • SUPABASE_SERVICE_KEY: Service role key for admin operations
  • N8N_BASE_URL: Your N8N instance URL (must include https://)
  • N8N_BUILDER_URL: Must include http:// protocol

🔧 Usage

Creating MCP Servers from N8N Workflows

Method 1: Import N8N Templates

  1. Browse Templates: Visit the N8N template
  2. Import Template: Enter an N8N template URL from n8n.io
  3. Configure Credentials: Fill in required API keys and service credentials
  4. Deploy Workflow: Click deploy to create the workflow in your N8N instance
  5. MCP Server Created: Automatically generates an MCP server endpoint

Method 2: Upload Custom Workflows

  1. Upload JSON: Upload your N8N workflow JSON file / Copy and paste your JSON workflow
  2. Review Analysis: Check detected nodes and required credentials
  3. Configure & Deploy: Fill credentials and deploy to N8N
  4. Access MCP Server: Use the generated MCP endpoint in AI tools

Using MCP Servers

bash
# Example MCP server URL format:
http://localhost:6545/mcp/{workflow_id}/{api_key}

# Test MCP server:
curl http://localhost:6545/list  # List all registered MCP servers

🎨 Use Cases

🔍 Data Processing & Analysis

  • Transform CSV/Excel files using N8N's data manipulation nodes
  • Connect to databases and APIs for real-time data analysis
  • Generate reports and visualizations from AI conversations

🌐 API Integration Hub

  • Connect AI assistants to external services (Slack, Google, etc.)
  • Create custom API endpoints for proprietary systems
  • Build unified interfaces for multiple SaaS platforms

📧 Communication & Notifications

  • Send emails, Slack messages, or Discord notifications
  • Create automated reporting systems
  • Build alert systems triggered by AI interactions

🔄 Workflow Automation

  • Trigger complex business processes from AI conversations
  • Create approval workflows and task management systems
  • Build custom integrations with enterprise systems

🛠️ Development

Project Structure

N8N2MCP/
├── main.py                        # Unified server startup script
├── requirements.txt               # Consolidated Python dependencies
├── .env                          # Environment configuration (shared)
│
├── agent_marketplace/             # Flask web application
│   ├── app.py                    # Main Flask app with API endpoints
│   ├── database.py               # Supabase integration & data models
│   ├── n8n_workflow_parser.py    # Workflow analysis engine
│   ├── setup_supabase.py         # Database setup utilities
│   ├── templates/                # HTML templates
│   │   ├── workflows.html        # Main marketplace interface
│   │   └── static/               # CSS, JS assets
│   └── __init__.py               # Python package marker
│
├── mcp_router/                   # FastAPI MCP service
│   ├── mcp_router.py             # Main FastAPI application
│   ├── n8n_credential_extractor.py # N8N authentication
│   ├── credential_helper.py       # Credential management utilities
│   └── __init__.py               # Python package marker
│
└── README.md                     # This documentation

Database Setup

The system uses 2 main tables in Supabase:

Setup

  1. Create Supabase Project: Set up a new project at supabase.com
  2. Run SQL in Supabase SQL Editor:
sql
-- Main workflow storage table
CREATE TABLE IF NOT EXISTS public.user_workflows (
    id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
    user_id TEXT NOT NULL,
    template_id TEXT NOT NULL,
    template_url TEXT NOT NULL,
    workflow_name TEXT NOT NULL,
    workflow_json JSONB NOT NULL,
    workflow_description TEXT,
    n8n_workflow_id TEXT,
    source TEXT DEFAULT 'user_upload',
    credentials_required JSONB DEFAULT '[]'::jsonb,
    mcp_link TEXT,
    status TEXT DEFAULT 'pending',
    created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
    updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);

-- MCP server configurations
CREATE TABLE IF NOT EXISTS public.mcp_configs (
    id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
    workflow_id TEXT NOT NULL,
    user_apikey TEXT NOT NULL,
    code TEXT NOT NULL,
    created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
    updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
    UNIQUE(workflow_id, user_apikey)
);

-- Enable Row Level Security (recommended)
ALTER TABLE user_workflows ENABLE ROW LEVEL SECURITY;
ALTER TABLE mcp_configs ENABLE ROW LEVEL SECURITY;

🚀 Running the System

Unified Startup (Recommended)

bash
python main.py

This automatically starts both services with:

  • ✅ Environment validation
  • ✅ Database setup verification
  • ✅ Graceful shutdown handling
  • ✅ Centralized logging

Individual Services

Agent Marketplace (Port 5000)

bash
cd agent_marketplace
python app.py

MCP Router (Port 6545)

bash
cd mcp_router
python mcp_router.py

Verification

bash
# Test Agent Marketplace
curl http://localhost:5000/api/health

# Test MCP Router
curl http://localhost:6545/list

# View all endpoints
curl http://localhost:5000/api/health | grep endpoints

🔧 Troubleshooting

Common Issues

Port Already in Use

bash
# Kill processes on ports 5000 and 6545
fuser -k 5000/tcp 6545/tcp
# Or restart with main.py which handles this automatically
python main.py

Database Connection Issues

bash
# Verify Supabase configuration
python -c "from agent_marketplace.database import db_manager; print('✅ Database OK' if db_manager.supabase else '❌ Database connection failed')"

# Reset database tables
python agent_marketplace/setup_supabase.py

MCP Router Not Responding

bash
# Check if MCP Router is running
curl http://localhost:6545/list

# View MCP Router logs
# Logs appear in terminal where main.py was started

N8N Workflow Creation Fails

  • Verify N8N_BASE_URL includes https://
  • Check X_N8N_API_KEY is valid and has workflow creation permissions
  • Ensure N8N instance is accessible from your server

Missing Dependencies

bash
# Install missing packages
pip install playwright
playwright install  # For N8N authentication (required)

# Or install all dependencies
pip install -r requirements.txt

Playwright Browser Issues

bash
# If playwright browsers fail to download
playwright install --force

# For headless environments (servers)
playwright install chromium

# Check if playwright is working
python -c "from playwright.async_api import async_playwright; print('✅ Playwright OK')"

Development Tips

bash
# Enable debug mode for Flask
export FLASK_DEBUG=1

# View detailed MCP Router logs
cd mcp_router && python mcp_router.py --log-level debug

# Test individual components
python -m agent_marketplace.n8n_workflow_parser  # Test parser
python -m mcp_router.mcp_router                  # Test MCP Router

🔐 Security Best Practices

  • Credential Management: Never store user credentials server-side
  • API Key Rotation: Regularly rotate N8N API keys and Supabase keys
  • Network Security: Use HTTPS in production with proper SSL certificates
  • Access Control: Implement proper authentication and authorization
  • Data Isolation: Ensure proper user data segregation with RLS policies

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📋 Quick Reference

API Endpoints

Agent Marketplace (Port 5000)

  • GET / - Main marketplace interface
  • GET /api/health - Health check and available endpoints
  • POST /api/import-n8n-template-enhanced - Import N8N template
  • POST /api/deploy-workflow-to-n8n - Deploy workflow with credentials
  • GET /api/user/uploaded-workflows - List user workflows
  • GET /api/user/mcp-servers - List active MCP servers

MCP Router (Port 6545)

  • GET /list - List all registered MCP servers
  • POST /n8n/build - Create MCP server from N8N workflow
  • GET /n8n/credentials/status - Check N8N credential status
  • /mcp/{workflow_id}/{api_key} - MCP server endpoint

Key File Locations

  • Configuration: .env (root directory)
  • Main Startup: main.py
  • Flask App: agent_marketplace/app.py
  • MCP Router: mcp_router/mcp_router.py

🆘 Support

  • Issues: GitHub Issues
  • Documentation: Check this README and inline code documentation
  • Community: Join our community discussions for help and feature requests

🙏 Acknowledgments


Star History

Star History Chart

Built with ❤️ by the SUPERCHAIN team for the AI automation community

Usa el MCP de N8N2MCP con varios modelos de IA

TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que, una vez conectado N8N2MCP, puedes usarlo con distintos modelos de IA en TypingMind sin tener que configurarlo por separado para cada modelo. Esta integración MCP se ejecuta localmente en tu dispositivo a través del conector MCP de TypingMind.

Guía de configuración para usar el conector local

Usa esta opción si el servidor MCP necesita acceder a archivos locales, aplicaciones o recursos privados de tu ordenador.

1

Abre los ajustes de MCP

En TypingMind, ve a Ajustes, luego a Ajustes avanzados y a Model Context Protocol, y elige Configurar conector.

  1. Abre TypingMind en tu navegador.
  2. Haz clic en el icono de Ajustes.
  3. Ve a Ajustes avanzados.
  4. Abre la sección Model Context Protocol.
  5. Haz clic en Configurar conector y elige Este dispositivo.
Pantalla de configuración del conector MCP de TypingMind con «Este dispositivo» seleccionado
2

Ejecuta el comando del conector

Elige Este dispositivo, copia el comando de TypingMind y ejecútalo en Terminal. Mantén el proceso en ejecución mientras uses MCP.

  1. Copia el comando de configuración que muestra TypingMind.
  2. Abre Terminal en macOS o Windows Terminal en Windows.
  3. Pega y ejecuta el comando.
  4. Acepta la instalación del paquete si Terminal te pide confirmación para continuar.
  5. Mantén el proceso en ejecución en la ventana de Terminal mientras uses las herramientas MCP.
3

Añade N8N2MCP como servidor

Cuando el estado del conector sea «Listo», haz clic en «Edita servidores» y pega la configuración del servidor MCP.

  1. Espera hasta que el estado del conector indique «Listo».
  2. Haz clic en Edita servidores.
  3. Pega la configuración del servidor MCP de N8N2MCP.
  4. Guarda la lista de servidores.
  5. Actualiza para comprobar que el conector sigue listo.
Ajustes de MCP de TypingMind con un servidor activo y el botón «Edita servidores»
{
  "mcpServers": {
    "n8n2mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Úsala con distintos modelos

Guarda la lista de servidores, abre Plugins, activa las herramientas MCP de N8N2MCP y selecciona cualquier modelo de IA compatible en TypingMind para usar las herramientas en el chat o asignárselas a un agente de IA.

  1. Abre la página Plugins en TypingMind.
  2. Activa las herramientas MCP de N8N2MCP.
  3. Inicia un chat y elige el modelo de IA que quieras usar.
  4. Usa las herramientas MCP en el chat o asígnalas a un agente de IA.
  5. Cambia a otro modelo de IA cuando lo necesites sin volver a conectar MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar N8N2MCP para ayudarme con esta tarea?
N8N2MCP
Claro. Lo he leído.
Esto he encontrado usando N8N2MCP.

Preguntas frecuentes

¿Para qué sirve el servidor MCP N8N2MCP?

N8N2MCP es un servidor MCP que permite a los clientes de IA compatibles conectarse a herramientas y contexto externos. En TypingMind, basta con añadir este servidor MCP una vez para que sus herramientas estén disponibles en tu espacio de trabajo de IA.

¿Puedo usar el servidor MCP N8N2MCP con varios modelos de IA en TypingMind?

Sí. TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que puedes usar N8N2MCP con distintos modelos de IA, como Claude, ChatGPT, Gemini u otros que hayas configurado en TypingMind, sin configurar el servidor MCP por separado para cada modelo.

¿Por qué usar el conector MCP de N8N2MCP con TypingMind?

TypingMind es una de las mejores interfaces de chat con LLM porque reúne varios modelos de IA, prompts, plugins, agentes de IA, claves de API y herramientas MCP en un solo espacio de trabajo. Con N8N2MCP conectado, puedes usar sus herramientas MCP con tus modelos preferidos y mantener organizado tu flujo de trabajo de chat en TypingMind.

¿Cómo conecto el servidor MCP N8N2MCP a TypingMind?

N8N2MCP funciona a través del conector MCP local de TypingMind. Es la mejor opción cuando el servidor MCP necesita acceder a archivos locales, aplicaciones de escritorio, herramientas de línea de comandos o recursos privados de tu ordenador.

¿Qué herramientas ofrece el servidor MCP N8N2MCP en TypingMind?

N8N2MCP ofrece funciones MCP que puedes activar desde la página Plugins de TypingMind y usar en el chat o asignar a agentes de IA.

¿Tengo que compartir mis claves de API con TypingMind para usar el servidor MCP N8N2MCP?

No. TypingMind prioriza el funcionamiento local y te permite mantener el control de tus proveedores de modelos, claves de API, prompts y configuración MCP. Si N8N2MCP requiere autenticación, añade las cabeceras, los ajustes de OAuth o la configuración local necesarios para ese servidor MCP al crear la conexión.

Servidores MCP relacionados

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇