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"
      

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"
      

설정 방법

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.1.tar.gz (7.9 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.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_hybrid_search-1.2.1.tar.gz
  • Upload date:
  • Size: 7.9 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.1.tar.gz
Algorithm Hash digest
SHA256 b7ad369e388aaffb775a7a0ede2fddede0ccce46292ffc12f4baa28cb27c95f0
MD5 f241ffbb7db525622ed317c8ef3bfa95
BLAKE2b-256 70d364afeeb5ad3513d0d7fe85bf647d09546f6ddf03fd6853bec97ef19d399f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_hybrid_search-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 caf805fe146497e0b69e4a45fd605373f02624e900c9c549caa1ec112869ea56
MD5 42b9d4c167ce32047d8d65843d9a3c5a
BLAKE2b-256 c7c870f9c9371838587e44f800aa6df691c7314dffa6dc3f5aad07dd7932a8fd

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