Runs as a containerized application using Docker with docker-compose configuration for deployment and scaling
Provides REST API endpoints for document upload, AI querying, and project tooling services through an Express web server
Built on Node.js runtime for document processing, text analysis, and AI integration capabilities
Integrates with OpenAI's API for document analysis, question answering, test case generation, and document summarization based on ingested project documents
Uses Redis Stack as a vector database for storing and retrieving document embeddings to enable semantic search and context retrieval
MCP Server
MCP Server là hệ thống phân tích ngữ cảnh tài liệu dự án sử dụng Node.js + Express, tích hợp AI (OpenAI), chạy trong Docker.
Cấu trúc dự án
Related MCP server: RAG Documentation MCP Server
Hướng dẫn setup
Clone repo & cài đặt dependencies
git clone <repo-url> cd mcp-server npm installCấu hình môi trường
Copy file
.env.examplethành.envvà điền API key OpenAI:cp .env.example .env # Sửa OPENAI_API_KEY trong .env
Khởi tạo thư mục dữ liệu
node src/scripts/init.js # hoặc sẽ tự động khi chạy DockerChạy với Redis Stack (production-ready vector store)
Sử dụng file
docker-compose.redis.yml:docker-compose -f docker-compose.redis.yml up --buildĐảm bảo biến môi trường
REDIS_URLđã đúng (mặc định:redis://redis:6379).
Sử dụng
1. Upload tài liệu
Gửi file qua API:
POST /upload Content-Type: multipart/form-data file: <tài liệu dự án>File sẽ được ingest, index thành vector lưu vào Redis.
2. Truy vấn AI
Gửi câu hỏi qua API:
POST /api/query Content-Type: application/json { "question": "Nội dung bạn muốn hỏi về tài liệu dự án" }AI sẽ trả lời dựa trên ngữ cảnh tài liệu đã ingest.
3. Ingest toàn bộ file trong thư mục uploads
Tooling AI
Các API hỗ trợ dự án:
Sinh test-case tự động
POST /tools/generate-testcase Content-Type: application/json { "requirements": "Yêu cầu phần mềm..." }Tóm tắt tài liệu
POST /tools/summarize Content-Type: application/json {}Traceability tool
POST /tools/traceability Content-Type: application/json { "requirements": "Yêu cầu phần mềm..." }
Các API này sử dụng prompt template và AI để sinh kết quả dựa trên ngữ cảnh tài liệu đã ingest.
Lưu ý
Đảm bảo đã có API key OpenAI hợp lệ.
Thư mục
data/uploadslà nơi chứa file upload.Vector database chỉ sử dụng Redis, không còn lưu file JSON.
Có thể mở rộng các loại tài liệu, pipeline, hoặc tích hợp vector DB khác.
Mọi thắc mắc vui lòng liên hệ admin dự án.