context_mcp/
lib.rs

1//! # Context MCP Server
2//!
3//! A Model Context Protocol (MCP) server for context storage, text-based retrieval,
4//! and temporal tracking.
5//!
6//! ## Features
7//!
8//! - **Multi-tier Storage**: In-memory LRU cache with optional sled disk persistence
9//! - **Temporal Tracking**: Timestamps, age tracking, and time-based filtering
10//! - **Text-Based Retrieval**: CPU-optimized parallel text matching and scoring
11//! - **Screening Status**: Fields for tracking security screening state (no active integration)
12//! - **MCP Protocol**: JSON-RPC server with HTTP/WebSocket and stdio transports
13//!
14//! ## Architecture
15//!
16//! ```text
17//! ┌─────────────────┐    ┌──────────────────┐    ┌─────────────────┐
18//! │   MCP Client    │    │  JSON-RPC Server │    │ Storage Layer   │
19//! │                 │    │                  │    │                 │
20//! │ • HTTP/WS       │◄──►│ • Store/Retrieve │◄──►│ • In-Memory LRU │
21//! │ • stdio         │    │ • Query/Filter   │    │ • Sled (opt)    │
22//! │ • curl/tools    │    │ • Text Matching  │    │ • Indexes       │
23//! └─────────────────┘    └──────────────────┘    └─────────────────┘
24//! ```
25
26pub mod context;
27pub mod embeddings;
28pub mod error;
29pub mod protocol;
30pub mod rag;
31#[cfg(feature = "server")]
32pub mod server;
33pub mod storage;
34pub mod temporal;
35pub mod tools;
36
37pub use context::{Context, ContextId, ContextMetadata};
38pub use error::{ContextError, Result};
39#[cfg(feature = "server")]
40pub use server::{McpServer, ServerConfig};
41pub use storage::{ContextStore, StorageConfig};
42pub use temporal::TemporalQuery;