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、模型上下文协议 (MCP)、检索增强生成 (RAG) 和 Ollama,创建了一个能够搜索网络、检索信息并提供相关答案的代理 AI 系统。
特征
- 使用 Exa API 的 Web 搜索功能
- 使用 FireCrawl 检索 Web 内容
- RAG(检索增强生成)用于提取更多相关信息
- 用于标准化工具调用的 MCP(模型上下文协议)服务器
- 通过 Ollama 支持本地 LLM,并通过 OpenAI 支持基于云的 LLM
- 灵活的架构支持直接搜索、基于代理的搜索或服务器模式
- 全面的错误处理和优雅的回退
- 带有类型提示的 Python 3.13+
- 异步处理以实现高效的 Web 操作
建筑学
该项目集成了几个关键组件:
- 搜索模块:使用 Exa API 搜索网页并使用 FireCrawl 检索内容
- RAG 模块:嵌入文档、对文档进行分块,并将其存储在 FAISS 矢量存储中
- MCP 服务器:提供工具调用的标准化协议
- 代理:基于 LangChain 的代理,使用搜索和 RAG 功能
项目结构
入门
先决条件
- Python 3.13+
- 诗歌(可选,用于发展)
- Exa 和 FireCrawl 的 API 密钥
- (可选)本地安装 Ollama
- (可选)OpenAI API 密钥
安装
- 克隆存储库
- 安装依赖项
- 创建一个
.env
文件(使用 docs/env_template.md 作为参考)
用法
该应用程序有三种主要操作模式:
1. 直接搜索模式(默认)
2.代理模式
3. MCP 服务器模式
您还可以指定自定义主机和端口:
使用 Ollama(可选)
要使用 Ollama 进行本地嵌入和 LLM 功能:
- 安装 Ollama: https://ollama.ai/
- 拉取模型:
- 在
.env
文件中设置适当的环境变量:
发展
该项目遵循以下最佳实践:
- 代码格式:Black 和 isort 以实现一致的代码风格
- 类型检查:mypy 用于静态类型检查
- Linting :flake8 确保代码质量
- 测试:pytest 用于单元和集成测试
- 环境管理:python-dotenv 用于管理环境变量
- 日志记录:结构化日志记录到控制台和文件
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
致谢
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
提供工具调用的标准化协议,使AI系统能够通过与LangChain、RAG和Ollama的集成来搜索网络、检索信息并提供相关答案。
Related MCP Servers
- AsecurityAlicenseAqualityThis 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 -24,691164JavaScriptMIT License
- AsecurityAlicenseAqualityA 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 -316PythonMIT License
- -securityFlicense-qualityEnables 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
- -securityAlicense-qualityThis 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 -65TypeScriptMIT License