memcurve
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@memcurve Remember that I prefer dark mode and concise emails."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π§ MemCurve
Persistent memory for AI assistants β with forgetting curves, decay, and graph clustering.
CortexGraph MCP server. Stores memories as a weighted knowledge graph, decays stale nodes via configurable half-life, clusters related memories, and surfaces the right context at the right time through activation-pattern retrieval.
π§ What Is This?
For non-technical readers: Most AI assistants have no persistent memory β every conversation starts completely blank. MemCurve gives an AI assistant long-term memory that works like human memory: important things are remembered more strongly, rarely-accessed memories fade over time, and related memories are grouped together so that recalling one makes nearby ones more accessible. It exposes this memory system to AI tools via a standard protocol (MCP), so any compatible assistant can use it.
Related MCP server: my-memory-mcp
ποΈ CortexGraph Architecture
MemCurve implements the CortexGraph memory system β a weighted knowledge graph where nodes are memory entities, edges encode semantic relationships, and node weights decay over time according to configurable half-life schedules. Retrieval uses activation spreading: querying one node activates its neighbors with diminishing strength, surfacing contextually related memories.
π¬ Conversation / Tool Call
β
βΌ
π Entity Extraction & Message Analysis
Detects entities, topics, facts, and relationships
worth persisting in the memory graph
β
βΌ
π§ CortexGraph (Weighted Knowledge Graph)
βββ Nodes: memories, facts, entities
βββ Edges: semantic relations + co-occurrence weights
βββ Node weights: decay via half-life schedule
β
βββ β±οΈ Background Decay Process
β Stale memory weights decay exponentially
β GC prunes nodes below activation threshold
β
βββ π Memory Clustering
Related nodes grouped into clusters
for efficient neighborhood retrieval
β
βΌ
π Activation-Pattern Retrieval
Query activates seed nodes, spreads to neighbors
Returns ranked memory context for generation㪠Technical Design
Half-Life Decay β Memory node weights decay exponentially over time: w(t) = wβ Γ (Β½)^(t/Ο) where Ο is the configurable half-life. Frequently accessed memories are "touched" (weight refreshed) on each recall, preventing useful information from decaying. The decay function is calculated by cortexgraph.core.decay.calculate_halflife and runs on a background scheduler.
MCP Tool Surface β CortexGraph exposes memory operations as MCP tools that any compatible AI client can call:
Tool | Purpose |
| Persist a new memory entity to the graph |
| Semantic search over memory nodes |
| Combined graph traversal + semantic search |
| Context-aware memory retrieval based on current conversation |
| Extract entities and facts worth saving from a message |
| Group related memories into topic clusters |
| Merge redundant or contradictory memory nodes |
| Prune decayed nodes below activation threshold |
| Boost a memory node's weight (mark as important) |
| Refresh a node's decay timer without modifying weight |
Activation Spreading β On search_unified, queried seed nodes activate their graph neighbors with weight proportional to edge strength Γ query relevance. This surfaces associated memories without requiring exact semantic match β related context emerges from graph structure.
Security Layer β The server includes secret scanning on config files (should_warn_about_secrets) and enforces secure storage paths (ensure_secure_storage) before starting β preventing accidental exposure of API keys in the memory store.
π Getting Started
git clone https://github.com/nathaniel-gordon/memcurve
cd memcurve
pip install -e .Start the MCP Server
python -m cortexgraphVisualize the Memory Graph
python scripts/visualize_graph.pyConvert to MCP Memory Format
python scripts/convert_to_memory_mcp.pyπ Project Structure
memcurve/
βββ src/cortexgraph/
β βββ server.py # MCP server entrypoint & tool registration
β βββ context.py # Shared db & mcp context
β βββ config.py # Half-life and decay configuration
β βββ background.py # Background decay scheduler
β βββ performance.py # Performance monitoring
β βββ activation/ # Activation spreading & entity extraction
β β βββ detectors.py
β β βββ entity_extraction.py
β β βββ patterns.py
β βββ tools/ # All MCP tool implementations
β βββ security/ # Secret scanning & secure storage enforcement
βββ scripts/Built by Nathaniel Gordon
Available Tools
17 toolsanalyze_for_recallA
Analyze message for recall/search intent.
Args: message: User message text.
Returns: Dict with: should_search, confidence, suggested_query, suggested_tags, suggested_entities, reasoning, phrase_signals.
Raises: ValueError: Invalid input.
Inputs: message (required). Returns: object
analyze_messageB
Analyze message for memory-worthy content.
Args: message: User message text.
Returns: Dict with: should_save, confidence, suggested_entities, suggested_tags, suggested_strength, reasoning, phrase_signals.
Raises: ValueError: Invalid input.
Inputs: message (required). Returns: object
auto_recall_process_messageC
Automatically recall and reinforce memories related to message topics.
Args: message: User message to analyze (non-empty string).
Returns: Dict with success, enabled, topics_found, memories_found, memories_reinforced, mode, and message.
Raises: ValueError: If message is empty or invalid.
Inputs: message (required). Returns: object
backfill_embeddingsA
Generate embeddings for memories that lack them.
Args: model: Model name (default: all-MiniLM-L6-v2). limit: Max memories to process (1-10k, None=all). force: Regenerate existing embeddings. dry_run: Preview only.
Returns: Dict with: success, processed, errors, model, total_memories, memories_without_embeddings, message.
Raises: ValueError: Invalid limit. ImportError: sentence-transformers not installed.
Inputs: force, limit, model, dry_run. Returns: object
cluster_memoriesA
Cluster similar memories or find duplicates.
Args: strategy: Clustering strategy (default "similarity"). threshold: Similarity threshold (0.0-1.0, uses config default if None). max_cluster_size: Max cluster size (1-100, uses config default if None). find_duplicates: Find duplicate pairs instead of clustering. duplicate_threshold: Duplicate threshold (0.0-1.0, uses config default if None).
Returns: Dict with clusters or duplicates list, scores, suggested_action.
Raises: ValueError: Invalid threshold or max_cluster_size.
Inputs: strategy, threshold, find_duplicates, max_cluster_size, +1 more. Returns: object
consolidate_memoriesA
Merge or link similar memories algorithmically.
Args: cluster_id: Cluster UUID to act on (required unless auto_detect=True). mode: "preview" (no changes), "apply" (merge), or "link" (relations only). auto_detect: Find high-cohesion clusters automatically. cohesion_threshold: Minimum cohesion (0.0-1.0).
Returns: Dict with success, mode, consolidated clusters, and results.
Raises: ValueError: If cluster_id invalid or cohesion_threshold out of range.
Inputs: mode, cluster_id, auto_detect, cohesion_threshold. Returns: object
create_relationA
Link two memories with typed relationship.
Args: from_memory_id: Source memory UUID. to_memory_id: Target memory UUID. relation_type: Type (related, causes, supports, contradicts, has_decision, consolidated_from). strength: Relation strength (0.0-1.0). metadata: Optional metadata dict.
Returns: Dict with relation_id, from, to, type, strength.
Raises: ValueError: Invalid UUID or relation type.
Inputs: to_memory_id (required), relation_type (required), from_memory_id (required), metadata, +1 more. Returns: object
gcA
Remove or archive low-scoring memories.
Args: dry_run: Preview without removing. archive_instead: Archive instead of deleting. limit: Max memories to process (1-10,000).
Returns: Dict with removed_count, archived_count, freed_score_sum, memory_ids.
Raises: ValueError: Invalid limit range.
Inputs: limit, dry_run, archive_instead. Returns: object
get_performance_metricsA
Get current performance metrics.
Returns: Dict with: operation stats, counts, timings.
Inputs: no named parameters. Returns: object
open_memoriesA
Retrieve specific memories by IDs with detailed information.
Args: memory_ids: Single ID or list of IDs (max 100). include_relations: Include outgoing/incoming relations. include_scores: Include decay scores and age. page: Page number (1-indexed). page_size: Memories per page (max 100).
Returns: Dict with memories, not_found IDs, and pagination metadata.
Raises: ValueError: If memory ID invalid or list exceeds max length.
Inputs: memory_ids (required), page, page_size, include_scores, +1 more. Returns: object
promote_memoryA
Promote high-value memories to long-term storage.
Args: memory_id: Memory UUID to promote. auto_detect: Detect promotion candidates automatically. dry_run: Preview without promoting. target: Storage format ("obsidian"). force: Promote even if criteria not met.
Returns: Dict with candidates, promoted_ids, and statistics.
Raises: ValueError: If memory_id invalid or target unsupported.
Inputs: force, target, dry_run, memory_id, +1 more. Returns: object
read_graphA
Return entire knowledge graph with memories and relations.
Args: status: "active", "promoted", "archived", or "all". include_scores: Include decay scores and age. limit: Max memories (1-10,000). page: Page number (1-indexed). page_size: Memories per page (max 100).
Returns: Dict with memories, relations, stats, and pagination metadata.
Raises: ValueError: If status invalid or limit out of range.
Inputs: page, limit, status, page_size, +1 more. Returns: object
reset_performance_metricsB
Reset all performance metrics.
Returns: Dict with: success, message.
Inputs: no named parameters. Returns: object
save_memoryA
Save memory to short-term storage with auto-enrichment.
Args: content: Memory content (max 50k chars). tags: Tags (max 50). entities: Named entities (max 100, auto-extracted if None). source: Source (max 500 chars). context: Context (max 1k chars). meta: Custom metadata dict. strength: Base strength (1.0-2.0, auto-calculated if None).
Returns: Dict with: success, memory_id, message, has_embedding, enrichment_applied.
Raises: ValueError: Invalid input.
Inputs: content (required), meta, tags, source, +3 more. Returns: object
search_memoryA
Search memories with filters and pagination.
Args: query: Search text (max 50k chars). tags: Filter by tags (max 50). status: Filter by status ('active', 'promoted', 'archived' or list of these). Defaults to ['active', 'promoted'] if None. top_k: Max results (1-100). window_days: Recent memories only (1-3650 days). min_score: Min decay score (0.0-1.0). use_embeddings: Enable semantic search. include_review_candidates: Include review-due memories. page: Page number (default: 1). page_size: Results per page (10-100, default: 10). preview_length: Content chars (0-5000, default: 300).
Returns: Dict with results list and pagination metadata.
Raises: ValueError: Invalid parameters.
Inputs: page, tags, query, top_k, +7 more. Returns: object
search_unifiedA
Search across STM and LTM with unified ranking.
Args: query: Search text (max 50k chars). tags: Filter by tags (max 50). status: Filter STM by status ('active', 'promoted', 'archived' or list of these). Defaults to ['active', 'promoted'] if None. limit: Max results (1-100). stm_weight: STM multiplier (0.0-2.0). ltm_weight: LTM multiplier (0.0-2.0). window_days: Recent STM only (1-3650 days). min_score: Min STM score (0.0-1.0). page: Page number (default: 1). page_size: Results per page (10-100, default: 10). preview_length: Content chars (0-5000, default: 300).
Returns: Dict with results from both STM/LTM and pagination metadata.
Raises: ValueError: Invalid parameters.
Inputs: page, tags, limit, query, +7 more. Returns: object
touch_memoryA
Reinforce memory to reset decay.
Args: memory_id: Memory UUID. boost_strength: Increase base strength.
Returns: Dict with old_score, new_score, use_count, strength.
Raises: ValueError: Invalid UUID.
Inputs: memory_id (required), boost_strength. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 17 tools
Most tools target distinct actions: analyze_for_recall vs analyze_message are differentiated by intent, and cluster_memories vs consolidate_memories separate detection from action. However, search_memory and search_unified overlap in capability, and auto_recall_process_message could be confused with the analyze_* tools since it also starts with message analysis.
The majority follow a clear verb_noun pattern like save_memory, search_memory, promote_memory, and create_relation. Deviations include the abbreviated 'gc' and the awkward compound 'auto_recall_process_message', which break the otherwise predictable pattern.
At 17 tools, the server is slightly above the ideal 3-15 range but still reasonably scoped for a memory system that handles search, recall, consolidation, promotion, graph relationships, and maintenance. Each tool serves a plausible purpose, though a few analysis/search tools could be merged.
The toolset covers the core memory lifecycle well: save, retrieve, search, reinforce, promote, consolidate, cluster, relate, and garbage collect. Minor gaps exist such as no explicit edit-memory or delete-relation tool, but the provided operations are mostly sufficient for the perceived domain.
Maintenance
Related MCP Connectors
Persistent memory for AI agents to retain, retrieve, and recall conversation context through MCP.
Persistent, verbatim, searchable memory for AI assistants β one memory across every MCP client.
An MCP memory server. One memory your agents share β across models, devices and apps.
Persistent personal memory for AI assistants β save, search, and recall across every MCP client.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceAn MCP server enabling AI assistants to store, retrieve, and manage contextual information across conversations with features like persistent memory, advanced search, tagging, and privacy controls.MIT
- FlicenseNot gradedqualityDmaintenanceA MCP server that provides persistent memory for AI assistants, storing personal information, relationships, and observations to enable personalized and contextual conversations.4-
- AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) server providing human-like memory dynamics for AI assistants, where memories naturally fade over time unless reinforced through use.13MIT
- AlicenseNot gradedqualityBmaintenanceMCP server that gives AI agents persistent long-term memory, storing and recalling facts, decisions, errors, procedures, and episodes across sessions.40 npm6Apache 2.0