xiaohongshu
xiaohongshu
memory-mcp
Use and troubleshoot the Memory MCP server for episodic memory retrieval and pattern analysis. Use this skill when working with MCP server tools (query_memory, analyze_patterns, advanced_pattern_analysis), validating the MCP implementation, or debugging MCP server issues.
Full skill instructions
Interact with and troubleshoot the Memory Model Context Protocol (MCP) server for the self-learning memory system.
The memory-mcp server exposes episodic memory functionality through the Model Context Protocol, allowing AI agents to:
Location: ./target/release/memory-mcp-server
Configuration: .mcp.json
Transport: stdio (Standard Input/Output)
Query episodic memory for relevant past experiences and learned patterns.
Parameters:
query (required): Search query describing the task or contextdomain (required): Task domain (e.g., 'web-api', 'data-processing')task_type (optional): Type of task - code_generation, debugging, refactoring, testing, analysis, documentationlimit (default: 10): Maximum number of episodes to retrieveExample:
{
"query": "implement async storage with error handling",
"domain": "rust-backend",
"task_type": "code_generation",
"limit": 5
}
Use when: You need relevant past experiences to inform current work.
Analyze patterns from past episodes to identify successful strategies.
Parameters:
task_type (required): Type of task to analyze patterns formin_success_rate (default: 0.7): Minimum success rate (0.0-1.0)limit (default: 20): Maximum number of patterns to returnExample:
{
"task_type": "debugging",
"min_success_rate": 0.8,
"limit": 10
}
Use when: You want to identify proven successful approaches for a task type.
Perform advanced statistical analysis, predictive modeling, and causal inference on time series data.
Parameters:
analysis_type (required): statistical, predictive, or comprehensivetime_series_data (required): Object mapping variable names to numeric arraysconfig (optional): Analysis configuration
significance_level (default: 0.05): Statistical significance levelforecast_horizon (default: 10): Steps to forecast aheadanomaly_sensitivity (default: 0.5): Anomaly detection sensitivityenable_causal_inference (default: true): Perform causal analysismax_data_points (default: 10000): Maximum data pointsparallel_processing (default: true): Enable parallel processingExample:
{
"analysis_type": "comprehensive",
"time_series_data": {
"latency_ms": [120, 115, 130, 125, 140],
"success_rate": [0.95, 0.98, 0.96, 0.97, 0.99]
},
"config": {
"forecast_horizon": 5,
"anomaly_sensitivity": 0.6
}
}
Use when: You need deep statistical insights and predictions from historical data.
Execute TypeScript/JavaScript code in a secure sandbox environment.
Parameters:
code (required): TypeScript/JavaScript code to executecontext (required): Execution context
task: Task descriptioninput: Input data as JSON objectExample:
{
"code": "function process(data) { return data.map(x => x * 2); } process(context.input.numbers);",
"context": {
"task": "Double all numbers in array",
"input": { "numbers": [1, 2, 3, 4, 5] }
}
}
Note: Only available if WASM sandbox is enabled.
Use when: You need to safely execute user-provided or generated code.
Check the health status of the MCP server and its components.
Parameters: None
Use when: Diagnosing server issues or verifying operational status.
Get comprehensive monitoring metrics and statistics.
Parameters:
metric_type (default: "all"): all, performance, episodes, or systemUse when: Monitoring server performance or gathering operational insights.
{
"mcpServers": {
"memory-mcp": {
"type": "stdio",
"command": "./target/release/memory-mcp-server",
"args": [],
"env": {
"TURSO_DATABASE_URL": "file:/workspaces/feat-phase3/data/memory.db",
"LOCAL_DATABASE_URL": "sqlite:/workspaces/feat-phase3/data/memory.db",
"REDB_CACHE_PATH": "/workspaces/feat-phase3/data/cache.redb",
"REDB_MAX_CACHE_SIZE": "1000",
"MCP_CACHE_WARMING_ENABLED": "true",
"MEMORY_MAX_EPISODES_CACHE": "1000",
"MEMORY_CACHE_TTL_SECONDS": "1800",
"RUST_LOG": "off"
}
}
}
}
cargo build --release --bin memory-mcp-server
# With environment variables
export TURSO_DATABASE_URL="file:./data/memory.db"
export LOCAL_DATABASE_URL="sqlite:./data/memory.db"
export REDB_CACHE_PATH="./data/cache.redb"
export RUST_LOG=info
./target/release/memory-mcp-server
The MCP Inspector is the recommended tool for testing and validation.
npx -y @modelcontextprotocol/inspector ./target/release/memory-mcp-server
This opens a web interface at http://localhost:5173 where you can:
See: https://modelcontextprotocol.io/docs/tools/inspector
Use the MCP Inspector to validate implementation against best practices:
cargo build --release --bin memory-mcp-server
npx -y @modelcontextprotocol/inspector ./target/release/memory-mcp-server
query_memory with various domains/task typesanalyze_patterns with different success ratesadvanced_pattern_analysis with time series datahealth_check returns valid statusget_metrics provides comprehensive dataSymptoms: Process exits immediately or hangs
Checks:
ls -la ./target/release/memory-mcp-serverchmod +x ./target/release/memory-mcp-serverls -la ./data/env | grep -E '(TURSO|REDB|RUST_LOG)'Solutions:
# Rebuild
cargo build --release --bin memory-mcp-server
# Create data directory
mkdir -p ./data
# Set environment variables
export TURSO_DATABASE_URL="file:./data/memory.db"
export LOCAL_DATABASE_URL="sqlite:./data/memory.db"
export REDB_CACHE_PATH="./data/cache.redb"
Symptoms: Tool returns errors or unexpected results
Checks:
RUST_LOG=debugDebug Commands:
# Run with debug logging
RUST_LOG=debug ./target/release/memory-mcp-server
# Check database
sqlite3 ./data/memory.db ".tables"
# Verify cache
ls -lh ./data/cache.redb
Symptoms: Slow responses, timeouts
Checks:
Solutions:
# Adjust cache settings
export REDB_MAX_CACHE_SIZE="2000"
export MEMORY_MAX_EPISODES_CACHE="2000"
# Reduce cache TTL
export MEMORY_CACHE_TTL_SECONDS="900"
# Disable cache warming if startup is slow
export MCP_CACHE_WARMING_ENABLED="false"
Symptoms: Inspector can't connect, stdio communication fails
Checks:
Solutions:
# Kill existing processes
pkill memory-mcp-server
# Verify no zombie processes
ps aux | grep memory-mcp-server
# Restart inspector
npx -y @modelcontextprotocol/inspector ./target/release/memory-mcp-server
✓ DO:
query_memory before starting new tasks to learn from past experienceslimit values to avoid over-retrievingtask_type to get more relevant resultsanalyze_patterns to identify proven strategieshealth_check periodically in productionget_metrics for performance insights✗ DON'T:
✓ DO:
✗ DON'T:
✓ DO:
✗ DON'T:
// Step 1: Query relevant past experiences
const context = await query_memory({
query: "implement REST API with authentication",
domain: "web-api",
task_type: "code_generation",
limit: 5
});
// Step 2: Analyze patterns from successful implementations
const patterns = await analyze_patterns({
task_type: "code_generation",
min_success_rate: 0.8,
limit: 10
});
// Step 3: Use insights to inform implementation
// [Generate code using learned patterns]
// Step 1: Collect metrics over time
const metrics = await get_metrics({
metric_type: "performance"
});
// Step 2: Perform advanced analysis
const analysis = await advanced_pattern_analysis({
analysis_type: "comprehensive",
time_series_data: {
latency_ms: metrics.latency_history,
success_rate: metrics.success_history
},
config: {
forecast_horizon: 10,
enable_causal_inference: true
}
});
// Step 3: Use predictions to optimize
// [Apply optimizations based on forecasts]
.mcp.jsonmemory-mcp/src/bin/server.rsmemory-mcp/src/server.rsThe memory-mcp skill helps you:
Always validate using the MCP Inspector before deploying to production.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience