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.
Search Engine with RAG and MCP
A powerful search engine that combines LangChain, Model Context Protocol (MCP), Retrieval-Augmented Generation (RAG), and Ollama to create an agentic AI system capable of searching the web, retrieving information, and providing relevant answers.
Features
- Web search capabilities using the Exa API
- Web content retrieval using FireCrawl
- RAG (Retrieval-Augmented Generation) for more relevant information extraction
- MCP (Model Context Protocol) server for standardized tool invocation
- Support for both local LLMs via Ollama and cloud-based LLMs via OpenAI
- Flexible architecture supporting direct search, agent-based search, or server mode
- Comprehensive error handling and graceful fallbacks
- Python 3.13+ with type hints
- Asynchronous processing for efficient web operations
Architecture
This project integrates several key components:
- Search Module: Uses Exa API to search the web and FireCrawl to retrieve content
- RAG Module: Embeds documents, chunks them, and stores them in a FAISS vector store
- MCP Server: Provides a standardized protocol for tool invocation
- Agent: LangChain-based agent that uses the search and RAG capabilities
Project Structure
Getting Started
Prerequisites
- Python 3.13+
- Poetry (optional, for development)
- API keys for Exa and FireCrawl
- (Optional) Ollama installed locally
- (Optional) OpenAI API key
Installation
- Clone the repository
- Install dependencies
- Create a
.env
file (use docs/env_template.md as a reference)
Usage
The application has three main modes of operation:
1. Direct Search Mode (Default)
2. Agent Mode
3. MCP Server Mode
You can also specify custom host and port:
Using Ollama (Optional)
To use Ollama for local embeddings and LLM capabilities:
- Install Ollama: https://ollama.ai/
- Pull a model:
- Set the appropriate environment variables in your
.env
file:
Development
This project follows these best practices:
- Code formatting: Black and isort for consistent code style
- Type checking: mypy for static type checking
- Linting: flake8 for code quality
- Testing: pytest for unit and integration tests
- Environment Management: python-dotenv for managing environment variables
- Logging: Structured logging to both console and file
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
- LangChain for the agent framework
- Model Context Protocol for the standardized tool invocation
- Ollama for local LLM capabilities
- Exa for web search capabilities
- FireCrawl for web content retrieval
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Provides a standardized protocol for tool invocation, enabling an AI system to search the web, retrieve information, and provide relevant answers through integration with LangChain, RAG, and 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