project-memory-mcp
Integrates with Windsurf (by Codeium) to provide project memory tools for AI agents.
Integrates with GitHub Copilot across VS Code, CLI, and JetBrains IDEs, allowing AI agents to access persistent project memory across sessions.
Allows JetBrains IDEs (IntelliJ, PyCharm, WebStorm, etc.) with the Copilot plugin to use project memory tools for reading and writing project memory.
Integrates with OpenAI Codex CLI to provide project memory tools for AI agents.
Specific integration for PyCharm IDE to use project memory via the GitHub Copilot plugin.
Specific integration for WebStorm IDE to use project memory via the GitHub Copilot plugin.
project-memory MCP server
A small, local MCP server that gives AI agents (Claude Code, Cursor, VS Code / GitHub Copilot, …) a shared, persistent memory of the projects in a code folder — what each project is, decisions made, and every bug/issue faced during development.
It is stateless: every tool reads/writes plain files on disk, so multiple clients (and multiple machines) share one source of truth.
The model
Layer | Lives in | Auto-loaded into context? | For |
Project memory |
| ✅ yes (via | identity, stack, run cmds, concise decisions/learnings — keep lean |
Issue log |
| ❌ no | high-volume bug/issue history — fetched on demand |
Design rule: durable, low-volume facts go in AGENTS.md (auto-loaded). High-volume
history (bugs) goes in issues.jsonl (queried via search_issues). This keeps the
always-loaded context small while keeping everything searchable.
Works even where MCP is locked down
Some orgs disable third-party MCP servers via policy (e.g. GitHub Copilot's MCP allowlist enforcement). Because the memory is plain files, not a service, the core value survives that:
The memory itself is just files.
AGENTS.mdis auto-loaded by the editor reading it — no MCP call involved — so a project's identity, decisions, learnings, and preferences still land in the agent's context.The policy is Copilot-scoped and per-client. It doesn't affect the same server in Claude Code or Cursor, and orgs running allowlist / registry-only mode can permit it — this server is published to the official MCP Registry (
io.github.kaaustubh/project-memory-mcp).
Only the interactive tools (log_issue, search_issues, …) go over the MCP channel; the
file-based memory keeps working without it.
Related MCP server: kontexta
Tools
list_projects,get_project,search_memory— read project memoryappend_decision,append_learning— append a dated bullet toAGENTS.mdremember_preference— turn a correction / stated habit into a remembered pattern (## Preferencesin the rootAGENTS.mdfor a global habit, or a project's for a local one); rides the auto-load, so it comes back next sessionlog_issue— record a bug/problem →issues.jsonlsearch_issues— "have we hit this before?" across all projects (field-scoped; optionaltagsfilter)list_open_issues,resolve_issue— track / close bugssync_registry— reconcile the rootAGENTS.mdprojects table with what's on disk (adds rows for new projects, flags stale ones)find_by_file— given a file path, surface the issues + decisions/learnings that touch it ("why is this code like this?")start_initiative,get_initiative,list_initiatives,update_initiative— track a named, multi-session effort (a codename, a plan, an evolving todo list) so it's resumable from any future session by name, not just within the one that started it; see Initiatives below
You don't call these directly — you talk to your agent in natural language and it picks the tool. See Using it day to day below for what to actually say.
Using it day to day
Most of it runs itself: opening a project auto-loads its AGENTS.md (the agent already
knows the project), and capture is proactive (plus the optional Stop hook). Your job is
mainly to pull memory at the right moments. Just talk to your agent:
When | Say something like | What fires |
Before debugging anything | "Have we hit this before? |
|
Starting something you've done elsewhere | "How did I do Stripe webhook verification in any project?" |
|
Landing on confusing code | "Why is |
|
You made a real decision / fixed a real bug | (nothing — it logs on its own and tells you) |
|
You correct how the agent works | "No, always run the typecheck before committing — remember that." |
|
Triage | "What's still open across my projects?" |
|
A bug is fixed | "Resolve pulse_stripe-004 — fixed by …" |
|
Added a new project | "Sync the registry." |
|
The one habit that matters: make "have we hit this before?" reflexive before every debugging session. That's where a memory tool earns its keep; the rest the system handles.
Capture is confirming, not silent — when the agent logs something it tells you in one line. Correct it freely: "don't log that", or "actually, log this too."
Escape hatches: PROJECT_MEMORY_HOOK=off silences the Stop hook for one session;
uninstall-hook removes it entirely.
Install (npm — recommended)
From your code/projects folder, run:
cd ~/code # the folder that holds your projects
npx -y @kaaustubh/project-memory-mcp installThat registers the server, using the current directory as your projects root, with every client that has an MCP config location on this machine:
Client | Config written |
Claude Code | user scope, via |
Cursor |
|
VS Code / GitHub Copilot Chat | user-profile |
GitHub Copilot CLI |
|
JetBrains Copilot plugin (IntelliJ, PyCharm, WebStorm, …) |
|
Visual Studio (Windows) |
|
Kimi Code CLI |
|
Gemini CLI |
|
OpenAI Codex CLI |
|
Windsurf |
|
Each write merges into the existing file (other MCP servers you've already configured are
left alone) and is independently best-effort — a client that isn't installed on this
machine is silently skipped, the rest still get registered. Restart whichever app(s) you
use, then ask your agent "set up project memory for this folder" to scaffold AGENTS.md
for each project.
Copilot surfaces (VS Code, CLI, JetBrains, Visual Studio): tools only run in Agent mode, and config changes need a restart to take effect.
No clone, no global install — the MCP config just runs
npx, which fetches and runs the latest version on demand.
Team memory (beta signup): want this memory shared across your team instead of just your machine? Register your interest: https://github.com/kaaustubh/project-memory-mcp/issues/1
From source instead
git clone https://github.com/kaaustubh/project-memory-mcp.git ~/code/.memory-server
cd ~/code/.memory-server && ./install.shHow it works (after install)
A common question: "once I install it, does it just start doing things?" Not quite — the server is passive. Here's the actual flow:
Restart your editor. MCP servers are loaded at startup, so the server only becomes available the next time you launch Claude Code / Cursor / VS Code.
Push layer (automatic, not the server): when you open a project, the editor reads
AGENTS.md(viaCLAUDE.md→@AGENTS.md) into the model's context for you. This is why the agent "just knows" what your project is — it's a built-in editor feature.Pull layer (the server, on request): the server announces its tools and then waits. It does nothing on its own. The agent calls a tool only when it's relevant — e.g. you say "log this bug" or "have we hit this before?", or the model decides a tool is useful. There's no background process or scanning.
Day one is empty. A fresh setup has no
AGENTS.mdfiles yet, so the auto-load has nothing to load andlog_issuewill refuse until a project's memory exists. Bootstrap once by asking your agent: "set up project memory for this folder" — it creates theAGENTS.mdfiles. After that, everything works.
In short: a convention (auto-loaded files) + a tool the agent chooses to use + a one-time setup. No magic, no daemon.
Proactive capture (you don't have to say "log this")
The server ships a standing capture policy (sent to the client on connect, plus directive tool descriptions), so the agent records things on its own instead of waiting for you to ask:
Before debugging a reported error → it checks
search_issuesfor a prior fix.After fixing a non-trivial bug → it calls
log_issue.After a real decision or a durable gotcha →
append_decision/append_learning.After you correct how it works or state a habit →
remember_preference, so the one-time correction becomes a pattern it brings back next session.
It's proactive but not silent: the agent tells you in one line what it recorded, asks when unsure rather than logging noise, and skips trivia and secrets. You can always override — "log this", or "don't bother". The standing policy is best-effort (it depends on the model following it); for a hard guarantee, add the opt-in Stop hook below.
Guaranteed capture (opt-in Stop hook)
The standing policy can be forgotten mid-session. The Stop hook makes capture non-optional: when the agent tries to end a turn, it runs once and blocks the stop to ask for one capture pass when either (a) real work happened (file edits or a commit) and nothing was written to project memory, or (b) you corrected how it works and no preference was saved. If memory was already written, or nothing changed and you didn't correct it, the hook stays silent and lets the turn end.
npx -y @kaaustubh/project-memory-mcp install-hook # turn it on (then restart Claude Code)
npx -y @kaaustubh/project-memory-mcp uninstall-hook # turn it offOff by default — plain
installdoes not add it; you enable it explicitly.No loops — it fires at most once per turn (guarded by
stop_hook_active), then lets the agent stop.Per-session kill switch — set
PROJECT_MEMORY_HOOK=offto disable without uninstalling.Cost — it adds one extra model turn only on sessions that changed code but logged nothing, or where you corrected the agent and no preference was saved; silent otherwise.
Automatic recall (opt-in UserPromptSubmit hook)
Capture is only half the loop — the other half is remembering to look. The recall hook closes it: every time you submit a prompt, it matches your request against your issue history and decisions/learnings/preferences, and silently injects the strongest hits as context. So a prior fix or decision surfaces without you (or the agent) remembering to search — the "have we hit this before?" habit becomes automatic.
npx -y @kaaustubh/project-memory-mcp install-recall # turn it on (then restart Claude Code)
npx -y @kaaustubh/project-memory-mcp uninstall-recall # turn it offSemantic matching (when available) — if the optional embeddings model (
@xenova/transformers) is installed, recall matches by meaning, so "the build is broken" still surfaces an issue logged as "compile failure" even with no shared words. Runs fully offline (the model is fetched once, then cached). Without it, recall falls back to keyword matching automatically — no configuration, nothing breaks.Silent unless relevant — injects nothing for trivial prompts or when there's no match.
Ranked & capped — current-project hits rank highest; at most 4 lines are injected.
Off by default — like the Stop hook, it's opt-in (per-prompt cost). Plain
installadds neither hook.Per-session kill switch — set
PROJECT_MEMORY_RECALL=offto disable without uninstalling.
Warm the cache: after a big logging session (or once, after enabling recall) run
npx -y @kaaustubh/project-memory-mcp reindexto pre-embed everything, so the first recall isn't the one that pays for it. Vectors are cached per project in a derived.embeddings.json(safe to delete / git-ignore — the.jsonl+AGENTS.mdstay the source of truth).
Pair it with the Stop hook and the loop runs itself: the Stop hook guarantees things get saved, the recall hook guarantees they come back at the right moment.
Initiatives (named, cross-session work tracking)
Decisions/Learnings capture finished facts, and issues.jsonl captures bug history —
neither has a home for a named, in-flight, multi-session effort: "give this a codename,
track the plan and todos, and let me resume it by name even in a session that's never seen
it before." That's what start_initiative / get_initiative / list_initiatives /
update_initiative are for.
you: "Let's call this HashGate. Track the plan and todos under that name."
→ start_initiative(project, codename: "HashGate", plan: "...", todos: [...])
(new session, days later)
you: "Where did we leave off on HashGate?"
→ get_initiative(project, codename: "hash gate") # case/spacing-insensitive match
you: "Continue where I left off" (no codename given)
→ list_initiatives(project) # or omit project to search everywhereEach initiative lives in its own file, <project>/initiatives/<slug>.md — a plan, a
checkbox todo list, and a dated progress log, all editable in place. A one-line pointer to
every active initiative is kept in sync under ## Active Initiatives in the project's
AGENTS.md, so a brand-new session sees what's in flight in its auto-loaded context,
with zero tool calls. Marking one done removes the pointer; the file itself stays as
history, still reachable by name.
Across machines
The tool and your memory content sync separately:
Tool: nothing to sync —
npxalways pulls the published version (orgit pullif you installed from source).Content: each project's
AGENTS.md+issues.jsonllive inside that project's own git repo, so cloning your projects brings their memory along. Nothing to copy.
issues.jsonlholds real bug details — only commit it into private repos.
New-project scaffold
For a new project under the root, create <project>/CLAUDE.md containing @AGENTS.md
and a <project>/AGENTS.md with ## What this is, ## Stack & layout,
## Run / build / test, ## Decisions, ## Learnings sections.
Changelog
v1.10.0
Feature:
installnow also registers Kimi Code CLI (~/.kimi-code/mcp.json, or$KIMI_CODE_HOME— not to be confused with the separate "Kimi CLI" product, which uses~/.kimi/mcp.json), Gemini CLI (~/.gemini/settings.json), and Windsurf (~/.codeium/windsurf/mcp_config.json) — all three match the existingmcpServers/no-typeschemaregisterMcpalready handles for Cursor, so each was a one-line addition. OpenAI Codex CLI (~/.codex/config.toml) needed real work: it's the first non-JSON client, configured via TOML[mcp_servers.<name>]tables. AddedregisterMcpToml, a text-based find-the-table/replace-or-append merge (same spirit asappendBulletToFile's heading match) rather than a TOML parser dependency — keeps the zero-hard-dependency posture. Caught and fixed a real bug in it before shipping: the first version matched a table's body as "everything up to the next literal[," which truncates mid-table becauseargs = [...]arrays use[too — fixed to match "up to the next line that starts with[" instead, verified idempotent across repeatedinstallruns against a pre-seeded config.toml with an unrelated table.
v1.9.0
Feature: Initiatives. Four new tools —
start_initiative,get_initiative,list_initiatives,update_initiative— track a named, multi-session effort (a codename, a plan, an evolving todo list) so it's resumable by name from ANY future session, not just the one that started it. Motivated by a real failure mode reported using another agent's session-local "codename" convention: no persistent registry mapping name → session, todos scoped to one session's private store, and discovery requiring an exact-string match across raw transcripts. Fixed here by storing one markdown file per initiative (<project>/initiatives/<slug>.md— mutable, so todo checkboxes toggle in place) plus a synced pointer under a new## Active Initiativesheading in the project's auto-loadedAGENTS.md, so a brand-new session sees what's in flight with zero tool calls. Codename matching is case/spacing-insensitive (slugifysplits camelCase boundaries first, so"HashGate"and"hash gate"resolve to the same initiative).list_initiativessearches across all projects when none is given, so "what was I working on?" doesn't require remembering which repo it was in either.
v1.8.3
Infra: Added a real CI workflow (
.github/workflows/ci.yml, Node 18/20/22 matrix) backed by a new stdio smoke test (scripts/smoke-test.mjs— spawns the server, does theinitialize→tools/listhandshake, asserts all 12 tools register), plus a CodeQL workflow. Both were previously entirely absent, which is why Glama's quality page showed "CI status not available" and "No code scanning findings" — those weren't clean bills of health, they meant "never measured."Fix: Regenerated
package-lock.json— it predated@xenova/transformersever being resolved with optional deps included, sonpm cifailed on a clean CI runner. Also rannpm audit fix(non-breaking), which cleared the@modelcontextprotocol/sdk-transitivehono/body-parser/fast-uriadvisories. Known issue:@xenova/transformers(optional, powers semantic recall) still pulls in a critical + 4 high severity CVEs via itsonnxruntime-web/protobufjs/sharpchain; the only fix is a breaking downgrade to1.4.2, deliberately not done yet — tracked as a follow-up.
v1.8.2
Docs/meta: Added
glama.json(declaresmaintainers) to fix Glama's "No glama.json" profile-completion check. Paired with cutting an actual GitHub Release for this version (previously we only pushed git tags, which Glama's "Has a release" check doesn't see — it reads the Releases API, not tags).
v1.8.1
Docs: Added the Glama quality-score badge to the README, per awesome-mcp-servers's listing requirement. Uses
/badges/score.svg(a real SVG), not the plain/badgepath — the latter 200s but serves a 0-byteimage/png, i.e. broken.
v1.8.0
Feature:
installnow also registers GitHub Copilot CLI (~/.copilot/mcp-config.json, or$COPILOT_HOME), the JetBrains Copilot plugin (IntelliJ/PyCharm/WebStorm/…), and Visual Studio on Windows (global.mcp.json) — rounding out every Copilot surface alongside the VS Code registration added in 1.7.0. Each target merges into its existing config (other servers are preserved) and is independently best-effort, so a client that isn't installed is silently skipped rather than failing the whole install. Schemas differ per client (mcpServersvsserverstop-level key;type: "local"for the Copilot CLI vstype: "stdio"for the IDE-embedded ones) — verified against each client's current docs before implementing. The merge logic for all five targets was consolidated into oneregisterMcp()helper.
v1.7.0
Feature:
installnow also registers the server with VS Code / GitHub Copilot (user-profilemcp.json, so it applies to every workspace), alongside the existing Claude Code and Cursor registration. Schema differs from Claude/Cursor (serverskey,type: "stdio"per entry) and Copilot tools only run in Chat's Agent mode.
v1.6.2
Docs: added a team-memory beta signup note (README install section + the
installsubcommand's console output) — https://github.com/kaaustubh/project-memory-mcp/issues/1
v1.6.1
Docs: added "Works even where MCP is locked down" — clarifies that the file-based memory (
AGENTS.mdauto-load) keeps working even where an org disables third-party MCP servers (e.g. GitHub Copilot's MCP allowlist), since only the interactive tools use the MCP channel.
v1.6.0
Semantic recall (optional local embeddings). The recall hook now matches your prompt against memory by meaning, not shared substrings — "the build is broken" surfaces an issue logged as "compile failure". Powered by a local, offline embedding model (
Xenova/all-MiniLM-L6-v2via the optional@xenova/transformersdependency); vectors are cached per project in a derived.embeddings.json, keyed by content hash so edited/removed items self-invalidate. If the model isn't installed it falls back to the previous keyword matching automatically — nothing to configure, nothing breaks. Newreindexsubcommand pre-embeds all memory so the first recall isn't slow. This completes the long-deferred "semantic retrieval" lever behind both recall andsearch_issues; keyword remains the zero-dependency floor.
v1.5.0
Automatic recall (opt-in
UserPromptSubmithook). Newinstall-recall/uninstall-recallsubcommands register a hook that keyword-matches every prompt against your issue history and decisions/learnings/preferences and silently injects the strongest hits as context — so prior fixes and decisions surface without anyone remembering to search. Closes the other half of the capture↔recall loop. Silent on trivial/no-match prompts (generic filler words ignored), current-project hits ranked highest, at most 4 lines injected. Off by default; per-session kill switchPROJECT_MEMORY_RECALL=off.
v1.4.1
Packaging: add the
mcpNamefield (io.github.kaaustubh/project-memory-mcp) required to list the server in the official MCP Registry. No functional change.
v1.4.0
remember_preference— corrections become remembered patterns. New tool that writes a dated bullet under## Preferences, either in the rootAGENTS.md(scopeglobal— applies to every project) or a single project's. Because preferences live in the auto-loadedAGENTS.md, recall is free: a one-time correction ("never add a co-author trailer", "always typecheck before committing") comes back next session and is applied instead of re-corrected. Closes the cross-session loop for how you like to work, not just project facts.Correction-aware Stop hook + capture policy. The standing policy now nudges
remember_preferenceafter a correction, and the opt-in Stop hook scans the session for behavioural-correction phrases ("from now on…", "no, don't…", "always use…"): if you corrected the agent and no preference was saved, it blocks the stop once to ask — a second, independent reason alongside the existing "code changed but nothing logged" check.
v1.3.2
Docs: added a "Using it day to day" section — the natural-language prompts that map to each tool, the one habit that matters ("have we hit this before?"), and the escape hatches. Clarifies that you talk to the agent rather than calling tools directly.
v1.3.1
Stop hook: count direct memory edits as capture. The hook previously recognized only
mcp__project-memory__*tool calls, so editingAGENTS.md/issues.jsonldirectly (an endorsed capture path) still triggered the nag. It now also treats anEdit/Writeto a file ending inAGENTS.mdorissues.jsonlas captured — eliminating the false positive.append_decision/append_learning: no more duplicate sections. Heading matching was whole-line (^## Learnings$), so a heading with trailing text (## Learnings (gotchas …)) wasn't found and a duplicate section got appended. Now matches the heading's leading word.
v1.3.0
Guaranteed capture (opt-in Stop hook). New
install-hook/uninstall-hooksubcommands register a Claude CodeStophook that forces a single capture pass when a session changed code but recorded nothing to memory — turning the best-effort policy into a hard guarantee. Off by default, fires at most once per turn (no loops), silent when nothing changed or memory was already written, and disablable per-session viaPROJECT_MEMORY_HOOK=off.
v1.2.0
Sharper issue search.
search_issuesnow matches only the text fields (symptom/cause/fix/id/tags) instead of the raw JSON, so queries no longer get false hits on field names. Added an optionaltagsfilter;queryis now optional (search by tags alone).sync_registry. Reconciles the rootAGENTS.mdprojects table with the projects on disk — adds stub rows for projects missing from the table, flags rows whose directory is gone, and reports live open-issue counts. Automates the previously manual "new project → add a row" step. Hand-curated columns are preserved;apply=falsereports drift only.find_by_file. Given a file path/fragment, returns the issues (via theirfilesfield) and the decisions/learnings (via AGENTS.md bullets that mention it) touching that file — code↔memory linking for "why is this code the way it is?".
v1.1.1
Docs only: publishes the changelog to the npm page for parity (no functional change).
v1.1.0
Proactive capture. The agent now records memory on its own instead of waiting for "log this": a standing capture policy is sent on
initializeand the write/search tool descriptions are directive. It stays confirming (tells you what it logged), asks when unsure, and skips trivia/secrets. Explicit calls still work as an override.Docs: added "How it works (after install)" and "Proactive capture" sections.
v1.0.1
Fix
npx … installfailing with "command not found" — the bin is renamed toproject-memory-mcpto match the unscoped package name (npx resolution rule).
v1.0.0
Initial release: stateless MCP server over
AGENTS.md+issues.jsonl, 9 tools (project memory + issue tracking),npx … installfor Claude Code and Cursor, and the push/pull memory model.
Maintenance
Related MCP Servers
FlicenseAqualityBmaintenanceSelf-hosted MCP-native agent memory server. Gives AI agents persistent, decay-weighted memory via 83 MCP tools — no cloud, full control. RocksDB+HNSW backend. Works with Claude Code, Cursor, and any MCP-compatible agent.Last updated147- AlicenseAqualityBmaintenanceA local-first MCP server that gives AI coding agents persistent memory and controlled commands. Features a git-backed markdown knowledge vault with FTS5 search, surgical section edits, token-aware context budgeting, and a sandboxed command engine with human approval gates. Works with Claude Code, Cursor, Copilot, Gemini, and more.Last updated531Apache 2.0
- AlicenseAqualityAmaintenanceLocal-first MCP server that gives any AI coding agent per-project memory, workflow intelligence, and always-on, lossless token & context optimization.Last updated37353MIT
- Alicense-qualityDmaintenanceA local-first long-term memory system for AI coding agents, exposed as an MCP server.Last updated34MIT
Related MCP Connectors
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Person-owned, portable AI memory as a remote MCP server, readable and writable by any MCP client.
An MCP server that gives your AI access to the source code and docs of all public github repos
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/kaaustubh/project-memory-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server