MCP ExplorerExplorer

N8n And Mcpservers

@peterDijkon 19 days ago
1 MIT
FreeCommunity
AI Systems
n8n with PostgreSQL and a demo MCP server for weather forecasts.

Overview

What is N8n And Mcpservers

n8n-and-mcpservers is a project that integrates n8n with PostgreSQL as a database and provides a demo MCP server for connecting with n8n. It includes basic tools for obtaining weather forecasts via the Weather API.

Use cases

Use cases include automating weather data retrieval for applications, creating workflows that respond to weather changes, and integrating weather forecasts into business processes.

How to use

To use n8n-and-mcpservers, start by modifying the default users and passwords in the .env file. Then, execute ‘docker-compose up -d’ in the current folder to launch n8n with PostgreSQL. Access n8n on port 5678 and use the MCP server at http://test-mcp-server:3002/mcp.

Key features

Key features include integration with PostgreSQL, a demo MCP server for weather forecasting, and the ability to connect using Streamable HTTP through community nodes.

Where to use

n8n-and-mcpservers can be used in fields such as automation, data integration, and workflow management, particularly where weather data is relevant.

Content

n8n with PostgreSQL and test MCP server

Starts n8n with PostgreSQL as database.
Starts a demo MCP server to connect n8n with it. The MCP server has some basic tool for getting weather forecast using https://api.weather.gov

To verify MCP server is up and running ok, use the MCP Inspector https://modelcontextprotocol.io/docs/tools/inspector
To run: npx @modelcontextprotocol/inspector

The MCP server is running in docker internally on host test-mcp-server port 3002.
The MCP Client tool that needs to be used is not the one that is available in the official tools - that one doesn’t support Streamable HTTP yet. For this, install a community node:

Bottom left dots menu next to username -> Settings
At Community nodes, install n8n-nodes-mcp
Add the tool to your AI Agent, choose the community node.
Add connection settings, transport type: Streamable HTTP.
To connect from n8n, use URL: http://test-mcp-server:3002/mcp

Start

To start n8n with PostgreSQL simply start docker-compose by executing the following
command in the current folder.

IMPORTANT: But before you do that change the default users and passwords in the .env file!

docker-compose up -d

n8n is available on port 5678

To stop it execute:

docker-compose stop

TODO

Configuration

To create a db dump from current database state:

run ./dump-database.sh

To refresh database with latest dump:

run ./refresh-database.sh

Tools

No tools

Comments