forgemind-brain
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.
forgemind-brain
Local memory for AI coding agents. Claude Code, Cursor and Codex share one brain on your machine. Each new session knows what was done in a project, what worked and what failed, without you re-explaining it.
Private by design: one SQLite file in
~/.forgemind. It is never in git, never uploaded, and has no cloud service and no telemetry.You stay in control: agents can propose lessons. A lesson guides future sessions only after you approve it, so wrong guesses don't pile up.
Works across tools: a lesson approved while you use Cursor is there the next time you open Claude Code.
Small: about 1,100 lines of TypeScript. The only runtime is Node.js, with no other dependencies.
How it works
Claude Code ─┐ ┌─ lessons, conventions, decisions (you approve)
Cursor ──────┼── MCP + hooks ──► brain.sqlite ─┼─ session history (what was done, outcome)
Codex ───────┘ └─ attachments (screenshots, PDFs)Session start: a hook loads a short, size-capped packet into the agent's context. It holds the approved lessons for this project and recent history.
During work: the agent can search the brain, record what it did, attach screenshots (for example from a bug bash) and propose new lessons.
Session end: a hook records a fallback summary (first prompt and changed files), so nothing is lost if the agent forgets.
You review:
npm run brain -- list --workspace <project> --status proposed, thenapproveorreject.
The server also tells agents to record a short summary after they read tickets, chats or email (Jira, Slack, Teams, Outlook) through your other MCP connectors. The summary holds decisions, outcomes and IDs; raw message content is never pasted. That way what an agent learned there is not lost when the session ends.
Related MCP server: apex-memory
Quick start
Requires Node.js 26.7 or newer (it uses the built-in node:sqlite). Tested on macOS.
git clone https://github.com/sleepingfreak94/forgemind-brain.git
cd forgemind-brain
npm ci
npm run install-local # builds and installs to ~/.forgemind/binConnect Claude Code:
claude mcp add --scope user forgemind-brain -- node ~/.forgemind/bin/brain-mcp.js --source claude-codeThen add the session hooks so memory loads and saves automatically. Cursor and Codex setup is in docs/brain.md.
Try it in any project:
npm run brain -- add --workspace ~/code/my-app --kind lesson \
--text "Run e2e tests with --workers=1; parallel runs flake on CI." --reason "seen twice"
npm run brain -- list --workspace ~/code/my-app --status proposed
npm run brain -- approve --workspace ~/code/my-app --id <id>The next agent session in ~/code/my-app starts with that lesson in its context.
What gets stored
Kind | Example | Needs approval |
| "Mocking the clock broke the retry test; use fake timers." | yes |
| "Commit subjects follow type(scope): description." | yes |
| "We chose SQLite over Postgres for local state." | yes |
| "API handlers validate input at the boundary." | yes |
history | "Fixed login redirect: worked; tried cookie fix first: failed." | no (facts) |
attachment | screenshot of the bug, before and after | no |
Text that looks like a secret (API keys, tokens, passwords) is refused or redacted. Agents never read the database directly: they get at most 3,200 characters of context and 5 search results at a time.
Learn from an existing repo
npm run brain -- learn --workspace ~/code/my-app --source allThis reads the git log, branch names and merged PRs (via gh), then proposes
conventions it finds, such as "commit subjects follow type(scope)". They wait for your approval.
Docs
docs/brain.md: full reference covering commands, tool setup, hooks, attachments and limits.
docs/migrating-from-forgemind.md: only for users of the old ForgeMind harness.
Contributing
Issues and PRs are welcome. Run npm test before you open a PR. See
AGENTS.md for the rules agents and humans follow in this repo.
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 AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
Shared AI memory. ChatGPT, Claude, Cursor and any MCP app read and write the same memory.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceLocal-first cross-agent memory for AI coding agents. Persistent, shared memory over MCP — what you tell one agent can be recalled by another — with all data stored in a single local SQLite file, no cloud and no API keys.-
- AlicenseNot gradedqualityDmaintenancePersistent memory for AI coding agents. Enables agents to save and recall decisions, patterns, bugs, and context across sessions via an MCP server with local SQLite storage.16 npm2MIT
- AlicenseNot gradedqualityDmaintenanceLocal, cross-agent memory for AI coding agents using a single SQLite file, enabling persistent sessions and durable facts shared across multiple MCP-compatible tools.15 npmMIT
- AlicenseAqualityBmaintenancePersistent memory for AI coding agents, storing decisions, bug fixes, conventions, and discoveries in a local SQLite database and automatically recalling them when relevant. Works with Claude Code, Codex, Cursor, Gemini CLI, and other MCP-compatible agents.224MIT