section

Recall Environment

RECALL MCP SERVER - ENVIRONMENT DOCUMENTATION

Overview

Server: recall
Version: 1.0.0
Location: /opt/mcp-servers/recall/mcp_recall_server.py
Purpose: Compact and retrieve AI memories from multiple Nexus source vaults

Architecture

SOURCE VAULTS (READ ONLY)           RECALL STORAGE (READ/WRITE)
┌─────────────────────────┐         ┌────────────────────────┐
│ Session  (6645/6646)    │         │ Recall Vault (6705)    │
│ Track    (6640/6641)    │ ──────► │   - Compacted memories │
│ Workflow (6615/6616)    │ load()  │   - 30 day retention   │
│ Context  (6620/6621)    │         ├────────────────────────┤
│ KB       (6625/6626)    │         │ Recall Oper (6706)     │
└─────────────────────────┘         │   - Active processing  │
                                    └────────────────────────┘

Redis Configuration

Source Vaults (READ ONLY): | Source | Vault Port | Operational Port | |--------|------------|------------------| | session | 6645 | 6646 | | track | 6640 | 6641 | | workflow | 6615 | 6616 | | context | 6620 | 6621 | | kb | 6625 | 6626 |

Recall Storage (READ/WRITE): | Type | Port | Password | |------|------|----------| | Vault | 6705 | Ft8PYM | | Operational | 6706 | ityXvw |

Key Pattern

recall:USER:YYYYMMDD_HHMM:type:ID
Example: recall:u_z1p5:20260105_1730:summary:s_abc123

TOOLS (3 total)

1. recall.load

Description: Load context and memories for an AI based on scope

Parameters: | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | ai_id | string | Yes | AI identifier (e.g., 'claude', 'agent-terminal-1') | | scope | string | Yes | Load scope: 'full', 'task', or 'minimal' | | task_context | string | No | Task-specific context (for 'task' scope) |

Scope Details: - full: For Ops/Main Claude - loads session, projects, protocols, context, kb, compacted history - task: For Agents - task context only + minimal protocols - minimal: Quick recovery - session ID, boot protocols, immediate todos

Returns: Dictionary with protocols, session, projects, context, compacted memories


2. recall.compact

Description: Compact memories into digestible summaries using OpenRouter/DeepSeek

Parameters: | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | user_id | string | Yes | User ID (e.g., 'u_z1p5') | | source_data | string | Yes | JSON string of memory data to compact | | summary_type | string | No | Type: 'daily', 'weekly', 'topic' (default: daily) |

Process: 1. Parse source_data JSON 2. Get OpenRouter API key from Locker (de76f4a8) 3. Call DeepSeek with summarization prompt 4. Store in Recall vault with 30-day retention

Returns:

{
  "status": "success",
  "recall_key": "recall:u_z1p5:20260106_1943:compact:123456",
  "summary": "Compacted summary text...",
  "token_count": 1234,
  "model": "deepseek/deepseek-chat",
  "timestamp": "2026-01-06T19:43:00-07:00"
}

3. recall.search

Description: Search compacted memories across all source vaults

Parameters: | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | user_id | string | Yes | User ID to search | | query | string | No | Search keywords | | start_date | string | No | Start date (YYYYMMDD) | | end_date | string | No | End date (YYYYMMDD) | | summary_type | string | No | Filter by summary type |

Search Sources: - Session: ai_state, todos, notes - Track: projects, tasks - Workflow: protocols, reminders - Context: notes, summaries, knowledge - KB: nodes (title + content)

Returns:

{
  "status": "success",
  "user_id": "u_z1p5",
  "query": "redis",
  "results": [
    {
      "source_env": "kb",
      "type": "node",
      "key": "kb:node:n_abc123",
      "snippet": "...Redis configuration for vault...",
      "relevance_score": 0.8
    }
  ],
  "total_results": 5,
  "timestamp": "2026-01-06T19:43:00-07:00"
}

Data Aggregation Helpers (Internal)

Function Source Data Extracted
_get_session_data session ai_state, todos, notes, subsessions
_get_track_data track projects (active), tasks
_get_workflow_data workflow protocols (user + universal), reminders
_get_context_data context notes, summaries, knowledge
_get_kb_data kb root nodes, child nodes

Dependencies

  • mcp.server.fastmcp: MCP server framework
  • redis: Redis client
  • requests: OpenRouter API calls
  • pytz: Denver timezone handling
  • credentials_helper: Secure API key retrieval (Locker de76f4a8)

Credential

Uses OpenRouter API key from Locker credential de76f4a8


Recall + Synth Integration Potential

Recommendation: Unified Flow

Synth stays stateless (universal AI processor), Recall stays stateful (memory aggregation/storage). Integration via synth_mode parameter in Recall.compact that calls Synth.enrich.

Key Finding: They serve different purposes: - Recall.compact: Memory continuity (AI context preservation) - Synth.enrich: Content enrichment (LARS training data)

Recommended Integration:

Recall.compact(synth_mode=true) → 
  1. Aggregates vault data
  2. Calls Synth.enrich
  3. Stores summary + training pairs
  4. Queues pairs for LARS batch training

Benefit: Every memory compaction becomes a LARS learning opportunity with 3D Reasoning Format.

ID: e1385a77
Path: Nexus 3.0 Complete Environment Reference > Recall Environment
Updated: 2026-01-06T19:46:50