Mcp_server

mekaland/Mcp_server

3.2

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.

This project is a Node.js server utilizing the ModelContextProtocol (MCP) SDK, integrated with a PostgreSQL database to manage users and provide AI-powered tools.

🚀 MCP HTTP Server + Katmanlı API + n8n Entegrasyonu

Bu proje, ModelContextProtocol (MCP) SDK’sı kullanılarak geliştirilmiş, katmanlı mimariye sahip bir REST API ile entegre çalışan ve n8n otomasyon platformuna bağlanan bir Node.js sunucusudur.


📌 Proje Hedefi

💬 Kullanıcılarla doğal dilde etkileşim kuran bir yapay zeka aracılığıyla veritabanı işlemleri gerçekleştirmek. Sistem şunları içerir:

  • n8n AI Agent
  • Google Gemini Chat Model
  • PostgreSQL tabanlı kullanıcı yönetimi
  • MCP protokolü üzerinden veri akışı

🧱 Kullanılan Teknolojiler

KatmanTeknolojiler
API SunucusuNode.js, Express, PostgreSQL (Docker)
MCP Sunucusu@modelcontextprotocol/sdk
AI & Otomasyonn8n, Google Gemini
Bellek SistemiPostgreSQL tabanlı Chat Memory
ProtokollerServer-Sent Events (SSE), JSON-RPC
YardımcılarZod, Axios, body-parser, dotenv

📦 Proje Yapısı . ├── server.js # MCP HTTP Server ├── docker-compose.yml # Katmanlı API için Docker dosyası ├── api/ # Katmanlı REST API (controller, service, repo) ├── .env # Ortam değişkenleri ├── mcp.json # n8n entegrasyonu için MCP Tool yapılandırması

✅ Kullanıcı İşlemleri (API Üzerinden)

  • createUserViaApi: Yeni kullanıcı ekler
  • listUsersViaApi: Tüm kullanıcıları listeler
  • updateUserViaApi: Kullanıcı bilgilerini günceller
  • deleteUserViaApi: Belirtilen kullanıcıyı siler

➕ Yardımcı Araçlar

  • add, subtract, multiply, divide: Basit matematiksel işlemler
  • passwordStrengthChecker: Şifre gücünü analiz eder
  • format_final_json_response: AI agent için özel cevap formatlayıcı

🧪 Kurulum

1. MCP Server'ı Başlat

npm install
node server.js