mcp-n8n

mcp-n8n

MCP server for integrating with n8n, enabling workflow automation and management through natural language.

Category
Visit Server

README

mcp-server

Servidor Model Context Protocol (MCP) construido con mcp-framework.

1. Instalación y ejecución

  1. Instala las dependencias:

    npm install
    
  2. Compila el proyecto (esto es necesario cada vez que agregues o modifiques una tool):

    npm run build
    
  3. Levanta los contenedores MCP, n8n y postgres (esto reconstruye la imagen y toma los cambios):

docker-compose up mcp n8n postgres --build

Esto iniciará el servidor MCP, n8n y la base de datos postgres necesaria para n8n. Por defecto, n8n estará disponible en http://localhost:5678 en tu navegador.

Si solo quieres levantar n8n y postgres (por ejemplo, para pruebas de integración):

docker-compose up n8n postgres

Nota: El servicio de postgres es requerido por n8n para almacenar los datos de workflows, credenciales y ejecuciones.

2. Crear una nueva Tool

Puedes crear una nueva tool usando el CLI del framework MCP. Ejemplo:

mcp add tool mi-nueva-tool

Esto generará un archivo en src/tools/. Edita el archivo para definir la lógica de tu tool.

Ejemplo básico:

import { MCPTool } from "mcp-framework";
import { z } from "zod";

interface MiToolInput {
  mensaje: string;
}

class MiTool extends MCPTool<MiToolInput> {
  name = "mi_tool";
  description = "Descripción de lo que hace tu tool";
  schema = {
    mensaje: {
      type: z.string(),
      description: "Mensaje de entrada",
    },
  };
  async execute(input: MiToolInput) {
    return `Procesado: ${input.mensaje}`;
  }
}

export default MiTool;

Recuerda ejecutar npm run build y reiniciar el contenedor para que la nueva tool esté disponible.

3. Integración con n8n

Para conectar n8n con MCP, configura el nodo MCP Client en n8n con la URL de tu servidor MCP, por ejemplo:
http://mcp:8080/mcp

Asegúrate de que el contenedor MCP esté corriendo y accesible desde n8n.

Ejemplo de configuración visual

Configuración del Webhook en n8n

WebhookConfig

Configuración del nodo AI Agent

AIAgentConfig

Configuración del nodo MCP Client

MCPClientConfig

Ejemplo de workflow completo

FullWorkFlow

4. Notas adicionales

  • Si agregas nuevas tools o modificas el código, siempre ejecuta npm run build antes de reiniciar el contenedor.

  • El contenedor MCP debe levantarse con el flag --build para tomar los cambios.

  • Las imágenes incluidas muestran ejemplos de configuración en n8n para facilitar la integración.

  • Para acceder a la interfaz de n8n, abre http://localhost:5678 en tu navegador.

5. Recursos

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured