MemCell
Living memory for AI coding agents: recall before acting, report outcomes so confidence is earned.
Install
Terminal
$npx -y memcell mcpmcp_config.json
{
"mcpServers": {
"ai-memcell-memcell": {
"args": [
"-y",
"memcell",
"mcp"
],
"command": "npx"
}
}
}Documentation
memcell
Persistent, adaptive memory engine for AI agents. Stop your agents from repeating the same mistakes across sessions.
= 20" />
[!IMPORTANT] This repository has been merged into the unified
memcell-ai/devkitmonorepo.
- Developer CLI & SDKs: All future development continues at memcell-ai/devkit.
- Official MCP Server & Registry Manifest: See memcell-ai/mcp.
This repository is now archived and read-only.
# Install globally
npm install -g memcell
# In any project:
memcell connect
Run it in any project. memcell connect automatically:
- Approves in 1 tap: Opens browser approval (no upfront account needed; guest memories carry over seamlessly on sign-in).
- Auto-detects agents: Wires Claude Code, Cursor, Copilot CLI, Gemini CLI, OpenAI Codex, OpenCode, Cline, Windsurf, and more with non-destructive lifecycle hooks and the local stdio MCP server (
memcell mcp). - Secures credentials: Stores scoped agent keys directly in your OS keyring (Keychain / Secret Service / Credential Manager).
- Creates
.memcell: Adds a clean, git-safe project descriptor to your repo root.
Verify anytime:
memcell status
Why MemCell?
Every time you start a new session with an AI agent, it starts with complete amnesia. It falls into the same traps, repeats outdated assumptions, and recreates issues you already resolved yesterday.
Static instruction files and monolithic system prompts don't solve this:
- Context Bloat: Stacking dozens of instructions wastes tokens on every turn and dilutes model attention.
- Zero Adaptability: Outdated instructions keep firing even when requirements change.
- Manual Overhead: You remain the sole feedback loop, constantly hand-editing markdown files.
MemCell gives your agents closed-loop memory:
- Pre-Action Recall — Before taking action, agents receive verified memories relevant to the current task.
- Execution & Feedback — When actions succeed or fail, real outcomes are reported back.
- Earned Confidence — Memories that work gain confidence; memories that fail decay. Zero manual prompt maintenance.
How It Works
MemCell pairs two lightweight layers so agents stay aligned without getting in your way:
- Deterministic Hooks (Zero-Touch): Fire automatically on session start, prompt submit, and turn end. Relevant memories and directives are checked before actions begin—without relying on the model remembering to call a tool. Hooks fail open in <50ms, so offline or slow networks never block your editor.
- MCP Tool Bridge (
memcell mcp): Provides interactive tools (recall,remember,report,ingest) when agents need to search memory or record discoveries mid-turn.
Everyday Usage
Once connected, agents recall and report memory automatically. You can also interact with memory directly from your terminal:
1. Recall Verified Context Before Implementing
memcell recall "how do we handle multi-tenant database sessions?"
2. Record a Decision or Convention
# Record a project convention
memcell remember "Always use pnpm for package operations; never invoke npm directly"
# Bind an invariant to a specific lifecycle trigger
memcell remember "Check database migrations for column locks before altering tables" --at "before db:migrate"
3. Report What Happened
Memories sharpen when told what happened. When an approach succeeds or fails, report the outcome:
memcell report stmt_019a4b2c worked --note "CI suite passed cleanly"
memcell report stmt_019a4b2c failed --note "broke Next.js 15 async cookies"
4. Ingest Specs and Existing Guidelines
# Ingest an architecture doc, spec, or post-mortem
memcell ingest docs/architecture/auth.md
# Scan and import existing guideline files (CLAUDE.md, etc.)
memcell import
5. Check Attributed Token Savings
memcell stats
Displays memories followed, errors avoided, estimated tokens saved from prevented error loops, and 30-day activity sparklines.
Supported Agents & IDEs
| Agent / Harness | Integration | How It Runs |
|---|---|---|
| Claude Code | Hooks + MCP + Plugin | Automatic lifecycle hooks or marketplace plugin (/plugin marketplace add memcell-ai/cli) |
| Cursor | Hooks + MCP Bridge | Native lifecycle hooks in .cursor/hooks.json and stdio bridge in .cursor/mcp.json |
| Gemini CLI | Hooks + MCP | Session and prompt hooks via native CLI harness |
| GitHub Copilot CLI | Lifecycle Hooks | Pre-command validation hooks |
| OpenAI Codex / OpenCode | Hooks + MCP | Project descriptor hooks and stdio tools |
| Cline & Windsurf | MCP Bridge | Native editor MCP client configuration |
| Factory Droid, Devin, Kiro, Goose | Hooks + MCP | Workspace adapters and tool harnesses |
Command Cheat Sheet
| Command | Description |
|---|---|
memcell connect | Connect this directory to MemCell, install hooks, and configure MCP |
memcell status | Check authentication standing, active project, and connection health |
memcell stats | Show memories followed, errors avoided, and token savings |
memcell recall <intent> | Query memory for verified memories and past outcomes before acting |
memcell remember <text> | File a project convention or directive (--at for lifecycle triggers) |
memcell report <id> <outcome> | Report worked, failed, or avoided to update confidence |
memcell ingest <file> | Distill a document or specification into atomic memories |
memcell import [files...] | Import existing guideline files (CLAUDE.md, etc.) |
memcell export | Export project memories as a portable document (--format json|md) |
memcell orgs | List or switch active organization (memcell orgs switch <slug>) |
memcell projects | List or switch active project (memcell projects use <slug>) |
memcell hook remove | Cleanly remove all MemCell hooks from this directory |
memcell reset | Clear all cached credentials, keys, and tokens on this machine |
Run memcell --help or memcell <command> --help for full flag details.
Clean Uninstall
To remove MemCell hooks from a repository without touching your code:
memcell hook remove
rm .memcell
To remove all stored keys and credentials from your local machine:
memcell reset
Links
- Documentation: https://memcell.ai/docs
- Website: https://memcell.ai
- Issues: https://github.com/memcell-ai/cli/issues
Apache License 2.0 · © 2026 OpenOri
Sourced from the repository README.
More in AI & Agents
- PonytailMakes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.109,599
- AgentsMulti-harness agentic plugin marketplace for Claude Code, Codex, Cursor, OpenCode, GitHub Copilot, and Google Antigravity39,079
- Frontend SlidesCreate beautiful slides on the web using a coding agent's frontend skills28,060
- Agent Skills Search ServerSearch and discover Agent Skills from the skills.sh registry. Powered by HAPI MCP server.25,980
- Agency Agents Zh🎭 267 个即插即用的 AI 专家角色 — 支持 Hermes Agent/Claude Code/Cursor/Copilot 等 18 种工具,覆盖工程/设计/营销/金融等 20 个部门。含 52 个中国市场原创智能体(小红书/抖音/微信/飞书/钉钉等)。搭配编排器 agency-orchestrator,一句话即可让多位专家按 DAG 自动协作。19,868
- Watermarks RemoverStrip multi-vendor AI provenance marks: Unicode text hygiene, statistical rewrite hooks, and C2PA/metadata from PNG/JPEG/SVG/PDF/DOCX/HTML/MD17,822