Web Rag Fusion
БесплатноНе проверенA powerful RAG (Retrieval-Augmented Generation) server with dynamic embedding provider support via the Model Context Protocol (MCP)
Описание
A powerful RAG (Retrieval-Augmented Generation) server with dynamic embedding provider support via the Model Context Protocol (MCP)
README
🌍 中文文档 | English
A powerful RAG (Retrieval-Augmented Generation) server with dynamic embedding provider support via the Model Context Protocol (MCP). Switch between OpenAI and DashScope/Qwen providers at runtime without code changes.
✨ Key Features
- 🔄 Dynamic Provider Switching - Runtime switching between OpenAI and DashScope
- 🏗️ Multi-Index Support - Different providers for different document collections
- 🛡️ Robust Error Handling - Automatic fallback and comprehensive error recovery
- 🌐 Web Search Integration - Enhanced search via Perplexity/Exa APIs
- ⚙️ Environment-Based Config - Zero-code configuration changes
- 🚀 Production Ready - Rate limiting, metrics, and monitoring
🚀 Quick Start
1. Installation
git clone https://github.com/Renewdxin/multi-provider-rag.git
cd multi-provider-rag
pip install -r requirements.txt
2. Configuration
Copy and configure environment variables:
cp .env.example .env
# Edit .env with your API keys
Basic OpenAI Setup:
EMBED_PROVIDER=openai
OPENAI_API_KEY=your_openai_key_here
EMBEDDING_MODEL=text-embedding-3-small
DashScope/Qwen Setup:
EMBED_PROVIDER=dashscope
DASHSCOPE_API_KEY=your_dashscope_key_here
EMBEDDING_MODEL=text-embedding-v1
OPENAI_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
3. Run the Server
python -m src.mcp_server
🔧 Usage Examples
Dynamic Provider Selection
from src.embedding_provider import get_embed_model
# Use OpenAI
openai_model = get_embed_model("openai")
# Use DashScope
dashscope_model = get_embed_model("dashscope", model="text-embedding-v1")
# Environment-based selection
embed_model = get_embed_model_from_env() # Uses EMBED_PROVIDER
Multiple Indexes with Different Providers
from src.embedding_provider import create_index_with_provider
# Create specialized indexes
docs_index = create_index_with_provider("openai", documents)
code_index = create_index_with_provider("dashscope", code_docs)
🌐 Supported Providers
| Provider | Models | Endpoint | Features |
|---|---|---|---|
| OpenAI | text-embedding-ada-002text-embedding-3-smalltext-embedding-3-large |
https://api.openai.com/v1 |
High quality, global availability |
| DashScope | text-embedding-v1text-embedding-v2 |
https://dashscope.aliyuncs.com/compatible-mode/v1 |
China-optimized, cost-effective |
⚙️ Configuration
Environment Variables
| Variable | Description | Default | Required |
|---|---|---|---|
EMBED_PROVIDER |
Embedding provider (openai/dashscope) |
openai |
No |
EMBEDDING_MODEL |
Model name (provider-specific) | text-embedding-3-small |
No |
OPENAI_API_KEY |
OpenAI API key | - | Yes (for OpenAI) |
DASHSCOPE_API_KEY |
DashScope API key | - | Yes (for DashScope) |
SEARCH_API_KEY |
Perplexity/Exa API key | - | Optional |
VECTOR_STORE_PATH |
Vector database path | ./data/vector_store.db |
No |
Provider Switching
Switch providers instantly by updating environment variables:
# Switch to DashScope
export EMBED_PROVIDER=dashscope
export DASHSCOPE_API_KEY=your_key
# Switch to OpenAI
export EMBED_PROVIDER=openai
export OPENAI_API_KEY=your_key
🐳 Docker Deployment
# Build and run
docker-compose up -d
# With custom configuration
docker-compose -f docker-compose.yml up -d
📖 API Reference
MCP Tools
search_knowledge_base- Search local vector databaseweb_search- Search web via Perplexity/Exasmart_search- Hybrid local + web searchadd_document- Add documents to knowledge base
Python API
# Core embedding functions
from src.embedding_provider import (
get_embed_model,
get_embed_model_from_env,
create_index_with_provider,
validate_provider_config
)
# RAG engine
from src.llamaindex_processor import RAGEngine
# MCP server
from src.mcp_server import RAGMCPServer
🔍 Provider Validation
Check your provider configuration:
from src.embedding_provider import validate_provider_config
# Validate OpenAI setup
openai_status = validate_provider_config("openai")
print(f"OpenAI ready: {openai_status['valid']}")
# Validate DashScope setup
dashscope_status = validate_provider_config("dashscope")
print(f"DashScope ready: {dashscope_status['valid']}")
🚀 Production Features
- Rate Limiting - Configurable request throttling
- Monitoring - Prometheus metrics integration
- Logging - Structured logging with loguru
- Error Recovery - Automatic provider fallback
- Health Checks - Built-in validation endpoints
📊 Performance
- Provider Switching - Zero downtime switching
- Caching - Intelligent query engine caching
- Batch Processing - Optimized bulk operations
- Memory Efficient - Lazy loading and cleanup
🤝 Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Links
- Documentation: Full documentation
- Releases: GitHub Releases
- Issues: Bug Reports & Feature Requests
⭐ Star History
If this project helps you, please consider giving it a star! ⭐
Built with ❤️ for the AI community
Установить Web Rag Fusion в Claude Desktop, Claude Code, Cursor
unyly install web-rag-fusionСтавит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.
Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh
Или настроить вручную
Выполни в терминале:
claude mcp add web-rag-fusion -- uvx rag-mcp-serverПошаговые гайды: как установить Web Rag Fusion
FAQ
Web Rag Fusion MCP бесплатный?
Да, Web Rag Fusion MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Web Rag Fusion?
Нет, Web Rag Fusion работает без API-ключей и переменных окружения.
Web Rag Fusion — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Web Rag Fusion в Claude Desktop, Claude Code или Cursor?
Открой Web Rag Fusion на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzMCP-Agent
A simple, composable framework to build agents using Model Context Protocol by [LastMile AI](https://www.lastmileai.dev)
автор: lastmile-aiSpring AI MCP Client
Provides auto-configuration for MCP client functionality in Spring Boot applications.
mcp.natoma.ai
A Hosted MCP Platform to discover, install, manage and deploy MCP servers by [Natoma Labs](https://www.natoma.ai)
MCPHub
Website to list high quality MCP servers and reviews by real users. Also provide online chatbot for popular LLM models with MCP server support.
MCP Servers Rating and User Reviews
Website to rate MCP servers, write authentic user reviews, and [search engine for agent & mcp](http://www.deepnlp.org/search/agent)
mkinf
An Open Source registry of hosted MCP Servers to accelerate AI agent workflows.
Compare Web Rag Fusion with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
