The RAG MCP Server is a Model Context Protocol server that combines knowledge graphs with Retrieval-Augmented Generation for intelligent code indexing, semantic search, and project management.
Core Capabilities:
Automated RAG Pipeline - Complete project analysis and injection into both knowledge graph (Phase 0) and RAG system with automatic LLM-powered intelligent analysis
Knowledge Graph Management - Create, read, update, and delete entities, relations, and observations with automatic knowledge enrichment during indexing
Semantic Code Search - Advanced semantic searches across indexed codebases with configurable similarity thresholds and project filtering
Incremental Updates - Re-index projects with configurable chunking and embeddings without full reprocessing
Project Management - List and view statistics for indexed projects
Advanced Features:
Intelligent LLM Analysis - Leverage Ollama for content summarization, keyword extraction, structure suggestion, entity detection, and complexity classification
Optimized Performance - Batch processing for LLM calls with intelligent caching (configurable TTL) for improved efficiency
Centralized Configuration - Unified configuration system (
rag-config.json) with validation, limits, and support for multiple embedding providers (fake, ollama, sentence-transformers) and LLM providersFlexible File Filtering - Exclude files from indexing using
.ragignorepatterns and customizable file patternsExtensible Architecture - Tool Registry system for automatic discovery, centralized management, and unified execution with backward compatibility
MCP Integration - Works with Model Context Protocol clients like Cline through standardized configuration
Supports Ollama as an embedding provider for semantic search and code indexing, allowing the use of models like nomic-embed-text for RAG functionality.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@RAG MCP Serversearch for authentication middleware in our user service project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
RAG MCP Server v2.0
Un serveur MCP (Model Context Protocol) avec architecture v2.0 simplifiée : 2 outils principaux pour l'indexation automatique et la recherche sémantique de code.
🚀 Nouvelle Architecture v2.0
📋 Outils Principaux (Simplifiés)
Outil | Description | Remplace |
| Outil maître pour l'indexation automatique |
|
| Outil de recherche avancée |
|
🎯 Avantages de v2.0
Simplification radicale : 2 outils au lieu de 6
Automatisation complète : Détection VS Code + file watcher intégrés
Intelligence native : Chunking intelligent par type de contenu
Rétrocompatibilité totale : Les anciens outils fonctionnent toujours (masqués)
Pipeline automatisé : Phase 0 → scan → analyse → chunking → embeddings → injection
🏗️ Architecture Technique
Pipeline activated_rag
Fonctionnalités recherche_rag
Recherche hybride : Combinaison similarité sémantique + recherche textuelle
Filtres avancés : Par type de contenu, langage, extension, score
Re-ranking : Classement basé sur métadonnées (fraîcheur, taille, type)
Seuil dynamique : Adaptation automatique du seuil de similarité
📦 Installation
🚀 Utilisation Rapide
Indexation Automatique
Recherche Avancée
🔧 Configuration v2.0
Configuration Principale
Migration depuis v1.0
🧪 Tests
Tests v2.0
Tests Spécifiques
Tests de migration : Vérification de la rétrocompatibilité
Tests de performance : Benchmark nouveau vs ancien système
Tests d'intégration : Validation du pipeline complet
Tests de qualité : Validation des embeddings séparés
🛠️ Structure du Projet v2.0
📊 Métriques v2.0
Outils Visibles
2 outils principaux :
activated_rag,recherche_rag9 outils graph : Graphe de connaissances (inchangés)
Total visible : 11 outils
Outils Masqués (Rétrocompatibilité)
5 outils legacy :
injection_rag,index_project,update_project,search_code,manage_projectsAccessibles : Via appel direct (rétrocompatibilité)
Performances
Initialisation : < 500ms
Indexation : 30-50% plus rapide avec chunking intelligent
Recherche : 20-40% plus précise avec embeddings séparés
Mémoire : Réduction de 25% avec cache optimisé
🔍 Dépannage
Problèmes Courants
Q : Les anciens outils ne fonctionnent plus ?
R : Activez legacy_mode: true dans la configuration.
Q : activated_rag ne détecte pas les changements ?
R : Vérifiez enable_phase0: true et les permissions du file watcher.
Q : Recherche avec scores bas ?
R : Ajustez filters.min_score ou utilisez le modèle approprié pour le type de contenu.
Q : Performances lentes ?
R : Réduisez chunk_size, utilisez embedding_provider: 'fake' pour les tests, désactivez enable_watcher.
📈 Monitoring
Logs Disponibles
logs/activated-rag.log: Indexation automatiquelogs/recherche-rag.log: Recherches avancéeslogs/phase0-events.log: Événements Phase 0logs/performance.log: Métriques de performance
Métriques Clés
🔮 Roadmap
v2.1 (Prochainement)
Intégration Tree-sitter : Analyse AST native
Cache distribué : Partage d'embeddings entre projets
API REST : Interface HTTP pour les outils
Plugins : Extensions personnalisables
v3.0 (Future)
Apprentissage automatique : Adaptation des paramètres
Collaboration : Partage d'index entre utilisateurs
Intégration CI/CD : Pipeline d'indexation automatisé
Dashboard : Interface web de monitoring
📚 Documentation Complète
GUIDE-NOUVEAUX-OUTILS-V2.md : Guide détaillé v2.0
CONFIGURATION.md : Guide de configuration
PHASE0_3_README.md : Documentation Phase 0
API_REFERENCE.md : Référence API
🤝 Contribution
Fork le projet
Créer une branche (
git checkout -b feature/amazing-feature)Commit les changements (
git commit -m 'Add amazing feature')Push vers la branche (
git push origin feature/amazing-feature)Ouvrir une Pull Request
📄 Licence
Ce projet est sous licence MIT. Voir le fichier LICENSE pour plus de détails.
🙏 Remerciements
Model Context Protocol pour le framework MCP
L'équipe de développement pour les contributions
La communauté open source pour les outils et bibliothèques utilisés
Dernière mise à jour : 13/01/2026
Version : 2.0.0
Statut : Production Ready avec Architecture Simplifiée 🚀
Compatibilité : Rétrocompatible avec v1.0.0
Changelog v2.0.0
Nouveau : Architecture simplifiée avec 2 outils principaux
Nouveau :
activated_rag- Outil maître pour indexation automatiqueNouveau :
recherche_rag- Recherche avancée avec filtresNouveau : Phase 0 intégrée (détection VS Code + file watcher)
Nouveau : Chunking intelligent par type de contenu
Nouveau : Embeddings séparés (code vs texte)
Nouveau : Système de registre v2.0 avec outils masqués
Nouveau : Tests de rétrocompatibilité complets
Nouveau : Scripts de migration v1.0 → v2.0
Nouveau : Documentation v2.0 complète
Amélioration : Performances 30-50% plus rapides
Amélioration : Précision de recherche 20-40% meilleure
Amélioration : Réduction mémoire de 25%
Rétrocompatibilité : Tous les outils v1.0 fonctionnent (masqués)
Changelog v1.5.0
Nouveau : Analyse LLM intelligente avec intégration Ollama
Nouveau : Service LLM (
LlmService) pour appels à l'API OllamaNouveau : Cache LLM (
LlmCache) pour optimisation des performancesNouveau : Configuration LLM dans
rag-config.jsonavec fournisseurs et préparationNouveau : Tâches intelligentes : résumé, extraction de mots-clés, suggestion de structure, détection d'entités, classification de complexité
Nouveau : Intégration dans
ai-segmenter.tspour segmentation intelligenteNouveau : Intégration dans
indexer.tsavec cache LLMNouveau : Tests de configuration LLM (
test-llm-config.js)Nouveau : Tests d'intégration Ollama (
test-ollama-integration.js)Amélioration : Support de multiples modèles Ollama configurables
Amélioration : Batch processing pour optimisation des appels LLM
Amélioration : Cache intelligent avec TTL configurable
Amélioration : Documentation complète des fonctionnalités LLM