synapse-memory
Supports local Ollama for synthesizing and consolidating memories within a category into structured macro-summaries.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
β‘ 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:
100% Private & Local-First: Runs entirely on your machine using embedded ONNX models (via FastEmbed) and SQLite. Zero external database servers, zero cloud leaks.
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).
Hybrid Cognitive Search: Combines dense ONNX vector cosine distance with sparse SQLite FTS5 (BM25) full-text indexing, recency decay, and explicit importance ranking.
AES-256-GCM Encryption at Rest: Optional zero-knowledge encryption on disk with PBKDF2 key derivation (
SYNAPSE_ENCRYPTION_KEY).Decentralized Remote Sync: Multi-device encrypted sync via private Git remotes (
synapse remote push / pull).Multi-Workspace Namespacing: Isolate memories by project, domain, or agent (e.g.
--workspace mobile,--workspace backend).Official Web Browser Extension (MV3): Highlight text or code anywhere on the web to clip it directly into your local Synapse memory.
Memory Evolution & Self-Correction: Automatically detects when a new memory contradicts or supersedes an older rule, deprecating outdated facts to eliminate AI hallucination.
Obsidian Graph & Wikilinks Export: Export memories directly into an interconnected Obsidian Vault with bidirectional
[[wikilinks]].Token Budget Compressor: Compresses recalled knowledge to strictly respect context window limits.
Real-Time Directory Watcher: Auto-syncs note folders or repositories into memory using SHA256 diffing.
Universal MCP Server: Integrates natively with any Model Context Protocol (MCP) host, such as Claude Desktop, Cursor, Antigravity, or custom agent loops.
Automatic PII & Secrets Redaction: Scans and sanitizes API keys, JWTs, AWS credentials, and passwords before indexing.
1-Click MCP Setup: Automated auto-injection for Claude Desktop and Cursor.
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 syncOr 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-teamDecentralized 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 pullNatural Language Search (recall)
# Search across all or specific workspace
synapse recall "which database do we use in prod?"
synapse recall "mobile UI patterns" --workspace mobile-teamInspect Workspaces (workspaces)
synapse workspacesOutput:
π§ 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 10Ingest 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.jsonExport & 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.jsonSync Shell & Terminal Commands (shell-sync)
Index high-value developer shell commands into the terminal workspace:
synapse shell-sync --max 501-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 cursorMemory Health, Stats & Garbage Collection (stats / prune)
# Inspect health metrics and category counts
synapse stats
# Permanently prune stale/superseded memories
synapse pruneConsolidate Scattered Fragments (consolidate)
Synthesize memories within a category into a structured macro-summary (supports local Ollama):
synapse consolidate architectureLaunch 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:8484Compress 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 300Continuous Folder Sync Daemon (watch)
Monitor a folder of markdown files or personal notes and auto-sync changes into memory:
synapse watch ./notes --interval 2.0Forget / Delete Memory (forget)
synapse forget mem_7f09dc09π Official Web Browser Extension
Clip code snippets, documentation, and articles from any website directly into Synapse:
Open
chrome://extensions(oredge://extensions,brave://extensions).Toggle on Developer Mode.
Click "Load unpacked" and select the
extension/directory from this repository.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:
Lead Developer & Maintainer: Franca Roscilli
Email: francaroscillidev@gmail.com
GitHub: @francaroscillidev-gif
Bug Reports & Feature Requests: Open an issue on GitHub
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted agent memory: store, search, and recall facts across sessions from any MCP client.
Hosted memory for AI agents over MCP. One memory shared by all your agents.
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Persistent personal memory for AI assistants β save, search, and recall across every MCP client.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides persistent, searchable memory for MCP-compatible agents, enabling recall by meaning, automatic decay, trust scoring, and cross-agent handoffs.5MIT
- AlicenseNot gradedqualityDmaintenanceProvides persistent semantic memory for AI agents via MCP, enabling them to remember, recall, list, update, and forget memories with vector-based similarity search.ISC
- AlicenseNot gradedqualityBmaintenanceEnables 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
- AlicenseNot gradedqualityBmaintenanceEnables 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 npmMIT