mcp-server

nurdansisman/mcp-server

3.1

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

KatmanAçıklama
n8nWorkflow motoru, AI Agent ve chat trigger node'larını barındırır
MCP ServerTool tanımlar ve n8n ile API arasında köprü kurar
Node.js APIREST API, kullanıcı verilerini yöneten backend
PostgreSQLHafıza (memory) veritabanı
Google GeminiGoogle’ı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 /customers
  • GET /customers/:id
  • POST /customers
  • DELETE /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_URL değişkeni şu şekilde olmalı:

const BASE_URL = "http://localhost:3001"; // Node.js REST API adresi

4. n8n Workflow Kurulumu

  1. n8n Editor arayüzünü aç

  2. Menüden Import Workflow seçeneğini seç

  3. n8n-workflow.json dosyasını içe aktar

  4. Gerekli credentials ayarlarını yap:

    • Google Gemini API anahtarı
    • PostgreSQL bağlantısı (n8n_user / secret / n8n)
  5. 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.