Skip to main content

Hybrid Search RAG - A Model Context Protocol (MCP) server for RAG-based document search

Project description

RAG-based MCP Server

English | 한국어


English

This package provides a Retrieval Augmented Generation (RAG)-based Model Context Protocol (MCP) server, which generates contextually accurate responses by leveraging PDF data. It uses OpenAI's embedding model (text-embedding-3-small) to create embeddings from PDF documents and performs hybrid search (keyword + semantic search) to retrieve relevant content.

Installation

  1. Install UV (if you haven't already):

    • For macOS or Linux:

      curl -LsSf https://astral.sh/uv/install.sh | sh
      
    • For Windows (using PowerShell):

      powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
      
  2. Install the package:

    Use UV or pip to install the package from PyPI:

    uv pip install mcp-hybrid-search
    

    or

    pip install mcp-hybrid-search
    

Configuration

To use this server in the Claude app, add the following configuration to your claude_desktop_config.json file:

{
  "rag-mcp": {
    "command": "uvx",
    "args": [
      "mcp-hybrid-search",
      "path/to/your/allowed/folder"
    ],
    "env": {
      "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY"
    }
  }
}
  • Replace "path/to/your/allowed/folder" with the actual folder path where your PDF files will be stored.
  • Create a subfolder named data within the specified folder, and place all PDF documents you want to use into this data folder.

Usage

  1. Complete the installation and configuration steps described above.
  2. Launch or restart the MCP host application (e.g., the Claude app). The RAG server will automatically start and process PDF embeddings.
  3. The server will now generate contextually accurate and relevant responses by referencing the PDF documents stored in the data folder.

License

MIT


한국어

이 패키지는 PDF 데이터를 활용하여 보다 정확한 답변을 생성할 수 있는 RAG(Retrieval Augmented Generation) 기반 MCP(Model Context Protocol) 서버입니다. OpenAI 임베딩 모델(text-embedding-3-small)을 사용해 PDF 데이터를 임베딩한 후, 하이브리드 서치 (키워드 + 시멘틱 서치) 방식으로 검색 기능을 제공합니다.

설치 방법

  1. UV 설치하기 (아직 설치하지 않았다면)

    • macOS 또는 Linux의 경우:

      curl -LsSf https://astral.sh/uv/install.sh | sh
      
    • Windows의 경우 (PowerShell에서 실행):

      powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
      
  2. 패키지 설치하기

    UV나 pip로 패키지를 설치해주세요:

    uv pip install mcp-hybrid-search
    

    또는

    pip install mcp-hybrid-search
    

설정 방법

Claude 앱에서 이 서버를 사용하려면, claude_desktop_config.json 파일에 다음 설정을 추가해야 합니다:

{
  "rag-mcp": {
    "command": "uvx",
    "args": [
      "mcp-hybrid-search",
      "접근을 허용할 폴더 경로"
    ],
    "env": {
      "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY"
    }
  }
}
  • "접근을 허용할 폴더 경로" 부분에는 실제로 PDF 파일을 보관할 경로를 적어주세요.
  • 해당 경로 아래에 data라는 이름의 폴더를 만들어 주시고, 이 폴더 안에 자료로 사용할 PDF 파일을 넣어주세요.

사용 방법

  1. 위의 설치와 설정 과정을 모두 완료한 후,
  2. MCP 호스트 애플리케이션(예 : Claude 앱)을 실행하거나 재시작하면 PDF 데이터 임베딩 후 자동으로 RAG 서버가 활성화됩니다.
  3. 이제 서버가 data 폴더에 넣어둔 PDF 파일의 내용을 참고하여 보다 정확하고 맥락에 맞는 답변을 생성해줍니다.

라이센스

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_hybrid_search-1.2.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_hybrid_search-1.2.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file mcp_hybrid_search-1.2.0.tar.gz.

File metadata

  • Download URL: mcp_hybrid_search-1.2.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for mcp_hybrid_search-1.2.0.tar.gz
Algorithm Hash digest
SHA256 3ff98f1bbe5be93bbf0f914b150d11ebd596462494db5d226e0079d8c9cf2b27
MD5 b1fcb774b2b1ae144e5d7502dfe2681e
BLAKE2b-256 bfe6250363ab86725ecea244ecd0828ff2c6a85f8e5b7947cd0fe2eb6605cdff

See more details on using hashes here.

File details

Details for the file mcp_hybrid_search-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_hybrid_search-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19daf51697921d6868c6eac4432dbf23e15df02aa53d7a224d3e1f0ac4c8a5d5
MD5 bcbdf5cdbd0cb44220fadd1e02096a6c
BLAKE2b-256 0ae9accd157e4c5c7547d7905024de15bae92e66f38cf60bd03e003f3361f9c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page