Skip to main content
Glama

Model Context Protocol Server

by arkeodev

RAG와 MCP를 활용한 검색 엔진

LangChain, Model Context Protocol(MCP), Retrieval-Augmented Generation(RAG), Ollama를 결합하여 웹을 검색하고, 정보를 수집하고, 관련 답변을 제공할 수 있는 에이전트 AI 시스템을 만든 강력한 검색 엔진입니다.

특징

  • Exa API를 사용한 웹 검색 기능
  • FireCrawl을 사용한 웹 콘텐츠 검색
  • 더욱 관련성 있는 정보 추출을 위한 RAG(Retrieval-Augmented Generation)
  • 표준화된 도구 호출을 위한 MCP(Model Context Protocol) 서버
  • Ollama를 통한 로컬 LLM과 OpenAI를 통한 클라우드 기반 LLM 모두 지원
  • 직접 검색, 에이전트 기반 검색 또는 서버 모드를 지원하는 유연한 아키텍처
  • 포괄적인 오류 처리 및 우아한 대체
  • 유형 힌트가 포함된 Python 3.13+
  • 효율적인 웹 작업을 위한 비동기 처리

건축학

이 프로젝트는 몇 가지 핵심 구성 요소를 통합합니다.

  1. 검색 모듈 : Exa API를 사용하여 웹을 검색하고 FireCrawl을 사용하여 콘텐츠를 검색합니다.
  2. RAG 모듈 : 문서를 내장하고, 청크로 나누어 FAISS 벡터 저장소에 저장합니다.
  3. MCP 서버 : 도구 호출을 위한 표준화된 프로토콜을 제공합니다.
  4. 에이전트 : 검색 및 RAG 기능을 사용하는 LangChain 기반 에이전트

프로젝트 구조

지엑스피1

시작하기

필수 조건

  • 파이썬 3.13+
  • (선택 사항, 개발을 위해)
  • Exa 및 FireCrawl용 API 키
  • (선택 사항) Ollama가 로컬에 설치됨
  • (선택 사항) OpenAI API 키

설치

  1. 저장소를 복제합니다
git clone https://github.com/yourusername/search-engine-with-rag-and-mcp.git cd search-engine-with-rag-and-mcp
  1. 종속성 설치
# Using pip pip install -r requirements.txt # Or using poetry poetry install
  1. .env 파일을 만듭니다(참조로 docs/env_template.md 사용)

용법

이 애플리케이션에는 세 가지 주요 작동 모드가 있습니다.

1. 직접 검색 모드(기본값)
# Using pip python -m src.core.main "your search query" # Or using poetry poetry run python -m src.core.main "your search query"
2. 에이전트 모드
python -m src.core.main --agent "your search query"
3. MCP 서버 모드
python -m src.core.main --server

사용자 정의 호스트와 포트를 지정할 수도 있습니다.

python -m src.core.main --server --host 0.0.0.0 --port 8080

Ollama 사용(선택 사항)

로컬 임베딩 및 LLM 기능에 Ollama를 사용하려면:

  1. Ollama 설치: https://ollama.ai/
  2. 모델 가져오기:
ollama pull mistral:latest
  1. .env 파일에서 적절한 환경 변수를 설정합니다.
OLLAMA_BASE_URL=http://localhost:11434 OLLAMA_MODEL=mistral:latest

개발

이 프로젝트는 다음과 같은 모범 사례를 따릅니다.

  • 코드 서식 : 일관된 코드 스타일을 위해 Black 및 isort 사용
  • 유형 검사 : 정적 유형 검사를 위한 mypy
  • Linting : 코드 품질을 위한 flake8
  • 테스트 : 단위 및 통합 테스트를 위한 pytest
  • 환경 관리 : 환경 변수를 관리하기 위한 python-dotenv
  • 로깅 : 콘솔과 파일 모두에 대한 구조화된 로깅

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

감사의 말

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

LangChain, RAG, Ollama와 통합하여 AI 시스템이 웹을 검색하고, 정보를 수집하고, 관련 답변을 제공할 수 있도록 도구 호출을 위한 표준화된 프로토콜을 제공합니다.

  1. 특징
    1. 건축학
      1. 프로젝트 구조
        1. 시작하기
          1. 필수 조건
          2. 설치
          3. 용법
          4. Ollama 사용(선택 사항)
        2. 개발
          1. 특허
            1. 감사의 말

              Related MCP Servers

              • -
                security
                F
                license
                -
                quality
                Enables seamless AI integration via Ollama's Deepseek model, providing protocol compliance and automatic configuration for clean AI-driven interactions.
                Last updated -
                1
                Python
              • A
                security
                F
                license
                A
                quality
                A Model Context Protocol server that enables AI assistants to perform real-time web searches, retrieving up-to-date information from the internet via a Crawler API.
                Last updated -
                1
                883
                14
                JavaScript
                • Apple
                • Linux
              • -
                security
                F
                license
                -
                quality
                A simple Model Context Protocol server that enables searching and retrieving relevant documentation snippets from Langchain, Llama Index, and OpenAI official documentation.
                Last updated -
                Python
                • Apple
                • Linux
              • -
                security
                F
                license
                -
                quality
                An integration that enables AI assistants to interact with network data through a standardized protocol, providing AI-ready tools and interfaces for network automation and management.
                Last updated -
                15
                Python

              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/arkeodev/search-engine-with-rag-and-mcp'

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