memory-mcp
Memory MCP Server
Interacts with and troubleshoot the Memory Model Context Protocol (MCP) server for the self-learning memory system.
Quick Reference
- Tools - Complete MCP tools reference (query_memory, analyze_patterns, etc.)
- Configuration - .mcp.json structure and environment variables
- Validation - MCP Inspector validation workflow
- Troubleshooting - Common issues and solutions
- Best Practices - Tool usage, configuration, and testing guidelines
- Token Optimization - Reduce token usage by 80-85%
When to Use
- Starting or configuring the memory-mcp server
- Using MCP tools for memory retrieval and pattern analysis
- Validating the MCP server implementation
- Debugging MCP server issues
- Testing MCP tools using the MCP inspector
- Understanding MCP configuration and environment variables
MCP Server Overview
The memory-mcp server exposes episodic memory functionality through the Model Context Protocol:
- Query past experiences and learned patterns
- Analyze successful strategies from historical episodes
- Execute code in a secure sandbox environment
- Perform advanced statistical and predictive analysis
- Monitor server health and metrics
Location: ./target/release/memory-mcp-server
Configuration: .mcp.json
Transport: stdio (Standard Input/Output)
Available MCP Tools
| Tool | Purpose |
|---|---|
query_memory |
Query episodic memory for relevant past experiences |
analyze_patterns |
Analyze patterns from past episodes |
advanced_pattern_analysis |
Statistical analysis, predictive modeling |
execute_agent_code |
Execute TypeScript/JavaScript in sandbox |
health_check |
Check server health status |
get_metrics |
Get comprehensive monitoring metrics |
See tools.md for detailed tool documentation and best-practices.md for usage guidelines.
Starting the Server
# Build
cargo build --release --bin memory-mcp-server
# Run directly
export TURSO_DATABASE_URL="file:./data/memory.db"
./target/release/memory-mcp-server
# Run via MCP Inspector for testing
npx -y @modelcontextprotocol/inspector ./target/release/memory-mcp-server
See configuration.md for full environment setup and validation.md for MCP Inspector workflow.
More from d-o-hub/rust-self-learning-memory
loop-agent
Execute workflow agents iteratively for refinement and progressive improvement until quality criteria are met. Use when tasks require repetitive refinement, multi-iteration improvements, progressive optimization, or feedback loops until convergence.
51web-search-researcher
Research topics using web search and content fetching to find accurate, current information. Use when you need modern information, official documentation, best practices, technical solutions, or comparisons beyond your training data.
46perplexity-researcher-reasoning-pro
Highest level of research and reasoning capabilities for complex decision-making with significant consequences, strategic planning, technical architecture decisions, multi-stakeholder problems, or high-complexity troubleshooting requiring expert-level judgment and sophisticated reasoning chains. Prioritizes actively maintained repositories and validates website sources for 2025 relevance.
44context-retrieval
Retrieve relevant episodic context from memory for informed decision-making. Use when you need past episodes, patterns, or solutions to similar tasks.
44rust-code-quality
Perform comprehensive Rust code quality reviews against best practices for async Rust, error handling, testing, and project structure
43codebase-analyzer
Analyze implementation details, trace data flow, explain technical workings, locate files, and consolidate codebases. Use when you need to understand HOW code works, find file locations, or assess technical debt.
40