context_mcp/
lib.rs

1//! # Context MCP Server
2//!
3//! A Model Context Protocol (MCP) server for context management, RAG processing,
4//! and temporal reasoning. Inspired by memory-gate patterns for dynamic learning layers.
5//!
6//! ## Features
7//!
8//! - **Multi-tier Storage**: In-memory (LRU), cache, and disk persistence
9//! - **Temporal Reasoning**: Timestamps and age tracking for context relevance
10//! - **RAG Processing**: CPU-optimized retrieval-augmented generation support
11//! - **Safe Input Handling**: Integrates with security-mcp for screened inputs
12//! - **MCP Protocol**: Full compatibility with VS Code, Copilot, and other MCP clients
13//!
14//! ## Architecture
15//!
16//! ```text
17//! ┌─────────────────┐    ┌──────────────────┐    ┌─────────────────┐
18//! │   MCP Client    │    │  Context Gateway │    │ Storage Layer   │
19//! │                 │    │                  │    │                 │
20//! │ • VS Code       │◄──►│ • Store/Retrieve │◄──►│ • In-Memory LRU │
21//! │ • Copilot       │    │ • Temporal Query │    │ • Sled Disk DB  │
22//! │ • CLI Tools     │    │ • RAG Processing │    │ • Vector Index  │
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;