Model Context Protocol Server

Integrations

  • Integrates with python-dotenv for managing environment variables, facilitating the secure storage and access of API keys and configuration settings.

  • Provides repository access and version control integration through GitHub, allowing users to clone and contribute to the project.

  • Integrates with LangChain to provide agent-based search capabilities and facilitate the creation of agentic AI systems that can search the web and retrieve information.

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. Features
    1. Architecture
      1. Project Structure
        1. Getting Started
          1. Prerequisites
          2. Installation
          3. Usage
          4. Using Ollama (Optional)
        2. Development
          1. License
            1. Acknowledgements

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                This server enables AI systems to integrate with Tavily's search and data extraction tools, providing real-time web information access and domain-specific searches.
                Last updated -
                2
                4,691
                164
                JavaScript
                MIT License
                • Apple
                • Linux
              • A
                security
                A
                license
                A
                quality
                A production-ready Model Context Protocol server that enables language models to leverage AI-powered web scraping capabilities, offering tools for transforming webpages to markdown, extracting structured data, and executing AI-powered web searches.
                Last updated -
                3
                16
                Python
                MIT License
                • Apple
              • -
                security
                F
                license
                -
                quality
                Enables AI assistants to interact with Metabase, providing access to dashboards, questions, databases, and tools for executing queries and viewing data through natural language.
                Last updated -
                JavaScript
                • Apple
              • -
                security
                A
                license
                -
                quality
                This server implementation allows AI assistants to interact with Asana's API, enabling users to manage tasks, projects, workspaces, and comments through natural language requests.
                Last updated -
                65
                TypeScript
                MIT License

              View all related MCP servers

              ID: iqudnbc9bd