claude-memory-local
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.
SYNAPTIC-MEM
Persistent local memory for AI coding assistants — zero cloud tokens, 100% private.
Quick Start · MCP Tools · How It Works · Configuration · Documentation
The Problem
AI coding assistants forget everything between sessions. Architecture decisions, resolved bugs, proven patterns — gone. Every new session starts from zero. Developers repeat explanations, re-discover solutions, and lose the institutional knowledge that makes teams effective.
Related MCP server: io.github.cdnsteve/sugar
The Solution
SYNAPTIC-MEM is a persistent memory system that runs entirely on your machine. Every decision, bugfix, and pattern is stored locally in PostgreSQL with semantic search powered by pgvector. Embeddings are generated locally with Ollama — zero tokens sent to any cloud API.
Your team's knowledge compounds across sessions instead of evaporating.
Features
Semantic Search — Find memories by meaning, not just keywords (pgvector + cosine similarity)
ACT-R Cognitive Scoring — Memories ranked like human cognition: frequent access rises, unused fades
100% Local & Private — PostgreSQL + Ollama on your machine, no data leaves your network
Zero Token Cost — Embeddings via local Ollama, no API calls consumed
6 MCP Tools — Store, retrieve, list, stats, delete, and forgetting cycle
Automatic Prompt Capture — Every prompt you submit is indexed for semantic search
CLAUDE.md Injection — Recent memories auto-injected into project context via hooks
Web Interface — Browse, search, and filter memories in your browser
Multi-IDE Support — Works with Claude Code, Cursor, VS Code, JetBrains, and more
Strategic Forgetting — Old unused memories fade gracefully without deletion
User Interface

Quick Start
1. Clone and install
Naming note: the repository is called
SYNAPTIC-MEM, but the local install folder (~/claude-memory-local) and the MCP server name (claude-memory-local) keep their original name for compatibility with existing installs, hooks and Claude Code configurations. Clone into~/claude-memory-localas shown below.
git clone https://github.com/MrZzE00/SYNAPTIC-MEM.git ~/claude-memory-local
cd ~/claude-memory-local
./install.shThe installer handles PostgreSQL 17 + pgvector, Python venv, database schema, Ollama, and embedding model.
2. Configure environment
cp .env.example .env
# Edit .env with your PostgreSQL password (generate one: openssl rand -base64 32)3. Add MCP server to your IDE
Add to ~/.claude.json:
{
"mcpServers": {
"claude-memory-local": {
"type": "stdio",
"command": "~/claude-memory-local/start-server.sh",
"args": []
}
}
}4. Start Ollama
open -a Ollama # macOS app
# or: ollama serve & # command linePostgreSQL auto-starts via Homebrew. Ollama requires manual start — a deliberate choice to keep human control over AI processes.
5. Restart your IDE and test
store_memory({ content: "Test memory", category: "discovery" })
retrieve_memories({ query: "test" })MCP Tools
Tool | Description | Example |
| Store a memory with category, tags, importance |
|
| Semantic search across memories |
|
| List recent memories, optionally filtered |
|
| Get statistics: totals, distribution, trends |
|
| Remove a specific memory by ID |
|
| Run ACT-R decay cycle across all memories |
|
Memory Categories
Category | Icon | Use for |
| 🔴 | Bug fixes and their solutions |
| 🟠 | Architecture and design decisions |
| 🟢 | New functionality implemented |
| 🔵 | Learnings and discoveries |
| 🟣 | Refactoring notes |
| ⚪ | General changes |
| 🟤 | Reusable patterns identified |
| 🟡 | User/team preferences |
| 📘 | Lessons learned |
| 🩹 | Specific error solutions |
How It Works
┌─────────────────────────────────────────────────────────────┐
│ Claude Code (or any MCP client) │
│ │ │
│ ┌─────▼─────┐ │
│ │ MCP Server │ (6 tools) │
│ └─────┬─────┘ │
│ │ │
│ ┌────────────────┼────────────────┐ │
│ ▼ ▼ ▼ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ PostgreSQL │ │ Ollama │ │ Hooks │ │
│ │ + pgvector │ │ (embeddings)│ │ (automation) │ │
│ └──────┬──────┘ └─────────────┘ └──────┬──────┘ │
│ ▼ ▼ │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ memories │ │ CLAUDE.md │ │
│ │ (table) │ │ (per-project)│ │
│ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────────────┘Component | Role | Auto-start |
PostgreSQL 17 + pgvector | Memory storage + vector search | Yes (Homebrew) |
Ollama | Local embedding generation (nomic-embed-text) | No (manual) |
MCP Server | Interface with AI coding assistants (6 tools) | Via IDE |
Hooks | Auto-capture prompts + inject context into CLAUDE.md | Via config |
Web Interface | Browse and search memories | Manual |
ACT-R Cognitive Scoring
Memory retrieval uses the ACT-R cognitive architecture, ranking memories like human cognition rather than raw cosine similarity:
Activation(m) = Base-level(m) + Weight × Similarity + Spreading(m) + NoiseComponent | What it does |
Base-level | Frequently accessed memories score higher; unused ones decay over time |
Similarity | Semantic match between your query and the memory |
Spreading | Shared tags boost contextually related memories |
Noise | Small random factor prevents static ranking bias |
Memories transition through three states: Active → Dormant → Forgotten (never deleted).
USE_ACTR_SCORING=true # Master switch (false = cosine-only scoring)
ACTR_DECAY_D=0.5 # Power-law decay rate
ACTR_WEIGHT_W=11.0 # Semantic similarity weight
ACTR_NOISE_SIGMA=1.2 # Gaussian noise standard deviation
ACTR_THRESHOLD_TAU=-2.0 # Retrieval threshold
ACTR_SPREADING_S=2.0 # Spreading activation strengthConfiguration
Environment Variables
Copy .env.example to .env and configure:
PG_HOST=localhost
PG_PORT=5432
PG_DATABASE=claude_memory
PG_USER=claude
PG_PASSWORD=YOUR_SECURE_PASSWORD # Generate: openssl rand -base64 32
OLLAMA_HOST=http://localhost:11434
EMBEDDING_MODEL=nomic-embed-textAPI_KEY= # Set to require API key authentication
RATE_LIMIT_REQUESTS=60 # Requests per minute (default: 60)
RATE_LIMIT_WINDOW=60 # Rate limit window in seconds
ALLOWED_ORIGINS=localhost:8080 # CORS allowed originsMCP Setup by IDE
{
"mcpServers": {
"claude-memory-local": {
"type": "stdio",
"command": "~/claude-memory-local/start-server.sh",
"args": []
}
}
}{
"mcp": {
"servers": {
"claude-memory-local": {
"type": "stdio",
"command": "~/claude-memory-local/start-server.sh"
}
}
}
}{
"mcpServers": {
"claude-memory-local": {
"command": "~/claude-memory-local/start-server.sh",
"args": []
}
}
}Settings → Tools → MCP Servers
Add Server → Type: stdio
Command:
~/claude-memory-local/start-server.sh
The server uses the standard stdio transport (MCP protocol). Point your MCP client to:
~/claude-memory-local/start-server.shNote: The hooks system (auto-capture prompts, CLAUDE.md injection) is specific to Claude Code. Other IDEs use the MCP tools directly without automation hooks.
Hooks & Automation
The hooks system provides two automations for Claude Code:
Prompt Capture — Every prompt you submit is automatically embedded and stored for semantic search
CLAUDE.md Injection — Recent memories are injected into your project's
CLAUDE.mdat session start, after edits, and at session end
See docs/hooks-prompts-capture.md for setup instructions and hook configuration.
Web Interface
Browse, search, and filter your memories in the browser:
cd ~/claude-memory-local && python3 -m http.server 8080
# Open http://localhost:8080/viewer.htmlFeatures: global stats, text search, category filters, project filters, prompts history tab.
Troubleshooting
MCP server doesn't connect
pg_isready # Check PostgreSQL
ollama list # Check OllamaPostgreSQL doesn't start
lsof -i :5432 # Check port conflict
brew services restart postgresql@17 # Restart serviceError "role claude does not exist"
createuser -s claude
psql -c "ALTER USER claude PASSWORD 'YOUR_PASSWORD';"
# Update .env with the same passwordWeb interface doesn't load
cd ~/claude-memory-local && source venv/bin/activate && python src/web_ui.pyDocumentation
Document | Description |
Detailed onboarding guide | |
Full technical documentation | |
Hook system setup and configuration | |
Template for configuring AI agents |
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
License
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
Persistent memory for AI agents. Search, store, and recall across sessions.
Persistent memory for AI agents. Hosted cloud connector or local Windows install.
Universal persistent memory and knowledge retrieval layer for AI agents and LLMs.
Persistent memory for AI agents. Semantic search, memory graph, W3C DID identity.
Related MCP Servers
- AlicenseBqualityDmaintenanceGives AI coding assistants cross-session persistent memory with semantic search and task management, fully local.8Apache 2.0
- FlicenseNot gradedqualityAmaintenanceProvides AI coding agents with a local-first, persistent memory layer so they can store and semantically recall project-specific and cross-project knowledge, conventions, and error patterns during sessions. It also optionally enables autonomous task queue execution and issue resolution driven by that same memory.-
- FlicenseNot gradedqualityAmaintenanceEnables AI coding agents to read and write persistent, local-first memory across sessions and projects, with semantic search, global guidelines, and optional autonomous task execution.-
- FlicenseNot gradedqualityAmaintenanceProvides a local-first persistent memory layer that lets AI coding agents store, recall, and semantically search project-specific and cross-project knowledge across sessions, so context, decisions, and guidelines survive between conversations. Runs entirely on the user's machine with SQLite and no API keys, and optionally supports autonomous task-queue execution built on the same memory.-