Expand description
MCP server for memory integration
This module provides the MCP (Model Context Protocol) server that integrates the self-learning memory system with memory queries and pattern analysis.
§Features
- Tool definitions for memory queries and pattern analysis
- Progressive tool disclosure based on usage patterns
- Integration with SelfLearningMemory system
- Execution statistics and monitoring
§Example
use do_memory_mcp::server::MemoryMCPServer;
use do_memory_mcp::types::SandboxConfig;
use do_memory_core::SelfLearningMemory;
use std::sync::Arc;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let memory = Arc::new(SelfLearningMemory::new());
let server = MemoryMCPServer::new(SandboxConfig::default(), memory).await?;
// List available tools
let tools = server.list_tools().await;
println!("Available tools: {}", tools.len());
Ok(())
}Modules§
- audit
- Audit logging module
- cache_
warming - This module contains cache warming configuration and methods for pre-loading episodes, patterns, and query patterns to improve initial query performance.
- rate_
limiter - Rate limiter for MCP server
- tool_
definitions - Basic tool definitions for the MCP server
- tool_
definitions_ extended - Extended tool definitions for episodes and batch operations.
- tools
- This module contains all the tool execution methods for the MemoryMCPServer, organized into focused submodules for maintainability.
Structs§
- MemoryMCP
Server - MCP server for memory integration