Skip to main content
Glama

⚑ What makes Synapse Revolutionary?

Most modern AI agents suffer from "Context Amnesia": they lose personal preferences, codebase guidelines, and project constraints between chat sessions. Existing RAG solutions rely on expensive cloud vector databases or naive vector matching that ignores time and priority.

Synapse provides a Local-First Episodic & Semantic Memory with zero cloud leaks:

  1. 100% Private & Local-First: Runs entirely on your machine using embedded ONNX models (via FastEmbed) and SQLite. Zero external database servers, zero cloud leaks.

  2. Multi-Tier Cognitive Architecture: Divided into Working Memory (short-term buffer with automatic TTL expiry), Episodic Memory (chronological event stream), and Semantic Memory (immutable core rules).

  3. Hybrid Cognitive Search: Combines dense ONNX vector cosine distance with sparse SQLite FTS5 (BM25) full-text indexing, recency decay, and explicit importance ranking.

  4. AES-256-GCM Encryption at Rest: Optional zero-knowledge encryption on disk with PBKDF2 key derivation (SYNAPSE_ENCRYPTION_KEY).

  5. Decentralized Remote Sync: Multi-device encrypted sync via private Git remotes (synapse remote push / pull).

  6. Multi-Workspace Namespacing: Isolate memories by project, domain, or agent (e.g. --workspace mobile, --workspace backend).

  7. Official Web Browser Extension (MV3): Highlight text or code anywhere on the web to clip it directly into your local Synapse memory.

  8. Memory Evolution & Self-Correction: Automatically detects when a new memory contradicts or supersedes an older rule, deprecating outdated facts to eliminate AI hallucination.

  9. Obsidian Graph & Wikilinks Export: Export memories directly into an interconnected Obsidian Vault with bidirectional [[wikilinks]].

  10. Token Budget Compressor: Compresses recalled knowledge to strictly respect context window limits.

  11. Real-Time Directory Watcher: Auto-syncs note folders or repositories into memory using SHA256 diffing.

  12. Universal MCP Server: Integrates natively with any Model Context Protocol (MCP) host, such as Claude Desktop, Cursor, Antigravity, or custom agent loops.

  13. Automatic PII & Secrets Redaction: Scans and sanitizes API keys, JWTs, AWS credentials, and passwords before indexing.

  14. 1-Click MCP Setup: Automated auto-injection for Claude Desktop and Cursor.

  15. Instant Terminal CLI & Web Graph Dashboard: Rich CLI + real-time force-directed interactive knowledge graph.


Related MCP server: RecallMCP

πŸš€ Quick Start

1. Installation

Clone and install with uv (fastest Python package manager):

git clone https://github.com/your-username/synapse-memory.git
cd synapse-memory
uv sync

Or install in editable mode:

pip install -e .

πŸ’» CLI Usage

Store a memory (remember)

# Permanent Semantic Memory (core rules)
synapse remember "Never commit API keys or passwords to git" --tier semantic --importance 1.0

# Working Memory with auto-expiry (e.g. 30-minute session buffer)
synapse remember "Debugging production outage on auth-cluster" --tier working --ttl 1800

# Store in a dedicated workspace
synapse remember "iOS app uses SwiftUI and SwiftData" --workspace mobile-team

Decentralized Cross-Device Sync (remote)

Sync memories across machines using a private Git repository:

# Initialize sync linked to your private repository
synapse remote init git@github.com:your-username/my-private-synapse-vault.git

# Push encrypted updates
synapse remote push -m "Synced memory from MacBook"

# Pull and merge updates on another machine
synapse remote pull
# Search across all or specific workspace
synapse recall "which database do we use in prod?"
synapse recall "mobile UI patterns" --workspace mobile-team

Inspect Workspaces (workspaces)

synapse workspaces

Output:

          🧠 Synapse Recall: 'which database do we use in prod?'          
┏━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Rank ┃ ID           ┃ Category     ┃ Score    ┃ Content                                             ┃ Rationale               ┃
┑━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━┩
β”‚ 1    β”‚ mem_7f09dc09 β”‚ architecture β”‚ 0.90     β”‚ We use PostgreSQL for all production database sche… β”‚ sim=0.89, recency=1.00  β”‚
β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Generate Context Block for Prompts (prompt)

Output clean markdown context directly into your LLM system prompt:

synapse prompt "Write an API route"

Inspect Stored Memories (list)

synapse list --limit 10

Ingest Files and Documentation (ingest)

Chunk and embed notes, Markdown files, or whole project folders:

# Ingest single file
synapse ingest docs/architecture.md

# Ingest all markdown files in a folder
synapse ingest ./notes --glob "**/*.md"

Export & Backup (export / import)

Export all memories to portable JSON or Markdown notes (compatible with Obsidian/Notion):

# Export to JSON backup
synapse export --out backup.json

# Export to human-readable Markdown notes
synapse export --out notes.md

# Restore / merge from backup
synapse import backup.json

Export & Backup (export / import)

Export all memories to portable JSON, single Markdown notes, or an interconnected Obsidian Vault:

# Export to JSON backup
synapse export --out backup.json

# Export as an interconnected Obsidian Vault with [[wikilinks]]
synapse export --obsidian ~/Documents/ObsidianVault/SynapseMemory

# Restore / merge from backup
synapse import backup.json

Sync Shell & Terminal Commands (shell-sync)

Index high-value developer shell commands into the terminal workspace:

synapse shell-sync --max 50

1-Click MCP Setup for Claude & Cursor (setup)

Configure Claude Desktop or Cursor automatically with a single command:

# Configure Claude Desktop
synapse setup claude

# Configure Cursor IDE
synapse setup cursor

Memory Health, Stats & Garbage Collection (stats / prune)

# Inspect health metrics and category counts
synapse stats

# Permanently prune stale/superseded memories
synapse prune

Consolidate Scattered Fragments (consolidate)

Synthesize memories within a category into a structured macro-summary (supports local Ollama):

synapse consolidate architecture

Launch Interactive Web Dashboard & Knowledge Graph (ui)

Launch the local dark-mode dashboard with interactive force-directed graph view:

synapse ui
# Opens http://127.0.0.1:8484

Compress Context within a Token Budget (compact)

Extract only the highest-ranking memories compressed to fit within your prompt token budget:

synapse compact "database guidelines" --tokens 300

Continuous Folder Sync Daemon (watch)

Monitor a folder of markdown files or personal notes and auto-sync changes into memory:

synapse watch ./notes --interval 2.0

Forget / Delete Memory (forget)

synapse forget mem_7f09dc09

🌐 Official Web Browser Extension

Clip code snippets, documentation, and articles from any website directly into Synapse:

  1. Open chrome://extensions (or edge://extensions, brave://extensions).

  2. Toggle on Developer Mode.

  3. Click "Load unpacked" and select the extension/ directory from this repository.

  4. Highlight any text on any page -> Right click -> "🧠 Save to Synapse Memory".


πŸ”Œ Universal MCP Integration (Claude, Cursor, Antigravity)

Synapse exposes native MCP tools over standard I/O:

  • remember: Store knowledge or preferences.

  • recall: Retrieve relevant memories based on semantic similarity and recency.

  • forget: Delete outdated facts.

Claude Desktop Configuration

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "synapse-memory": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/synapse-memory",
        "run",
        "synapse",
        "serve-mcp"
      ]
    }
  }
}

🐍 Python SDK Example

Integrate Synapse into your custom Python agents:

from synapse_memory import MemoryEngine

engine = MemoryEngine()

# 1. Store knowledge
engine.store(
    content="User prefers succinct answers with runnable code snippets",
    category="preference",
    tags=["style", "preferences"],
    importance=0.8,
)

# 2. Inject context into your LLM prompt
prompt_context = engine.format_context_for_prompt("How should I answer this user query?")
system_prompt = f"""You are a helpful coding assistant.
{prompt_context}
"""

🐳 Docker Deployment

Run Synapse Web Dashboard and REST API inside a persistent container:

docker compose up -d
# Accessible at http://localhost:8484

πŸ§ͺ Testing

Run unit tests locally:

uv run pytest

πŸ“„ License

Distributed under the MIT License.


πŸ“¬ Contact, Support & Commercial Inquiries

If you have questions, feedback, enterprise integration requests, or custom agent governance needs, feel free to reach out directly:

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides persistent, searchable memory for MCP-compatible agents, enabling recall by meaning, automatic decay, trust scoring, and cross-agent handoffs.
      5
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to store, recall, link, and manage durable local memories using ranked fuzzy search and optional graph context through a compact MCP interface.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to store and semantically retrieve durable memories across sessions via MCP or REST, with tools for remembering, recalling, asking, updating, and forgetting memories.
      17 npm
      MIT