Built on Node.js runtime, allowing the MCP server to execute JavaScript/TypeScript code for handling user data operations.
Utilizes TypeScript for type-safe development, offering strongly-typed interfaces and schema validation for the user management system.
Implements Zod for runtime schema validation, providing type-safe validation of user data with automatic error handling and format checking.
User Info MCP Server
🚀 Gelişmiş Model Context Protocol (MCP) Server - Context7 Best Practices ile geliştirilmiş kullanıcı yönetim sistemi.
Bu proje, modern layered architecture pattern kullanarak kullanıcı bilgilerini JSON dosyasından sağlayan profesyonel bir MCP server'dır. Context7 MCP best practices ve clean architecture prensipleri uygulanarak geliştirilmiştir.
🏗️ Proje Mimarisi
🎨 Architecture Pattern: Layered Architecture (Context7 Pattern)
Separation of Concerns prensipleri:
Controllers → MCP tool handlers & response formatting
Services → Business logic, validation & error handling
Repositories → Pure data access (JSON file operations)
Tools → MCP tool registration & schema definitions
Types → TypeScript interfaces & Zod validation schemas
✨ Özellikler
MCP server 6 gelişmiş tool sağlar:
get_all_users → Tüm kullanıcıların listesini getirir
get_user_by_id → ID'ye göre belirli kullanıcıyı getirir
search_users_by_name → İsme göre kullanıcı arar (partial match)
search_users_by_email → E-posta adresine göre kullanıcı arar
search_users_by_phone → Telefon numarasına göre kullanıcı arar
add_user → Yeni kullanıcı ekler (validation + duplicate control)
🔍 User Veri Yapısı
📦 Kurulum & Setup
1. Bağımlılıkları Yükleyin
2. TypeScript Build
3. Development Mode
4. MCP Inspector ile Test
🛠️ Teknoloji Stack
Core Technologies
Node.js (v18+) → JavaScript runtime
TypeScript (v5.8+) → Type-safe development
ES Modules → Modern module system
MCP TypeScript SDK → Protocol implementation
Development & Quality Tools
Zod (v3.25+) → Runtime schema validation
tsx → TypeScript execution
MCP Inspector → Interactive tool testing
Strict TypeScript → Maximum type safety
Architecture Patterns
Context7 MCP Best Practices → Industry standards
Layered Architecture → Clean separation of concerns
Repository Pattern → Data access abstraction
Service Layer Pattern → Business logic encapsulation
🚀 Kullanım
Development Scripts
MCP Inspector Kullanımı
Bu komut MCP Inspector web arayüzünü açar ve tool'ları interaktif olarak test etmenizi sağlar. Tarayıcıda http://localhost:3000
adresinde açılır.
🔧 MCP Tool Kullanım Örnekleri
1. Tüm Kullanıcıları Getir
2. ID'ye Göre Kullanıcı Getir
3. İsme Göre Kullanıcı Ara
4. E-posta ile Kullanıcı Ara
5. Telefon ile Kullanıcı Ara
6. Yeni Kullanıcı Ekle
📁 Veri Dosyası Düzenleme
data/users.json
dosyasını düzenleyerek kullanıcı verilerini manuel olarak değiştirebilirsiniz:
⚠️ Not: JSON formatını bozmamaya dikkat edin. Yeni kullanıcılar için add_user
tool'unu kullanmak daha güvenlidir.
🔗 MCP Client Konfigürasyonu
Bu MCP server'ı çeşitli IDE'ler ve AI araçlarında kullanabilirsiniz:
Cursor IDE
Claude Desktop
VS Code (MCP Extension)
🔒 Güvenlik & Validasyon
Zod ile Type-Safe Validasyon
Schema-based validasyon → Tüm input'lar Zod schema'ları ile doğrulanır
Runtime type checking → TypeScript + Zod ile çifte güvenlik
Otomatik validasyon mesajları → Zod'un built-in error handling
E-posta format kontrolü →
z.string().email()
ile format doğrulamaString uzunluk kontrolü →
z.string().min(2).max(100)
ile range validationSayı validasyonu →
z.number().int().positive()
ile integer kontrolüDuplicate e-posta kontrolü → Repository layer'da unique email kontrolü
Required field validasyonu → Zod schema ile zorunlu alan kontrolü
Zod Schema Örnekleri
🏗️ Geliştirme Notları
Context7 MCP Best Practices ✅
Modular architecture → Layered separation of concerns
Tool registration → Clean tool definition & registration
Error handling → Comprehensive error management
Type safety → Full TypeScript + Zod validation
Input schemas → Context7 compatible schema definitions
Clean responses → Standardized MCP response format
Technical Features
ES Modules → Modern JavaScript module system
Strict TypeScript → Maximum type safety
Auto-increment IDs → Automatic ID generation
Duplicate prevention → Email uniqueness checks
Business validation → Service layer business rules
Repository pattern → Data access abstraction
CRUD operations → Full Create, Read, Update capabilities
Code Quality
Separation of concerns → Each layer has single responsibility
Error boundaries → Proper error catching & handling
Validation layers → Multiple validation levels
Clean code → Readable, maintainable codebase
Type inference → Zod to TypeScript type generation
📚 MCP Protocol Hakkında
Model Context Protocol (MCP), AI asistanlarına structured veri ve tool sağlamak için tasarlanmış modern bir protokoldür.
MCP'nin Avantajları:
Standardized communication → AI araçları arası standart iletişim
Tool-based architecture → Modular fonksiyonellik
Real-time data access → Canlı veri erişimi
Type-safe operations → Güvenli operasyonlar
Cross-platform compatibility → Platform bağımsızlık
Bu proje, Context7 MCP best practices kullanarak profesyonel MCP server geliştirme konusunda pratik yapmak için tasarlanmıştır.
🤝 Katkıda Bulunma
Fork yapın
Feature branch oluşturun (
git checkout -b feature/AmazingFeature
)Değişikliklerinizi commit edin (
git commit -m 'Add some AmazingFeature'
)Branch'e push yapın (
git push origin feature/AmazingFeature
)Pull Request açın
📝 Lisans
Bu proje MIT lisansı altında lisanslanmıştır.
🚀 Happy Coding! - Context7 MCP Best Practices ile geliştirilmiştir.
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
An MCP server providing tools for user information management with capabilities for retrieving, searching, and adding user data stored in a JSON file.
Related MCP Servers
- -securityFlicense-qualityA custom MCP server that allows storage, retrieval, and management of text-based information with natural language commands and keyword detection.
- -securityAlicense-qualityOpen source MCP server specializing in easy, fast, and secure tools for Databases.Last updated -10,759Apache 2.0
- -securityAlicense-qualityStores metadata for MCP servers and provides smart search capabilities, allowing users to find appropriate MCP servers for their queries and route requests to the most suitable server.Last updated -10MIT License
- AsecurityFlicenseAqualityAn MCP server that enables interaction with Markdown knowledge bases, allowing users to search and retrieve content by tags, text, URL, or date range from their local markdown files.Last updated -779