mcp-n8n
MCP server for integrating with n8n, enabling workflow automation and management through natural language.
README
mcp-server
Servidor Model Context Protocol (MCP) construido con mcp-framework.
1. Instalación y ejecución
-
Instala las dependencias:
npm install -
Compila el proyecto (esto es necesario cada vez que agregues o modifiques una tool):
npm run build -
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

Configuración del nodo AI Agent

Configuración del nodo MCP Client

Ejemplo de workflow completo

4. Notas adicionales
-
Si agregas nuevas tools o modificas el código, siempre ejecuta
npm run buildantes de reiniciar el contenedor. -
El contenedor MCP debe levantarse con el flag
--buildpara 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
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.