Expand description
§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
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
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:
Re-exports§
pub use cache::SearchCache;pub use server::DaedraServer;pub use server::ServerConfig;pub use server::TransportType;pub use types::ContentType;pub use types::DaedraError;pub use types::DaedraResult;pub use types::SafeSearchLevel;pub use types::SearchArgs;pub use types::SearchOptions;pub use types::SearchResponse;pub use types::SearchResult;pub use types::VisitPageArgs;
Modules§
- cache
- Caching infrastructure for Daedra.
- server
- MCP server implementation for Daedra.
- tools
- Tool implementations for Daedra.
- types
- Common types and data structures used throughout Daedra.
Constants§
- SERVER_
DESCRIPTION - Server description
- SERVER_
NAME - Server name for MCP protocol
- VERSION
- Crate version