aimem
Click on "Install 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., "@aimemSearch memory for our decision on the database schema"
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.
aimem
Persistent, project-scoped memory for any MCP-compatible AI coding assistant.
aimem is a local-first Model Context Protocol server that gives AI agents — Claude Code, Cursor, Windsurf, Claude Desktop, Gemini CLI, Codex, or anything else that speaks MCP — a persistent memory that survives across chat sessions. Memory lives inside each project's own .aimem/ folder: no external database, no cloud API, no account, no API key. Everything runs on your machine and never leaves it.
Status: v0.1.0 — published on npm as
aimem-mcp. Core functionality complete and tested (Phases 1–7). Cross-client validation and real-world daily use are in progress. See docs/knowledge/setup/current-project-state.md for the exact current state.
Why
Long AI coding sessions eventually hit the same wall: the context window fills up, older details get dropped or summarized away, and you end up re-explaining the same architecture, credentials, and decisions over and over — in the same session, and every time you start a new one. Bigger context windows push the problem back but never solve it; they still cost tokens, still degrade reasoning as they fill, and still forget eventually.
aimem treats this as a memory architecture problem, not a context size problem. Instead of cramming everything into the context window, an aimem-connected agent stores what actually matters — credentials, decisions, architecture facts, bug fixes — in a small local database, and retrieves only what's relevant, when it's relevant.
Related MCP server: persistent-kb-mcp
How it works
┌───────────────────────────────────────────────────────────────────────────┐
│ Developer's Local Machine │
│ │
│ ┌───────────────────────┐ │
│ │ AI Client Process │ │
│ │ (Claude Code, Cursor, │ │
│ │ Windsurf, Claude │ │
│ │ Desktop, Gemini CLI, │ │
│ │ Codex, ...) │ │
│ └───────────┬────────────┘ │
│ │ MCP protocol (JSON-RPC 2.0 over stdio) │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ aimem MCP Server (Node.js/TS) │ │
│ │ Tool Router → Capture Engine → Conflict/Versioning Engine │ │
│ │ ↘ Retrieval Engine ↗ │ │
│ │ Storage Engine ←→ Embedding/Search Engine │ │
│ └────────────────────┬────────────────────────────────────────────────┘ │
│ ▼ │
│ <project_root>/.aimem/memory.db (SQLite + sqlite-vec, WAL mode) │
│ local ONNX embedding model, bundled at install — no API key │
│ │
│ Nothing above ever leaves the machine. No network calls at runtime. │
└─────────────────────────────────────────────────────────────────────────┘Memory is captured three ways, all driven by the AI's own judgment rather than a background process:
Event-based — the moment the AI notices something worth remembering (a credential, a decision, a bug fix), it's stored immediately.
Turn-count based — a periodic safety-net scan every ~10–15 exchanges catches anything the event trigger missed.
Context-threshold based — as the AI senses its own context window filling up, it runs one last thorough save before older messages get dropped.
At the start of every new chat, the AI always checks whether memory exists for the project and asks where to pick up — it never silently stays quiet, and never dumps the entire memory store into context at once.
See docs/architecture/system-overview.md for the full component breakdown and docs/architecture/data-flow.md for sequence diagrams of every operation.
Tools
Tool | Purpose |
| Called at the start of every new session — reports whether memory exists and a short summary |
| Structured + semantic search over stored memory, scoped to what's relevant |
| Event-based capture of a single memory-worthy fact, the moment it's noticed |
| Batch capture for periodic and context-threshold safety-net passes |
| Manual override — stores unconditionally when the user explicitly says "remember this" |
| Resolves a detected conflict between new and existing memory, with full version history |
Full request/response schemas: docs/architecture/api-design.md.
Design principles
Local-first, always. Memory lives in
<project_root>/.aimem/memory.db— a single portable SQLite file that moves with the project, survives renames, and is gitignored by default.Zero external dependencies. No Docker, no database server, no cloud API, no mandatory API key. The embedding model is bundled into the npm package at install time.
Project-scoped, not global. Each project's memory is fully isolated. There's no cross-project or organization-wide memory in v1 — that's an explicit, deliberate scope boundary.
Never silently overwrite. If new information contradicts something already stored, aimem flags the conflict and asks for confirmation before updating — old values are archived, not deleted.
Fail loud, never crash. A missing memory file is a normal fresh start. A corrupted one is reported with an exact, actionable error — the server never crashes the host AI client's connection.
The full reasoning behind every major decision — including two real, non-obvious bugs found and fixed during packaging (a missing shebang, and a symlink-resolution bug that silently broke every real install path) — is recorded in docs/decisions/ADR.md.
Installation
npm install -g aimem-mcpThen register aimem as an MCP server in your AI client's configuration, pointing at the installed binary. If your Node.js was installed via a version manager (nvm, fnm, volta), use an absolute path to both node and the server entry point rather than a bare aimem command — see docs/knowledge/setup/install-guide.md for why and the exact fix.
{
"mcpServers": {
"aimem": {
"command": "node",
"args": ["/absolute/path/to/aimem/dist/server.js"]
}
}
}Full prerequisites, verification steps, and troubleshooting: docs/knowledge/setup/install-guide.md.
Development
npm install # installs dependencies and bundles the local embedding model
npm run build # compiles TypeScript to dist/
npm test # fast unit + integration tests
npm run test:e2e # spawns the real compiled server over stdio
npm run lint # ESLintThis project follows a strict phase-based development discipline documented in docs/implementation/phases.md and docs/RULES.md — every change is tracked in docs/AGENT-LOG.md, and every non-trivial decision has a corresponding entry in docs/decisions/ADR.md.
Documentation
All project documentation lives under docs/:
Doc | Purpose |
Enforceable project rules — tech stack, naming, security, testing, phase discipline | |
Task log tracking every phase and task | |
Session-start prompts for agents continuing this project | |
Product requirements — problem, goals, non-goals, success metrics | |
Numbered functional requirements (FR-*) | |
Full architecture diagram, component responsibilities, tech stack | |
Sequence diagrams for every major operation | |
MCP tool schemas, request/response formats, error codes | |
Phase-by-phase build plan with checkboxes | |
Effort estimates, dependencies, risks, milestones | |
File structure, naming, TypeScript rules, git conventions | |
Error format, exact error messages, handling layers | |
Security principles, data handling, permissions | |
Testing rules, test types, examples | |
Install prerequisites, steps, troubleshooting | |
What exists right now vs. what's still pending | |
Per-component design docs (MCP server, storage, embeddings, capture, retrieval, conflict/versioning) | |
Step-by-step workflow walkthroughs for real usage scenarios | |
Architecture decision records — every major decision with its reasoning and trade-offs |
License
MIT © 2026 Yogesh Joshi
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA self-hosted MCP server that provides AI assistants with a shared, persistent SQLite-backed memory for storing and retrieving project context, decisions, and discoveries. It enables cross-session continuity and team-wide knowledge sharing to keep AI coding tools aligned and informed.Last updated3MIT
- Alicense-qualityCmaintenanceA local-first MCP server providing persistent, searchable knowledge base via SQLite, enabling AI agents to save and recall facts across sessions without cloud dependencies.Last updatedMIT
- Alicense-qualityDmaintenanceA local-first long-term memory system for AI coding agents, exposed as an MCP server.Last updated34MIT
- Alicense-qualityDmaintenanceA lightweight MCP server that gives AI assistants persistent, shared memory across sessions and team members, backed by a single SQLite database. It enables saving, searching, and retrieving observations and project context to maintain continuity and team knowledge.Last updated3MIT
Related MCP Connectors
Person-owned, portable AI memory as a remote MCP server, readable and writable by any MCP client.
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Cloud-hosted MCP server for durable AI memory
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yogesh-joshi-0333/aimem'
If you have feedback or need assistance with the MCP directory API, please join our Discord server