Dear Diary can be used as a library in addition to being run as a standalone
MCP server. The following types are exported from the dear_diary_mcp crate:
`DiaryServer`
The main MCP server type. Create an instance with a Qdrant connector and settings:
use dear_diary_mcp::DiaryServer;
use dear_diary_config::Settings;
use dear_diary_qdrant::QdrantConnectorImpl;
use rmcp::ServiceExt;
let settings = Settings::from_env()?;
let connector = QdrantConnectorImpl::new(...)?;
let server = DiaryServer::new(connector, settings);
server.serve(rmcp::transport::stdio()).await?;
`McpServerError`
Error type for server operations, including:
MissingCollectionName— No collection specified, and no default configuredInvalidFilter— Filter parsing failed or filters not enabledConnectionError— Failed to connect to QdrantStoreError— Failed to store entrySearchError— Failed to search entries
Request types
StoreRequest— Parameters for theqdrant_storetoolFindRequest— Parameters for theqdrant_findtool