Skip to main content
Glama

Knowledge MCP Service

by vietnama10

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/

Hướng dẫn setup

  1. Clone repo & cài đặt dependencies
    git clone <repo-url> cd mcp-server npm install
  2. Cấu hình môi trường
    • Copy file .env.example thành .env và điền API key OpenAI:
      cp .env.example .env # Sửa OPENAI_API_KEY trong .env
  3. Khởi tạo thư mục dữ liệu
    node src/scripts/init.js # hoặc sẽ tự động khi chạy Docker
  4. Chạ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 ingest

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/uploads là 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.

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables AI-powered document analysis and querying for project documentation using vector embeddings stored in Redis. Supports document upload, context-aware Q&A, automatic test case generation, and requirements traceability through OpenAI integration.

  1. Cấu trúc dự án
    1. Hướng dẫn setup
      1. Sử dụng
        1. 1. Upload tài liệu
        2. 2. Truy vấn AI
        3. 3. Ingest toàn bộ file trong thư mục uploads
      2. Tooling AI
        1. Lưu ý

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            Enables AI assistants to enhance their responses with relevant documentation through a semantic vector search, offering tools for managing and processing documentation efficiently.
            Last updated -
            21
            42
          • -
            security
            A
            license
            -
            quality
            Provides tools for retrieving and processing documentation through vector search, enabling AI assistants to augment their responses with relevant documentation context.
            Last updated -
            21
            MIT License
            • Apple
          • -
            security
            A
            license
            -
            quality
            Enables AI assistants to perform comprehensive Redis database operations including managing strings, hashes, lists, sets, sorted sets, TTL management, and data backup/restore. Supports secure connections and provides batch operations for efficient Redis interaction through natural language.
            Last updated -
            34
            9
            1
            MIT License
            • Apple
          • -
            security
            A
            license
            -
            quality
            Enables AI-powered querying and management of documentation through markdown file serving, keyword search, and OpenAI-based Q\&A capabilities. Supports document indexing, analysis, and agent handoffs with rate limiting protection.
            Last updated -
            5
            MIT License

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/vietnama10/knowledge-mcp-service'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server