Skip to main content
Glama

n8n-MCP (Fork de Producción)

License: MIT n8n version Docker

Servidor MCP (Model Context Protocol) para n8n — fork de czlonkowski/n8n-mcp con modificaciones para despliegue en producción sobre Contabo VPS.

Este servidor actúa como puente entre n8n y asistentes de IA (Claude, Hermes Agent, etc.), proporcionando acceso estructurado a la documentación de nodos, propiedades, operaciones y plantillas de n8n.


📋 Tabla de Contenidos


Related MCP server: n8n-MCP

Características

  • 🔌 Servidor MCP completo — expone herramientas para buscar, validar y gestionar workflows de n8n

  • 📚 Documentación de nodos — acceso a 1,845+ nodos (816 core + 1,029 community)

  • 🐳 Dockerizado — despliegue con un solo comando usando Docker Compose

  • 🔐 Autenticación por token — protegido con AUTH_TOKEN

  • 🌐 Modo HTTP — compatible con cualquier cliente MCP que soporte SSE (Server-Sent Events)

  • 🏗️ Multi-tenant opcional — soporte para múltiples instancias n8n

  • 📊 Telemetría anónima desactivada por defecto en este fork


Requisitos

  • Docker y Docker Compose instalados

  • Una instancia de n8n corriendo (local o remota)

  • (Opcional) API Key de n8n para herramientas de gestión de workflows


Despliegue con Docker Compose

1. Clonar el repositorio

git clone <url-de-este-repo> n8n-mcp
cd n8n-mcp

2. Configurar variables de entorno

Copia el archivo de ejemplo y edita las variables:

cp .env.example .env

Edita .env con tus valores reales. Las variables mínimas requeridas son:

AUTH_TOKEN=*** 3. Construir y levantar

```bash
docker compose up -d --build

El servidor estará disponible en http://localhost:3001 (mapeado a 127.0.0.1:3001 por seguridad).

4. Verificar el despliegue

curl http://localhost:3001/health
# Respuesta esperada: {"status":"ok"}

Red Docker

El servicio se conecta a la red baota_net (externa), que debe existir previamente. Esta es la misma red donde corre n8n, permitiendo comunicación interna via http://n8n:5678.

Si tu configuración de red es diferente, edita la sección networks en docker-compose.yml.


Variables de Entorno

Configuración General

Variable

Descripción

Valor por Defecto

MCP_MODE

Modo del servidor (stdio o http)

http

PORT

Puerto HTTP

3001

HOST

Host de escucha

0.0.0.0

NODE_ENV

Entorno (development / production)

production

LOG_LEVEL

Nivel de logging

info

NODE_DB_PATH

Ruta a la base de datos SQLite

/app/data/nodes.db

REBUILD_ON_START

Reconstruir BD al iniciar

false

Autenticación y Seguridad

Variable

Descripción

Requerido

AUTH_TOKEN

Token de autenticación para HTTP

Sí

BASE_URL

URL pública del servidor

No

WEBHOOK_SECURITY_MODE

Modo de protección SSRF (strict / moderate / permissive)

permissive

TRUST_PROXY

Confiar en proxy inverso (0 o 1)

0

Conexión a n8n

Variable

Descripción

Requerido

N8N_API_URL

URL de la instancia n8n (sin /api/v1)

Sí

N8N_API_KEY

API Key de n8n

Sí

N8N_API_TIMEOUT

Timeout de requests (ms)

30000

N8N_API_MAX_RETRIES

Reintentos máximos

3

Telemetría

Variable

Descripción

Valor por Defecto

N8N_MCP_TELEMETRY_DISABLED

Desactivar telemetría

true

Multi-Tenant (Opcional)

Variable

Descripción

Valor por Defecto

ENABLE_MULTI_TENANT

Activar modo multi-tenant

false

MULTI_TENANT_SESSION_STRATEGY

Estrategia de sesiones (instance / shared)

instance


Conexión a la Instancia n8n

1. Obtener API Key de n8n

  1. Ve a tu instancia n8n → Settings → API

  2. Crea una nueva API Key

  3. Copia la key generada

2. Configurar en .env

N8N_API_URL=http://n8n:5678
N8N_API_KEY=*** **Nota:** Si n8n corre en el mismo Docker network (`baota_net`), usa el nombre del contenedor (`n8n`) como hostname. Si está en otro servidor, usa la URL completa.

### 3. Verificar conectividad

```bash
curl -H "Authorization: Bearer *** http://localhost:3001/health

Conexión a Hermes Agent Gateway

Para conectar este servidor MCP a Hermes Agent (by Nous Research):

1. Asegurar que el servidor está corriendo

docker compose ps
# n8n-mcp debe estar "Up"

2. Configurar en Hermes Agent

En la configuración de Hermes Agent, agrega un nuevo servidor MCP:

{
  "mcpServers": {
    "n8n-mcp": {
      "type": "http",
      "url": "https://tu-dominio.com/mcp",
      "headers": {
        "Authorization": "Bearer <AUTH_TOKEN>"
      }
    }
  }
}

O si estás en la misma red local:

{
  "mcpServers": {
    "n8n-mcp": {
      "type": "http",
      "url": "http://localhost:3001/mcp",
      "headers": {
        "Authorization": "Bearer <AUTH_TOKEN>"
      }
    }
  }
}

3. Verificar la conexión

Hermes Agent debería detectar automáticamente las herramientas disponibles. Puedes verificar preguntando:

"¿Qué herramientas de n8n tienes disponibles?"


Actualizar desde Upstream

Este repositorio es un fork de czlonkowski/n8n-mcp. Para actualizar con los últimos cambios:

1. Agregar el remote upstream (solo la primera vez)

git remote add upstream https://github.com/czlonkowski/n8n-mcp.git

2. Fetch y merge

git fetch upstream
git checkout main
git merge upstream/main

3. Resolver conflictos

Si hay conflictos (especialmente en docker-compose.yml, .env.example, o .gitignore), resuélvelos manualmente preservando las configuraciones locales de producción.

4. Reconstruir y desplegar

docker compose down
docker compose up -d --build

5. Verificar

docker compose logs -f n8n-mcp
curl http://localhost:3001/health

Estructura del Proyecto

n8n-mcp/
├── src/
│   ├── mcp/              # Servidor MCP y herramientas
│   ├── services/         # Validación, templates, ejemplos
│   ├── database/         # Capa de acceso a datos (SQLite)
│   ├── telemetry/        # Sistema de telemetría (desactivado)
│   └── utils/            # Utilidades
├── data/
│   ├── skills/           # Documentación de habilidades para IA
│   └── nodes.db          # Base de datos de nodos (generada)
├── scripts/              # Scripts de utilidad y testing
├── tests/                # Tests unitarios e integración
├── docker/               # Archivos de configuración Docker
├── docker-compose.yml    # Configuración de despliegue
├── Dockerfile            # Build multi-etapa optimizado
├── .env.example          # Plantilla de variables de entorno
└── package.json          # Dependencias y scripts

Seguridad

Buenas prácticas

  1. NUNCA subas el archivo .env al repositorio — está en .gitignore

  2. Usa AUTH_TOKEN fuerte (generar con: openssl rand -base64 32)

  3. El puerto está mapeado a 127.0.0.1:3001 — solo accesible localmente

  4. Usa un proxy inverso (Nginx/Traefik) con HTTPS para exponerlo públicamente

  5. La telemetría está desactivada por defecto (N8N_MCP_TELEMETRY_DISABLED=true)

  6. El modo SSRF está en permissive para comunicación interna — ajustar según necesidades

Verificación de secretos

Este repositorio ha sido auditado para garantizar que no contiene:

  • API keys reales

  • Tokens JWT completos

  • Credenciales de Supabase

  • Contraseñas o secrets de producción

Todos los valores en archivos de test son placeholders truncados (ej: eyJhbG...nkCk, test123...890).


Licencia

MIT — ver archivo LICENSE.

Basado en czlonkowski/n8n-mcp por Romuald Czlonkowski.

Available Tools

26 tools
get_nodeB
Read-onlyIdempotent

Get node info with progressive detail levels and multiple modes. Detail: minimal (~200 tokens), standard (~1-2K, default), full (~3-8K). Modes: info (default), docs (markdown documentation), search_properties (find properties), versions/compare/breaking/migrations (version info). Use format='docs' for readable documentation, mode='search_properties' with propertyQuery for finding specific fields.

Inputs: nodeType (required), mode, detail, toVersion, +5 more.

get_templateA
Read-onlyIdempotent

Get template by ID. Use mode to control response size: nodes_only (minimal), structure (nodes+connections), full (complete workflow).

Inputs: templateId (required), mode.

n8n_audit_instanceA
Read-onlyIdempotent

Security audit of n8n instance. Combines n8n's built-in audit API (credentials, database, nodes, instance, filesystem risks) with deep workflow scanning (hardcoded secrets via 50+ regex patterns, unauthenticated webhooks, error handling gaps, data retention risks). Returns actionable markdown report with remediation steps using n8n_manage_credentials and n8n_update_partial_workflow.

Inputs: categories, customChecks, includeCustomScan, daysAbandonedWorkflow.

n8n_autofix_workflowA
Idempotent

Automatically fix common workflow validation errors. Preview fixes or apply them. Fixes expression format, typeVersion, error output config, webhook paths, connection structure issues (numeric keys, invalid types, ID-to-name, duplicates, out-of-bounds indices).

Inputs: id (required), fixTypes, maxFixes, applyFixes, +1 more.

n8n_create_workflowA

Create workflow. Requires: name, nodes[], connections{}. Created inactive. Returns workflow with ID.

Inputs: name (required), nodes (required), connections (required), settings, +1 more.

n8n_delete_workflowA
Destructive

Permanently delete a workflow. This action cannot be undone.

Inputs: id (required).

n8n_deploy_templateA

Deploy a workflow template from n8n.io directly to your n8n instance. Deploys first, then auto-fixes common issues (expression format, typeVersions). Returns workflow ID, required credentials, and fixes applied.

Inputs: templateId (required), name, autoFix, stripCredentials, +1 more.

n8n_executionsA
Destructive

Manage workflow executions: get details, list, or delete. Use action='get' with id for execution details, action='list' for listing executions, action='delete' to remove execution record.

Inputs: action (required), id, mode, limit, +12 more.

n8n_generate_workflowA

Generate an n8n workflow from a natural language description using AI. Call with just a description to get workflow proposals. Then call again with deploy_id to deploy a chosen proposal, or set skip_cache=true to generate a fresh workflow. Use confirm_deploy=true to deploy a previously generated workflow.

Inputs: description (required), deploy_id, skip_cache, confirm_deploy.

n8n_get_node_configA
Read-onlyIdempotent

Get a single node's full configuration from a workflow by node name. Returns parameters, type, position, and other metadata without downloading the entire workflow. Use this instead of n8n_get_workflow(mode="full") when you only need one node's config. Use mode='filtered' with nodeNames for fetching multiple specific nodes.

Inputs: nodeName (required), workflowId (required), fields.

n8n_get_workflowA
Read-onlyIdempotent

Get workflow by ID with different detail levels. n8n has a draft/publish model: the workflow body holds the draft (latest edits); use mode='active' to see the published graph that is actually running. Modes: 'full' (draft + metadata), 'details' (full + execution stats), 'active' (published graph only), 'structure' (nodes/connections topology), 'filtered' (full config of only the nodes named in nodeNames - use to read one heavy node without the whole workflow), 'minimal' (id/name/active/tags).

Inputs: id (required), mode, nodeNames.

n8n_health_checkA
Read-onlyIdempotent

Check n8n instance health and API connectivity. Use mode='diagnostic' for detailed troubleshooting with env vars and tool status.

Inputs: mode, verbose.

n8n_list_workflowsA
Read-onlyIdempotent

List workflows (minimal metadata only). Returns id/name/active/dates/tags. Check hasMore/nextCursor for pagination.

Inputs: tags, limit, active, cursor, +2 more.

n8n_manage_credentialsA

Manage n8n credentials. Actions: list, get, create, update, delete, getSchema. Use getSchema to discover required fields before creating. For list, page beyond 100 results with cursor (from the previous response's nextCursor). NOTE: list/get need an n8n deployment whose public API permits credential reads — older n8n versions, restricted API keys, or instance settings can reject them, returning NOT_SUPPORTED (create, delete, getSchema — and update where the API version supports it — still work). SECURITY: credential data values are never logged.

Inputs: action (required), id, data, name, +4 more.

n8n_manage_datatableC
Destructive

Manage n8n data tables and rows. Actions: createTable, listTables, getTable, updateTable, deleteTable, getRows, insertRows, updateRows, upsertRows, deleteRows.

Inputs: action (required), data, name, limit, +10 more.

n8n_read_node_fieldA
Read-onlyIdempotent

Read the current value of a specific field from a workflow node without downloading the full workflow. Use this to inspect a field before editing it with n8n_update_partial_workflow (patchNodeField).

Inputs: nodeName (required), fieldPath (required), workflowId (required).

n8n_test_workflowA

Test/trigger workflow execution. Auto-detects trigger type (webhook/form/chat). Supports: webhook (HTTP), form (fields), chat (message). Note: Only workflows with these trigger types can be executed externally.

Inputs: workflowId (required), data, headers, message, +6 more.

n8n_update_full_workflowA
Idempotent

Full workflow update. Requires complete nodes[] and connections{}. For incremental use n8n_update_partial_workflow.

Inputs: id (required), name, nodes, settings, +1 more.

n8n_update_partial_workflowA
Idempotent

Update workflow incrementally with diff operations. Types: addNode, removeNode, updateNode, patchNodeField, moveNode, enable/disableNode, addConnection, removeConnection, updateSettings, updateName, add/removeTag, activate/deactivateWorkflow, transferWorkflow. patchNodeField requires fieldPath (dot path, e.g. "parameters.jsCode") and patches: [{find, replace}]. See tools_documentation("n8n_update_partial_workflow", "full") for details.

Inputs: id (required), operations (required), validateOnly, continueOnError.

n8n_validate_workflowB
Read-onlyIdempotent

Validate workflow by ID. Checks nodes, connections, expressions. Returns errors/warnings/suggestions.

Inputs: id (required), options.

n8n_workflow_versionsA
Destructive

Manage workflow version history, rollback, and cleanup. Versions are scoped to your n8n instance. Five modes:

  • list: Show version history for a workflow

  • get: Get details of specific version

  • rollback: Restore workflow to previous version (creates backup first)

  • delete: Delete specific version or all versions for a workflow

  • prune: Manually trigger pruning to keep N most recent versions Old backups are also pruned automatically (10 most recent per workflow, plus an age-based retention window).

Inputs: mode (required), limit, deleteAll, versionId, +3 more.

search_nodesA
Read-onlyIdempotent

Search n8n nodes by keyword with optional real-world examples. Pass query as string. Example: query="webhook" or query="database". Returns max 20 results. Use includeExamples=true to get top 2 template configs per node.

Inputs: query (required), mode, limit, source, +2 more.

search_templatesA
Read-onlyIdempotent

Search templates with multiple modes. Use searchMode='keyword' for text search, 'by_nodes' to find templates using specific nodes, 'by_task' for curated task-based templates, 'by_metadata' for filtering by complexity/setup time/services, 'patterns' for lightweight workflow pattern summaries mined from 2700+ templates.

Inputs: task, limit, query, fields, +9 more.

tools_documentationA
Read-onlyIdempotent

Get documentation for n8n MCP tools. Call without parameters for quick start guide. Use topic parameter to get documentation for specific tools. Use depth='full' for comprehensive documentation.

Inputs: depth, topic.

validate_nodeA
Read-onlyIdempotent

Validate n8n node configuration. Use mode='full' for comprehensive validation with errors/warnings/suggestions, mode='minimal' for quick required fields check. Example: nodeType="nodes-base.slack", config={resource:"channel",operation:"create"}

Inputs: config (required), nodeType (required), mode, profile. Returns: valid, errors, summary, nodeType, +5 more

validate_workflowA
Read-onlyIdempotent

Full workflow validation: structure, connections, expressions, AI tools. Returns errors/warnings/fixes. Essential before deploy.

Inputs: workflow (required), options. Returns: valid, errors, summary, warnings, +1 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 26 tools

    Disambiguation3/5

    Most tools have distinct purposes, but validate_workflow and n8n_validate_workflow are very similar, and n8n_autofix_workflow overlaps with validation. This creates some ambiguity for an agent choosing which tool to use.

    Naming Consistency3/5

    The majority of tools use a consistent 'n8n_verb_noun' pattern, but 7 tools lack the prefix (e.g., get_node, validate_workflow), and one tool (validate_node) has no corresponding prefixed version. This mixed convention is still readable but inconsistent.

    Tool Count4/5

    With 26 tools, the count is on the higher side but justified by the broad domain coverage (workflows, credentials, templates, executions, validation, data tables). Each tool serves a clear purpose, and no tool feels extraneous.

    Completeness4/5

    The tool set covers CRUD for workflows, execution management, validation, fixing, versioning, credential and data table management, template deployment, and node configuration. Minor gaps exist (e.g., no explicit export/import), but the surface is largely complete for typical n8n management tasks.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      Provides AI assistants with comprehensive access to n8n's 525+ workflow automation nodes, including documentation, properties, operations, and 2,500+ templates. Enables creating, validating, and managing n8n workflows through natural language.
      54,469 npm
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides AI assistants with comprehensive access to n8n node documentation, properties, and workflow templates. It enables models to search, understand, and manage n8n automation workflows through structured access to over 1,000 node types.
      54,469 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to access comprehensive n8n node documentation, properties, operations, workflow templates, and community nodes, allowing them to design, build, and validate n8n workflows through natural language.
      54,469 npm
      MIT