1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//! # Daedra - Web Search and Research MCP Server
//!
//! Daedra is a high-performance Model Context Protocol (MCP) server that provides
//! web search and research capabilities. It is designed to be used as both a library
//! for programmatic access and as a standalone CLI binary.
//!
//! ## Features
//!
//! - **Web Search**: Search the web using DuckDuckGo with customizable options
//! - **Page Fetching**: Extract and convert web page content to Markdown
//! - **Caching**: Built-in response caching for improved performance
//! - **Dual Transport**: Support for both STDIO and HTTP (SSE) transports
//! - **Concurrent Processing**: Parallel processing of search results
//!
//! ## Quick Start
//!
//! ### As a Library
//!
//! ```rust,no_run
//! use daedra::{DaedraServer, ServerConfig, TransportType};
//!
//! #[tokio::main]
//! async fn main() -> anyhow::Result<()> {
//! let config = ServerConfig::default();
//! let server = DaedraServer::new(config)?;
//! server.run(TransportType::Stdio).await?;
//! Ok(())
//! }
//! ```
//!
//! ### Direct Tool Usage
//!
//! ```rust,no_run
//! use daedra::{SearchArgs, tools::search};
//!
//! #[tokio::main]
//! async fn main() -> anyhow::Result<()> {
//! let args = SearchArgs {
//! query: "Rust programming".to_string(),
//! options: None,
//! };
//! let results = search::perform_search(&args).await?;
//! println!("{:?}", results);
//! Ok(())
//! }
//! ```
//!
//! ## Architecture
//!
//! The crate is organized into several modules:
//!
//! - [`server`]: MCP server implementation with transport handling
//! - [`tools`]: Individual tool implementations (search, fetch, etc.)
//! - [`types`]: Common types and schemas
//! - [`cache`]: Caching infrastructure for performance optimization
// Re-export commonly used items at crate root
pub use SearchCache;
pub use ;
pub use ;
/// Crate version
pub const VERSION: &str = env!;
/// Server name for MCP protocol
pub const SERVER_NAME: &str = "daedra";
/// Server description
pub const SERVER_DESCRIPTION: &str = "Web search and research MCP server";