nurdansisman/mcp-server
If you are the rightful owner of mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Model Context Protocol (MCP) server acts as a bridge between AI agents and various APIs, facilitating seamless communication and tool invocation.
🧠 AI Destekli Kullanıcı Yönetim Sistemi
(n8n + MCP + PostgreSQL + REST API)
Bu proje, n8n, LangChain, MCP (Model Context Protocol), PostgreSQL ve özel geliştirilen bir Node.js REST API kullanılarak oluşturulmuş AI destekli bir kullanıcı yönetim asistanıdır.
🚀 Özellikler
- 🧠 Doğal dil ile kullanıcı yönetimi
- 💬 Google Gemini LLM ile doğal dil işleme
- 📁 PostgreSQL tabanlı kullanıcıya özel chat memory
- 🔌 LangChain AI Agent + MCP ile API tool'larını otomatik çağırma
- 🛠️ REST API ile CRUD (Create, Read, Update, Delete) işlemleri
🧱 Sistem Bileşenleri
| Katman | Açıklama |
|---|---|
n8n | Workflow motoru, AI Agent ve chat trigger node'larını barındırır |
MCP Server | Tool tanımlar ve n8n ile API arasında köprü kurar |
Node.js API | REST API, kullanıcı verilerini yöneten backend |
PostgreSQL | Hafıza (memory) veritabanı |
Google Gemini | Google’ın büyük dil modeli (LLM) |
📁 Klasör Yapısı
.
├── mcp-demo/ # MCP Server (index.js burada)
├── node-postgres-api/ # Kullanıcı CRUD API’si
├── n8n-workflow.json # İçe aktarılabilir n8n workflow dosyası
└── README.md # Bu döküman
🧰 Kurulum
1. PostgreSQL Veritabanı (Docker ile)
docker run --name postgres-n8n -e POSTGRES_USER=n8n_user -e POSTGRES_PASSWORD=secret -e POSTGRES_DB=n8n -p 5432:5432 -d postgres
Kullanıcı adı:
n8n_user
Şifre:secret
Veritabanı:n8n
2. Node.js REST API Kurulumu
git clone https://github.com/nurdansisman/node-postgres-api
cd node-postgres-api
npm install
node index.js
✅ API şu endpoint'leri sağlar:
GET /customersGET /customers/:idPOST /customersDELETE /customers/:id
3. MCP Server’ı Başlat
cd mcp-demo
npm install
node index.js
📍 MCP Server şu adreste çalışır:
http://localhost:3000/sse
MCP Server içindeki
BASE_URLdeğişkeni şu şekilde olmalı:
const BASE_URL = "http://localhost:3001"; // Node.js REST API adresi
4. n8n Workflow Kurulumu
-
n8nEditor arayüzünü aç -
Menüden
Import Workflowseçeneğini seç -
n8n-workflow.jsondosyasını içe aktar -
Gerekli
credentialsayarlarını yap:- Google Gemini API anahtarı
- PostgreSQL bağlantısı (
n8n_user / secret / n8n)
-
AI Agent node’unun sistem mesajına şu metni ekle:
You are an assistant for a user management system. Your only purpose is to parse user messages, extract parameters, and call the appropriate tool.
When invoking **get-all-users**, list each user’s full name on its own line.