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
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., "@Knowledge MCP Servicesummarize the uploaded project documentation"
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.
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
mcp-server/
├─ Dockerfile
├─ docker-compose.redis.yml # Dùng Redis Stack
├─ .env.example
├─ package.json
├─ src/
│ ├─ index.js # entry point (Express)
│ ├─ config.js
│ ├─ routes/
│ │ ├─ upload.js # API upload file
│ │ ├─ api.js # API truy vấn AI
│ │ └─ tools.js # Tooling AI
│ ├─ lib/
│ │ ├─ fileParser.js # parse file, ingest
│ │ ├─ textSplitter.js # chia nhỏ text
│ │ ├─ embeddings.js # tạo embedding
│ │ ├─ vectorStore.redis.js# lưu vector (Redis)
│ │ ├─ retriever.js # truy xuất context
│ │ └─ promptTemplates.js # prompt cho tooling
│ └─ scripts/
│ ├─ ingestAll.js # ingest toàn bộ file
│ └─ init.js # khởi tạo thư mục/data
└─ data/ # docker volume mount
└─ uploads/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
npm run ingestTooling 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.
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.