MindGate MCP
Use MindGate MCP as a local persistent memory/context layer for AI coding agents: save/search project knowledge, log handoffs, manage preferences, sync rules files, and maintain the memory store.
Save and update decisions, conventions, bugfixes, context, tags, workspaces, and supersession links.
Search/recall memories with FTS5 BM25 ranking, filters, latest handoff, and developer preferences.
Log cross-agent session handoffs with summaries, next steps, and active files.
Compile stored memories/preferences into
AGENTS.md,CLAUDE.md,.cursorrules,.windsurfrules, orMINDGATE_CONTEXT.mdwith backups and overwrite protection.Set/retrieve user preferences, list workspaces, delete or deprecate memories, and compact old sessions.
Export portable JSON snapshots and get the local dashboard URL.
Keep data local in SQLite/FTS5 and redact secrets before writing.
Provides a Git post-commit hook adapter that records commit messages and active files into MindGate memory for persistent project context tracking.
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., "@MindGate MCP recall our auth architecture decisions for this workspace"
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.
π§ MindGate MCP (v1.6.0) β Ψ¨ΩΨ§Ψ¨Ψ© Ψ§ΩΨΉΩΩ
Stop re-explaining your codebase every morning.
A 100% local-first persistent memory MCP server for Cursor, Claude Desktop, Antigravity, Windsurf, and Codex β backed by SQLite + FTS5, automatic secret redaction, and auto-compiled AGENTS.md / .cursorrules / CLAUDE.md rules.
πͺπ¬ Ψ§ΩΨͺΩΨ«ΩΩ Ψ¨Ψ§ΩΨΉΨ±Ψ¨ΩΨ© Β· π₯οΈ Landing Page Β· π¦ npm Β· π¬ 58-second Demo
π¬ Watch the 58-second demo β Start a feature in Cursor, switch to Claude Desktop or Antigravity, and pick up with zero context loss.
β‘ Quick Start (30 Seconds)
1. Run with npx (Zero-Install)
npx -y mindgate-mcp init2. Add to Cursor / Claude Desktop / Antigravity
{
"mcpServers": {
"mindgate": {
"command": "npx",
"args": ["-y", "mindgate-mcp"]
}
}
}3. Install via Smithery (Claude Desktop)
npx -y @smithery/cli install mindgate-mcp --client claudegit clone https://github.com/aaserag1/mindgate-mcp.git
cd mindgate-mcp
npm install
npm run build
npm run init-config{
"mcpServers": {
"mindgate": {
"command": "node",
"args": ["C:\\path\\to\\mindgate-mcp\\dist\\index.js"],
"env": {
"MINDGATE_DB_PATH": "C:\\Users\\YOUR_USER\\.mindgate\\mindgate.db"
}
}
}
}Related MCP server: Sugar Memory
π Why MindGate vs. Alternatives?
Feature | MindGate MCP | ||
100% Local-First (No Cloud / No API Key) | β SQLite + FTS5 on disk | β Hosted service / API key | β Local Markdown files |
Cross-Agent Handoff (Cursor β Claude β Codex) | β Structured handoffs | β Cross-tool | β Cross-tool |
Auto-Compiled | β
Atomic write + | β | β |
Automatic Secret Redaction on Write | β Masks API keys & JWTs | β | β |
Local Web Dashboard + Git Post-Commit Hook | β
Built-in ( | β | β |
Offline Cross-Lingual Search (Arabic β English) | β Optional ONNX profile | β | β |
π‘ Core Capabilities
ποΈ Blazing-Fast Local SQLite + FTS5 BM25: Instant full-text retrieval of architectural decisions, bugfixes, conventions, preferences, and session handoffs β zero network calls, zero telemetry.
π Auto-Compiled Workspace Rules:
sync_workspace_rulescompiles stored decisions intoAGENTS.md,.cursorrules,CLAUDE.md,.windsurfrules, orMINDGATE_CONTEXT.md. Writes are atomic, existing files get a.bak-<timestamp>backup, and hand-written files are never overwritten unlessforce: true.π Secret Redaction on Write: Well-known token patterns (OpenAI, GitHub, AWS, Slack, Google, JWT, PEM private keys) are masked with
[REDACTED:<kind>]before touching disk. Disable withMINDGATE_REDACT_SECRETS=false(not recommended).π Decision Lifecycle & Compaction: Supersede outdated choices (
supersedes), deprecate stale notes (deprecate_memory), update in-place (update_memory), and compact long session histories (compact_memories) to save tokens.π Assumptions Ledger (
v1.6.0): Dated, owned assumption records (record_assumption) with areview_dateand anowner. An assumption whose review date has passed is excluded fromrecall_contextand listed only underassumptions_needing_reviewuntil the operator confirms (confirm_assumption) or replaces it β so a stale assumption can never be silently reused.review_assumptionslists what is overdue and what is due within 7 days.π Optional Hybrid Semantic & Arabic β English Search (
v1.4.0βv1.5.0): Combines BM25 with offline ONNX embeddings (all-MiniLM-L6-v2, ~23 MB, 384-dim) and amultilingualprofile (mindgate-mcp download-model --multilingual) for >0.72 cosine alignment between Arabic queries and English decisions on CPU.π₯οΈ Built-in Local Web Dashboard: Zero-dependency UI (
mindgate-mcp ui) bound strictly to127.0.0.1:4242with Dark/Light themes, Arabic RTL & English LTR switch, live search, and JSON export.πͺ Git Post-Commit Hook: Automatically logs commit messages and active files via
mindgate-mcp git-hook installwithout blocking your workflow.π‘οΈ Node2Shell (CVE-2026-111497) Hardened: stdio-only transport (zero HTTP attack surface on MCP), runtime version check, and a best-effort in-process lock of
node:zlibBrotli decompression loaded first. See SECURITY.md.
β οΈ MindGate does not execute shell commands, does not open network sockets for MCP, and does not attempt to detect prompt injection in arbitrary text. Review generated rules files before committing them.
π₯οΈ Local Web Dashboard
mindgate-mcp ui # Starts on http://127.0.0.1:4242
mindgate-mcp ui --port 5050 # Custom port
npm run ui # From cloned sourceVisual Memory Manager: Real-time FTS5 BM25 search, status badges (
active,superseded,deprecated), workspace & category filters.Bi-Directional UI: One-click switch between English (LTR) and Arabic (RTL), plus Dark & Light themes.
Auto-Open from MCP Clients: Append
--open-dashboard(and optionally--port 5050) to your client'sargs. Occupied ports never trigger duplicate browser launches.
πͺ Git Post-Commit Hook
mindgate-mcp git-hook install
mindgate-mcp git-hook install --workspace my-project
mindgate-mcp git-hook uninstallAppends a non-blocking background hook bounded by # --- mindgate:post-commit --- sentinels to .git/hooks/post-commit, preserving existing hooks.
π οΈ MCP Tools (16), Resources (2) & Prompts (1)
Tools (16)
Tool Name | Description |
| Store a persistent memory ( |
| Update an existing memory in-place by ID (and optional |
| Search memories with FTS5 BM25 (and hybrid embeddings when available), workspace/category/status filters; falls back to recent memories ( |
| Mark a memory as deprecated by ID with an optional reason without deleting history |
| Record a dated, owned assumption ( |
| List overdue assumptions (oldest first) and the count due within 7 days |
| Confirm an assumption (extend its review date) or replace it with a superseding record |
| Compact historical session handoffs into milestone summaries to reduce token usage |
| Save a structured session handoff (summary, next steps, active files) for the next agent |
| Return the local MindGate Web Dashboard URL ( |
| Compile stored memories into |
| Export a portable JSON backup of memories, handoffs, and preferences |
| Save or update a persistent developer preference ( |
| Retrieve saved preferences, optionally filtered by |
| List all workspaces with memory counts and last-updated timestamps |
| Delete a memory by its ID |
Resources (2)
mindgate://context/latestβ Recent memories, latest cross-agent handoff, and preferences (JSON).mindgate://rules/agents-mdβ Live auto-compiledAGENTS.mdpreview (Markdown).
Prompts (1)
mindgate-bootstrapβ Loads project memory, preferences, and latest session handoff at session start (workspaceoptional).
ποΈ Architecture

flowchart TB
subgraph Clients["MCP Clients (any of them)"]
A1["Antigravity"]
A2["Cursor"]
A3["Claude Desktop"]
A4["OpenCode / Codex / Windsurf"]
end
subgraph Server["MindGate MCP Server β 100% local"]
direction TB
BOOT["1 Β· security/bootstrap.ts β first import<br/>locks the node:zlib Brotli API<br/>+ runtime version check (CVE-2026-111497)"]
TOOLS["2 Β· index.ts β MCP handlers<br/>13 tools Β· 2 resources Β· 1 prompt<br/>stdio JSON-RPC only"]
VALID["3 Β· validation.ts<br/>type + range + size limits<br/>invalid input β isError: true"]
REDACT["4 Β· security/secretRedactor.ts<br/>sk-β¦, AKIAβ¦, JWT, PEM β [REDACTED:kind]"]
STORE["5 Β· db/memoryStore.ts<br/>SQLite (WAL) + FTS5 BM25<br/>triggers keep the index in sync"]
RULES["6 Β· rulesSync.ts<br/>atomic write + .bak backup<br/>hand-written files protected (sentinel)"]
BOOT --> TOOLS
TOOLS --> VALID
VALID --> REDACT
REDACT --> STORE
VALID --> RULES
STORE --> RULES
end
DB[("Local filesystem<br/>~/.mindgate/mindgate.db<br/>file chmod 600 Β· dir chmod 700")]
PROJ["Project workspace<br/>AGENTS.md Β· CLAUDE.md Β· .cursorrules"]
Clients <-->|"stdio JSON-RPC only<br/>no network Β· no HTTP"| BOOT
STORE <--> DB
RULES -->|"write / backup"| PROJβοΈ Environment Variables
Variable | Default | Description |
|
| SQLite database path (parent dir |
|
| Default workspace when |
|
| Set to |
|
| Set to |
β FAQ & Runtime Compatibility
Which Node.js version do I need?
Compatibility: Runs on Node 20+ (with built-innode:zlibBrotli lock defense-in-depth).
Recommended for full CVE-2026-111497 protection:^22.23.4 || ^24.22.1 || >=26.12.1(see SECURITY.md).Where does my memory live?
~/.mindgate/mindgate.db(override withMINDGATE_DB_PATH). Delete the file to wipe everything.Can I move memory between machines? Yes β copy the
.dbfile or useexport_memory_snapshot.Does it work offline? Yes β after install, nothing leaves your machine.
If npm ci fails with EPERM ... better-sqlite3\prebuilds\win32-x64.node, a running agent/editor is locking the native binary:
Close every app using MindGate (check the system tray) and VS Code windows on the repo.
Run
Get-Process node | Select-Object Id, PaththenStop-Process -Id <ID> -Force.Run
Rename-Item node_modules node_modules.oldβnpm ciβnpm test.Delete
node_modules.old.
π§ͺ Testing & Verification
npm run typecheck # TypeScript --noEmit
npm test # 65 tests (real SQLite + FTS5)
npm run build # emit dist/All 65 tests pass on Linux.
π License
Released under the MIT License.
Available Tools
13 toolscompact_memoriesB
Compact and consolidate historical cross-agent sessions in a workspace into a dense milestone record, preventing context window bloat in long-running projects.
Inputs: workspace, max_sessions_to_keep.
delete_memoryB
Delete an outdated or superseded memory record by its ID.
Inputs: id (required).
deprecate_memoryA
Mark an architectural decision or convention as deprecated so AI agents know not to follow it anymore, while preserving it for historical auditing.
Inputs: id (required), reason.
export_memory_snapshotB
Export a portable JSON backup snapshot of MindGate memories, session handoffs, and developer preferences.
Inputs: workspace.
get_dashboard_urlA
Get the local URL and launch instructions for the MindGate visual web dashboard (localhost:4242).
Inputs: port.
get_user_preferencesB
Retrieve all saved global developer preferences and coding rules.
Inputs: category.
list_workspacesB
List all project workspaces stored in MindGate along with memory counts.
Inputs: no named parameters.
log_session_summaryA
Log a session handoff summary when finishing work in one AI agent (e.g. Antigravity) so the next agent (e.g. OpenCode or Codex) can continue seamlessly.
Inputs: summary (required), workspace, next_steps, active_files, +1 more.
recall_contextB
Search MindGate (Ψ¨ΩΨ§Ψ¨Ψ© Ψ§ΩΨΉΩΩ) using FTS5 BM25 full-text ranking for relevant project decisions, latest cross-agent session handoff, and developer preferences.
Inputs: limit, query, status, category, +2 more.
remember_decisionA
Save an architectural decision, coding convention, bug root-cause, or important context into MindGate (Ψ¨ΩΨ§Ψ¨Ψ© Ψ§ΩΨΉΩΩ) so all AI tools remember it.
Inputs: title (required), content (required), tags, category, +3 more.
set_user_preferenceB
Save a persistent developer preference or global coding rule (e.g., preferred test runner, naming conventions, forbidden packages).
Inputs: key (required), value (required), category.
sync_workspace_rulesA
Generate a structured Markdown rules file (AGENTS.md, .cursorrules, or CLAUDE.md) from stored MindGate memories, conventions, preferences, and latest session handoff. Writes are atomic; existing files are backed up to .bak- and hand-written files are never overwritten unless force=true.
Inputs: force, workspace, project_dir, target_file, +1 more.
update_memoryB
Update an existing memory or architectural decision in-place by its ID without losing its record ID or creation timestamp.
Inputs: id (required), tags, title, status, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 13 tools
Most tools have clearly distinct purposes: creating, updating, deleting, deprecating, recalling, compacting, exporting, and syncing memories are separable. There is minor potential overlap between remember_decision and set_user_preference because both can store conventions/rules, but the descriptions distinguish project decisions from developer preferences.
All 13 tool names consistently use snake_case with a verb_noun pattern. Differences like singular/plural nouns (memory vs memories) are natural and do not break predictability.
The server has 13 tools, which is well within the typical 3-15 range for a focused memory/context server. Each tool appears to earn its place by covering a distinct operation in the memory lifecycle.
The surface covers core memory CRUD/lifecycle operations, preferences, session handoffs, compaction, export, and rules synchronization. Minor gaps exist, such as no direct get_memory_by_id or import/restore counterpart for export_memory_snapshot, but agents can work around these with recall_context and existing update/delete tools.
Related MCP Connectors
Shared memory for coding agents. Stop re-explaining your codebase every session.
Shared, scoped, reviewable team memory for AI coding agents.
Memory for AI agent teams across tools, sessions, repositories, and teammates.
One shared project memory for your AI coding tools: recall, save and brief decisions anywhere.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceGives AI coding agents persistent, local-first memory so they can store, semantically search, and recall decisions, preferences, error patterns, and cross-project guidelines directly during a session. It also optionally queues tasks for autonomous execution against that same memory.-
- FlicenseNot gradedqualityAmaintenanceProvides AI coding agents with a local-first persistent memory layer they can read and write during sessions, storing decisions, preferences, error patterns, and research per project or globally. Enables semantic and keyword search, formatted context recall, and cross-project guideline surfacing without API keys or cloud storage.-
- FlicenseNot gradedqualityAmaintenanceGives AI coding agents a local-first persistent memory they can read and write directly during sessions, storing decisions, preferences, error patterns, and guidelines in per-project and global SQLite stores. Enables semantic and keyword retrieval of relevant context across sessions so agents start work already knowing a codebase's conventions and history.-
- FlicenseNot gradedqualityAmaintenanceEnables AI coding agents to store and retrieve persistent project and cross-project memories via semantic search, so decisions, preferences, error patterns, and guidelines survive across sessions. Optionally supports autonomous task execution built on the same local-first knowledge store.-