🧠 概念知识库搜索MCP服务器
](https://nodejs.org/en/)   
RAG MCP服务器,使LLM能够通过概念搜索与本地PDF/EPUB文档的矢量数据库分块库进行交互。结合语料库驱动的概念提取、WordNet语义丰富和LanceDB支持的多信号混合排名,以提高检索精度。
______________________________________________________________________
______________________________________________________________________
🎯 概述
概念RAG使用 Goal → 活动→ 技能→ Tool 帮助AI代理高效获取知识的架构。
在初始设置始终应用后 规则,代理人能够使用暴露的 指导 资源用于:
这减少了上下文开销,并提供了确定性的工具选择。
______________________________________________________________________
🚀 快速开始
先决条件
- Node.js 18+
- Python 3.9+与NLTK
- OpenRouter API密钥(在这里注册)
- MCP客户端(光标或克劳德桌面)
安装
# Clone and build
git clone https://github.com/m2ux/concept-rag.git
cd concept-rag
npm install
npm run build
# Install WordNet
pip3 install nltk
python3 -c "import nltk; nltk.download('wordnet'); nltk.download('omw-1.4')"
# Configure API key
cp .env.example .env
# Edit .env and add your OpenRouter API key为您的文档添加种子
source .env
# Initial seeding (create database)
npx tsx hybrid_fast_seed.ts \
--dbpath ~/.concept_rag \
--filesdir ~/Documents/my-pdfs \
--overwrite
# Incremental seeding (add new documents only)
npx tsx hybrid_fast_seed.ts \
--dbpath ~/.concept_rag \
--filesdir ~/Documents/my-pdfs配置MCP客户端
光标 (~/.cursor/mcp.json):
{
"mcpServers": {
"concept-rag": {
"command": "node",
"args": [
"/path/to/concept-rag/dist/conceptual_index.js",
"/home/username/.concept_rag"
]
}
}
}重新启动MCP客户端并开始搜索。看 设置.md 对于其他IDE。
🙏 致谢
📜 许可证
MIT许可证-请参阅 许可证 了解详情。
