Skip to content

TheArchitectit/RAD-SEARCH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAD-SEARCH

Rust AI-powered Distributed SEARCH - An enterprise-grade MCP web search server with semantic caching and RAG integration.

Features

  • 🔍 Multiple Search Providers - DuckDuckGo, Brave Search, Synthetic Search with automatic failover
  • Weighted Round-Robin - Intelligent load distribution across providers
  • 🧠 Semantic Caching - RAG-style similarity search on cached results using embeddings
  • 🔄 Circuit Breakers - Enterprise resilience with automatic provider health tracking
  • 📊 Self-Diagnosing Observability - MCP tools for health, stats, and cache management
  • 🔒 Security First - SSRF protection, prompt injection detection, secure key handling

Quick Start

Installation

git clone https://github.com/TheArchitectit/RAD-SEARCH.git
cd RAD-SEARCH
cargo build --release

Configuration

Add to your MCP client config (e.g., Claude Desktop config.json):

{
  "mcpServers": {
    "rad-search": {
      "command": "/path/to/rad-search/target/release/rad-search",
      "env": {
        "RUST_LOG": "info"
      }
    }
  }
}

Available MCP Tools

Tool Description
web_search Search the web with automatic provider fallback
search_similar Find semantically similar cached results (RAG)
search_news News-focused search with freshness filters
search_cached Cache-only search (no external API calls)
get_cache_stats Cache hit rate, size, and health
cache_clear Clear cache entries
cache_migrate Run schema migrations
get_provider_status Provider health and circuit breaker state
get_server_stats Server metrics (latency, throughput)

Architecture

RAD-SEARCH uses hexagonal architecture (ports and adapters) for clean separation:

src/
├── domain/         # Core business logic (no external dependencies)
├── application/    # Use case orchestration
├── ports/          # Trait definitions (interfaces)
├── adapters/       # External integrations
│   ├── mcp/        # MCP protocol and tools
│   ├── providers/  # Search provider implementations
│   ├── cache/      # SQLite/PostgreSQL backends
│   ├── embeddings/ # Ollama/OpenAI embeddings
│   └── circuit_breaker/
└── infrastructure/ # Cross-cutting concerns

Configuration

Environment Variables

Variable Description Default
RUST_LOG Log level info
RAD_SEARCH_CACHE_PATH Cache database path ./cache.db
RAD_SEARCH_OLLAMA_ENDPOINT Ollama API endpoint http://localhost:11434

Embedding Providers

Ollama (default):

{
  "embedding_provider": "ollama",
  "embedding_model": "nomic-embed-text"
}

OpenAI:

{
  "embedding_provider": "openai",
  "embedding_model": "text-embedding-3-small",
  "openai_api_key": "sk-..."
}

Performance Targets

Metric Target
p99 latency (cache hit) < 10ms
p99 latency (cache miss) < 500ms
Memory (resident) < 256MB
Cache hit ratio > 60%

Development

# Run tests
cargo test

# Run with debug logging
RUST_LOG=debug cargo run

# Lint
cargo clippy -- -D warnings

# Format
cargo fmt

License

BSD 3-Clause License - see LICENSE for details.

Contributing

Contributions are welcome! Please read the documentation before making changes:


☕ Support This Project

Help keep this project going — use a referral link below and both of us get credits!

Service Your Bonus Details Referral Code
Neuralwatt $10 in credits Spend $10+ → you get $10, we get $20 NW-ROGER-ET3Y
Synthetic $10 in credits Subscribe → both get $10 credit UAWqkKQQLFkzMkY

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages