KR

ksaritek/rust-local-rag

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

34 stars 5 forks 품질 49 트렌드 12

☸ 고성능 로컬 RAG 서버는 MCP를 통해 Claude Desktop과 통합합니다. Ollama embeddings를 사용하여 개인적으로 PDF 문서를 검색 - 외부 API 호출이 없습니다.

개요

고성능, 로컬 RAG (Retrieval-Augmented Generation) 시스템은 모델 Context Protocol (MCP)을 통해 Claude Desktop과 통합합니다. 데이터를 외부 서비스에 전송하지 않고 Claude 대화 내에서 PDF 문서를 직접 검색하고 분석하십시오. 이 프로젝트는 Rust를 사용하여 생산 관련 MCP 서버를 구축하는 방법을 설명합니다. - 텍스트 추출을위한 팝업을 사용하여 - 로컬 Ollama 모델을 사용하여 (외부 API 호출 없음) - 문서 수집을 통해 - MCP 프로토콜을 통해 Claude Desktop - 모든 데이터 처리 지역 유지 Model Context Protocol (MCP)은 Claude와 같은 AI 조수가 외부 도구 및 데이터 소스와 상호 작용할 수 있는 표준입니다.

개요(AI 번역)

고성능, 로컬 RAG (Retrieval-Augmented Generation) 시스템은 모델 Context Protocol (MCP)을 통해 Claude Desktop과 통합합니다. 데이터를 외부 서비스에 전송하지 않고 Claude 대화 내에서 PDF 문서를 직접 검색하고 분석하십시오.

이 프로젝트는 Rust를 사용하여 생산 관련 MCP 서버를 구축하는 방법을 설명합니다.

  • ** 텍스트 추출을위한 Poppler를 사용하여 PDF 문서를 로컬로**Processes
  • Generates embeddings 로컬 Ollama 모델 사용 (외부 API 호출 없음)
  • 문서 수집을 통한 검색
  • **MCP 프로토콜을 통해 Claude Desktop과 원활하게 통합 **
  • Maintains privacy 모든 데이터 처리 로컬

️ MCP는 무엇입니까?

Model Context Protocol (MCP)은 Claude와 같은 AI 조수가 외부 도구 및 데이터 소스와 상호 작용할 수 있는 표준입니다. 교육 데이터에 제한되는 Claude 대신 MCP는 다음을 가능하게 합니다.

  • 외부 도구 및 기능 호출
  • 실시간 데이터 소스 접근
  • 로컬 애플리케이션과 통합
  • 상호 작용을 통한 컨텍스트 유지

☸ 이 프로젝트는 Rust MCP SDK를 사용합니다

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Rust Local RAG

A high-performance, local RAG (Retrieval-Augmented Generation) system built in Rust that integrates with Claude Desktop via the Model Context Protocol (MCP). Search and analyze your PDF documents directly within Claude conversations without sending data to external services.

🎯 Purpose

This project demonstrates how to build a production-ready MCP server using Rust that:

  • Processes PDF documents locally using poppler for text extraction
  • Generates embeddings using local Ollama models (no external API calls)
  • Provides semantic search through document collections
  • Integrates seamlessly with Claude Desktop via MCP protocol
  • Maintains privacy by keeping all data processing local

🏗️ What is MCP?

The Model Context Protocol (MCP) is a standard that allows AI assistants like Claude to interact with external tools and data sources. Instead of Claude being limited to its training data, MCP enables it to:

  • Call external tools and functions
  • Access real-time data sources
  • Integrate with local applications
  • Maintain context across interactions

🦀 How This Project Uses Rust MCP SDK

This implementation leverages the rmcp crate - the official Rust SDK for MCP - to create a server that exposes RAG capabilities to Claude Desktop.

MCP Architecture in This Project

┌─────────────────┐    MCP Protocol     ┌──────────────────┐
│                 │    (stdin/stdout)   │                  │
│  Claude Desktop │ ◄─────────────────► │   Rust RAG       │
│                 │                     │   MCP Server     │
└─────────────────┘                     └──────────────────┘
                                                │
                                                ▼
                                        ┌──────────────────┐
                                        │  Local RAG Stack │
                                        │                  │
                                        │  • PDF Parser    │
                                        │  • Ollama        │
                                        │  • Vector Store  │
                                        │  • Search Engine │
                                        └──────────────────┘

Key MCP Components Used

1. Server Handler Implementation

#[tool(tool_box)]
impl ServerHandler for RagMcpServer {
    fn get_info(&self) -> ServerInfo {
        // Provides server metadata to Claude
    }
}

2. Tool Definitions

Uses rmcp macros to expose RAG functionality as MCP tools:

#[tool(description = "Search through uploaded documents using semantic similarity")]
async fn search_documents(&self, query: String, top_k: Option) -> Result

#[tool(description = "List all uploaded documents")]  
async fn list_documents(&self) -> Result
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "rust-local-rag": { "command": "/Users/yourusername/.cargo/bin/rust-local-rag", "env": { "DATA_DIR": "/Users/yourusername/Documents/data", "DOCUMENTS_DIR": "/Users/yourusername/Documents/rag", "LOG_DIR": "/tmp/rust-local-rag", "LOG_LEVEL": "info", "LOG_MAX_MB": "10" } } } }