Memory MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MEMORY_MCP_DB_PATH | No | SQLite database location | ~/.memory-mcp/memory.db |
| MEMORY_MCP_MAX_TAGS | No | Max tags per memory | 20 |
| MEMORY_MCP_DEMOTION_DAYS | No | Days without access before demotion | 14 |
| MEMORY_MCP_EMBEDDING_DIM | No | Embedding vector dimension (must match model) | 384 |
| MEMORY_MCP_MINING_ENABLED | No | Enable pattern mining | true |
| MEMORY_MCP_EMBEDDING_MODEL | No | Sentence transformer model | sentence-transformers/all-MiniLM-L6-v2 |
| MEMORY_MCP_MAX_RECALL_LIMIT | No | Max results per recall query | 100 |
| MEMORY_MCP_LOG_RETENTION_DAYS | No | Days to retain output logs | 7 |
| MEMORY_MCP_MAX_CONTENT_LENGTH | No | Max characters per memory/log | 100000 |
| MEMORY_MCP_HOT_CACHE_MAX_ITEMS | No | Maximum items in hot cache | 20 |
| MEMORY_MCP_PROMOTION_THRESHOLD | No | Access count for auto-promotion | 3 |
| MEMORY_MCP_DEFAULT_RECALL_LIMIT | No | Default results per recall | 5 |
| MEMORY_MCP_HIGH_CONFIDENCE_THRESHOLD | No | Threshold for high confidence | 0.85 |
| MEMORY_MCP_DEFAULT_CONFIDENCE_THRESHOLD | No | Minimum similarity for results | 0.7 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| rememberC | Store a new memory. Returns the memory ID. |
| recallA | Semantic search with confidence gating and composite ranking. Modes:
Returns memories with confidence level and hallucination-prevention guidance. |
| recall_with_fallbackA | Recall with automatic fallback through memory types. Tries searching in order: patterns -> project facts -> all types. Stops when min_results are found with medium+ confidence. Use this when you're unsure which memory type contains the answer. |
| recall_by_tagB | Get memories with a specific tag. |
| forgetB | Delete a memory permanently. |
| list_memoriesC | List stored memories with pagination. |
| memory_statsB | Get memory statistics. |
| preview_consolidationA | Preview memory consolidation without making changes. Shows clusters of similar memories that could be merged. Use this before running actual consolidation to review changes. |
| run_consolidationA | Consolidate similar memories by merging near-duplicates. Finds clusters of semantically similar memories and merges them, keeping the most accessed/valuable one as representative. |
| find_contradictionsA | Find memories that may contradict a given memory. Searches for semantically similar memories that could contain conflicting information. High similarity means same topic area, which is where contradictions are likely. Use this after storing a new memory or when validating existing ones. |
| get_contradictionsA | Get all memory pairs marked as contradictions. Returns pairs that have been flagged as containing conflicting information. Use resolve_contradiction to handle these. |
| mark_contradictionA | Mark two memories as contradicting each other. Creates a CONTRADICTS relationship. Use this when you discover that two memories contain conflicting information about the same topic. |
| resolve_contradictionA | Resolve a contradiction by keeping one memory and handling the other. After resolving:
|
| hot_cache_statusA | Show current hot cache contents, stats, and observability metrics. Returns items sorted by hot_score (highest first), along with:
|
| metrics_statusA | Get observability metrics for monitoring and debugging. Returns counters and gauges for key operations:
Useful for debugging performance issues, monitoring usage patterns, and understanding system behavior. |
| promoteA | Manually promote a memory to hot cache for instant recall. |
| demoteA | Remove a memory from hot cache (keeps in cold storage). |
| pinA | Pin a hot cache memory to prevent auto-eviction. Pinned memories stay in hot cache even when space is needed for new items. Only works on memories already in hot cache. |
| unpinA | Unpin a memory, making it eligible for auto-eviction from hot cache. |
| db_maintenanceA | Run database maintenance (vacuum, analyze, auto-demote stale). Compacts the database to reclaim unused space, updates query planner statistics, and demotes stale hot memories (if auto_demote is enabled). |
| run_cleanupA | Run comprehensive cleanup of stale data. Performs all cleanup operations in one call:
Use this periodically to keep the database lean. For just database compaction, use db_maintenance() instead. |
| validate_embeddingsA | Check if the embedding model has changed since database was created. If the model or dimension has changed, existing embeddings may be incompatible and memories may need re-embedding. Returns validation status and details about any mismatches. |
| db_infoA | Get database information including schema version and size. |
| embedding_infoA | Get embedding provider and cache information. |
| audit_historyA | Get recent audit log entries for destructive operations. Shows history of operations like delete_memory, demote, maintenance, unlink_memories, etc. Useful for understanding what changed and when. |
| db_rebuild_vectorsA | Rebuild all memory vectors with the current embedding model. Use this when:
This operation:
Warning: This can take time for large databases. Progress is logged. |
| log_outputC | Log an output for pattern mining. Called automatically or manually. |
| mining_statusB | Show pattern mining statistics. |
| review_candidatesB | Review mined patterns that are ready for promotion. |
| approve_candidateA | Approve a mined pattern, storing it as a memory and optionally promoting to hot cache. |
| reject_candidateB | Reject a mined pattern, removing it from candidates. |
| bulk_reject_candidatesA | Bulk reject multiple mining candidates at once. Provide either pattern_ids (list of specific IDs) OR pattern_type_prefix (e.g., 'entity_' to reject all entity extractions). |
| run_miningA | Run pattern mining on recent output logs. Extracts patterns (imports, facts, commands, code) from logged outputs and updates the mined_patterns table with occurrence counts. Mining is project-scoped: only logs from the current project are processed. |
| access_patternsA | Get learned access patterns for predictive caching. When memory_id is provided, shows patterns from that specific memory. Otherwise, shows all learned patterns across all memories. Requires MEMORY_MCP_PREDICTIVE_CACHE_ENABLED=true. |
| predict_nextA | Predict which memories might be needed next based on access patterns. Uses learned Markov chain of access sequences to predict what memories typically follow after accessing the given memory. Requires MEMORY_MCP_PREDICTIVE_CACHE_ENABLED=true. |
| warm_cacheA | Pre-warm hot cache with predicted next memories. Promotes predicted memories to hot cache for instant recall. Only promotes memories that aren't already in hot cache. Requires MEMORY_MCP_PREDICTIVE_CACHE_ENABLED=true. |
| predictive_cache_statusA | Get status of the predictive hot cache system. Shows whether predictive caching is enabled, configuration, and learned pattern statistics. |
| link_memoriesA | Create a typed relationship between two memories. Use this to build a knowledge graph connecting related concepts. Relationships are directional: from_memory -[relation_type]-> to_memory. Examples:
|
| unlink_memoriesA | Remove relationship(s) between two memories. If relation_type is specified, only removes that specific relationship. If not specified, removes all relationships between the two memories. |
| get_related_memoriesA | Get memories related to a given memory. Returns related memories along with their relationship information. Use this to explore the knowledge graph around a specific concept. |
| relationship_statsC | Get statistics about memory relationships in the knowledge graph. |
| mark_memory_usedA | Mark a memory as actually used/helpful after recall. Call this when a recalled memory was useful in your response. Helps improve ranking by tracking which memories are valuable. |
| retrieval_quality_statsA | Get retrieval quality statistics. Shows which memories are frequently retrieved and actually used. Helps identify high-value and low-utility memories. |
| seed_from_textA | Seed memories from text content. Parses the content into individual memories (one per paragraph or list item) and stores them. Useful for initial setup or bulk import. Content is split on:
|
| seed_from_fileA | Seed memories from a file. Reads the file and extracts memories based on content structure. Supports markdown files (splits on headers and lists) and plain text. Common use: Import from project CLAUDE.md or documentation files. |
| bootstrap_projectA | Bootstrap hot cache from project documentation files. Scans for common project documentation files (README.md, CLAUDE.md, etc.), parses them into memories, and optionally promotes to hot cache. This is ideal for quickly populating the hot cache when starting work on a new codebase. Edge cases handled gracefully:
|
| get_sessionsB | Get recent conversation sessions. Sessions track which conversations memories originated from. Use this to see conversation history and navigate to specific sessions. |
| get_sessionC | Get details for a specific session. |
| get_session_memoriesB | Get all memories from a specific conversation session. Use this to explore what was learned during a particular conversation. |
| cross_session_patternsA | Find content patterns appearing across multiple conversation sessions. Useful for identifying frequently-discussed topics that might warrant promotion to hot cache. Patterns appearing in many sessions are likely important project knowledge. Returns patterns sorted by session count and total accesses. |
| set_session_topicA | Set or update the topic for a conversation session. Topics help identify what conversations were about when reviewing session history. Can be auto-detected or manually set. |
| summarize_sessionA | Summarize a session's key decisions, insights, and action items. Groups session memories by semantic category to extract structured knowledge:
Use this before end_session() to review what was captured, or anytime to get a structured view of a conversation's key takeaways. |
| end_sessionA | End a session and consolidate episodic memories. Mirrors human memory consolidation: short-term (episodic) memories that prove valuable get promoted to long-term (semantic) storage. Top episodic memories are selected by salience score (combining importance, trust, access count, and recency). Only memories above the threshold are promoted. Use this at the end of a conversation to preserve valuable learnings. |
| validate_memoryA | Mark a memory as validated/confirmed useful. Increases the memory's trust score and records the reason in the trust history. Use this when you verify that a recalled memory is still accurate and helpful. Reasons and their default boosts:
Trust score is capped at 1.0. |
| invalidate_memoryA | Mark a memory as incorrect or outdated. Decreases the memory's trust score and records the reason in the trust history. Use this when you discover that a recalled memory contains inaccurate or outdated information. Reasons and their default penalties:
Trust score is floored at 0.0. Memories with very low trust will rank lower in recall results due to trust-weighted scoring. |
| get_trust_historyA | Get the trust adjustment history for a memory. Shows all trust changes with reasons, timestamps, and context. Useful for understanding why a memory's trust score evolved. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| promoted_memories_resource | All promoted memories (~20 items) - the backing store for hot cache. Disabled by default. The hot-cache resource (session-aware ~10 items) is the recommended injection. Enable this with MEMORY_MCP_PROMOTED_RESOURCE_ENABLED=true. Contains all frequently-used memories that have been auto-promoted based on access patterns or manually promoted. The hot-cache resource draws from this. If empty and documentation files exist, auto-bootstraps from README.md, CLAUDE.md, etc. Project-aware: If project awareness is enabled, filters to current project plus global memories. |
| hot_cache_resource | Session-aware active memory context - instant recall (0ms). The primary context injection. Provides a compact set (~10 items) of contextually relevant memories: 1. Recently recalled memories (that were actually used) 2. Predicted next memories (from access pattern learning) 3. Top items from promoted memories (to fill remaining slots) This is what "hot cache" means - instantly available, no tool call needed. Semantic clustering groups related items together. Logs injections for feedback loop analysis (7-day retention). |
| project_context_resource | Project-specific memory context for the current git repository. Returns: - Current project ID (from git remote URL) - Project-specific hot cache memories - Recent project activity Use this to understand what memories are associated with the current project. |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/michael-denyer/memory-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server