🔍 Daedra
Daedra is a high-performance web search and research Model Context Protocol (MCP) server written in Rust. It provides web search and page fetching capabilities that can be used with AI assistants like Claude.
Features
- 🔎 Web Search: Search the web using DuckDuckGo with customizable options
- 📄 Page Fetching: Extract and convert web page content to Markdown
- 🚀 High Performance: Built in Rust with async I/O and connection pooling
- 💾 Caching: Built-in response caching for improved performance
- 🔌 Dual Transport: Support for both STDIO and HTTP (SSE) transports
- 📦 Library & CLI: Use as a Rust library or standalone command-line tool
Installation
From crates.io
From source
Using Cargo
Add to your Cargo.toml:
[]
= "0.1"
Quick Start
As an MCP Server
STDIO Transport (for Claude Desktop, Cursor, etc.)
Add to your Claude Desktop configuration (claude_desktop_config.json):
Note: The
--quietflag is recommended for MCP clients to suppress log output. Without it, logs are written to stderr which some clients may display.
#### SSE Transport (HTTP)
```bash
daedra serve --transport sse --port 3000 --host 127.0.0.1
As a CLI Tool
Search the web
# Basic search
# With options
# Output as JSON
Fetch a webpage
# Fetch and extract content
# Fetch with a specific selector
# Output as JSON
Server information
Configuration check
As a Rust Library
use ;
use ;
use ;
// Start an MCP server
async
// Or use tools directly
async
async
MCP Tools
search_duckduckgo
Search the web using DuckDuckGo.
Input Schema:
Options:
region: Search region (e.g.,us-en,wt-wtfor worldwide)safe_search:OFF,MODERATE, orSTRICTnum_results: Number of results (1-50)time_range: Time filter (d=day,w=week,m=month,y=year)
visit_page
Fetch and extract content from a web page.
Input Schema:
Options:
url: URL to fetch (required)selector: CSS selector for specific content (optional)include_images: Include image references (default: false)
Configuration
Environment Variables
RUST_LOG: Set logging level (debug,info,warn,error)
CLI Options
daedra serve [OPTIONS]
Options:
-t, --transport <TRANSPORT> Transport type [default: stdio] [possible values: stdio, sse]
-p, --port <PORT> Port for SSE transport [default: 3000]
--host <HOST> Host to bind to [default: 127.0.0.1]
--no-cache Disable result caching
--cache-ttl <SECONDS> Cache TTL in seconds [default: 300]
-v, --verbose Enable verbose output (debug logging)
-q, --quiet Disable all logging output
-f, --format <FORMAT> Output format [default: pretty] [possible values: pretty, json, json-compact]
--no-color Disable colored output
Note: For stdio transport, logs are automatically routed to stderr to prevent corruption of the JSON-RPC stream. Use
--quietto disable logging entirely.
Architecture
┌─────────────────────────────────────────────────────────────┐
│ CLI Binary │
│ (clap argument parsing, colored output, TUI) │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Library (daedra) │
├─────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Server │ │ Tools │ │ Cache │ │
│ │ (rmcp MCP) │ │ (search/ │ │ (moka) │ │
│ │ │ │ fetch) │ │ │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
├─────────────────────────────────────────────────────────────┤
│ Transport Layer: STDIO | SSE (HTTP) │
└─────────────────────────────────────────────────────────────┘
Performance
Daedra is designed for high performance:
- Async I/O: Built on Tokio for efficient async operations
- Connection Pooling: HTTP connections are pooled and reused
- Caching: Results are cached to avoid redundant requests
- Concurrent Processing: Parallel search execution support
- Efficient Parsing: Fast HTML parsing with the
scrapercrate
Development
Prerequisites
- Rust 1.91 or later
- Cargo
Building
# Debug build
# Release build
Testing
# Run all tests
# Run unit tests only
# Run integration tests (requires network)
# Run with logging
RUST_LOG=debug
Benchmarks
Documentation
# Generate and open documentation
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Code Style
This project uses:
rustfmtfor formattingclippyfor linting
Run before committing:
License
This project is licensed under the MIT License - see the LICENSE file for details.
Related Projects
- rmcp - Rust MCP SDK
- mcp-duckduckresearch - TypeScript inspiration
- DIRMACS - Parent organization
Made with ❤️ by DIRMACS Global Services