MCP.so
Sign In

Kage

@kage-core

About Kage

A framework for collaborative agent memory. Kage is shared, code-grounded memory for developers and their coding agents: capture a learning once — a bug cause, a decision, a gotcha — and the whole team plus every agent recalls it next time it's relevant. Memory is grounded in you

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "kage": {
      "command": "npx",
      "args": [
        "-y",
        "@kage-core/kage-graph-mcp"
      ]
    }
  }
}

Tools

11

Primary kage entry point. Validates memory health, recalls relevant packets, and queries both the code graph and knowledge graph — all in one call. Call this at the start of every task; it answers caller/usage questions from the code graph too, so you rarely need a separate graph tool.

Assess modification risk for files using Kage's code graph plus local git history: dependents, impact surface, churn, ownership, co-change partners, and test gaps. Use before editing hotspot or shared files.

Find how two files are connected in Kage's source-derived code graph. Reports direct dependency direction, reverse impact direction, or undirected graph connection.

Summarize the repo's 'why' memory at a glance: the decisions, gotchas, runbooks, conventions, and code explanations Kage has captured, plus which high-traffic code paths still have no decision memory. Use it to brief yourself on a repo before changing it, or to audit where institutional knowledge is thin or going stale. Read-only: returns grouped entries with titles, types, cited file paths, and call-outs for weak, stale, or undocumented hot paths. Does not modify any memory.

Search this repo's OWN committed documentation (README, docs/**, *.md, common doc dirs — including any framework/API docs checked into the repo). BM25 over heading-anchored chunks from .agent_memory/indexes/docs-index.json. Returns ranked doc hits with doc_path, heading, line, and snippet. This indexes only files on disk in the project, never the internet.

Rebuild repo indexes, code graph, memory graph, metrics, and stale-memory metadata. Agents should run this after meaningful file/content changes before PR checks; push-only or same-tree commits do not need another refresh. On non-default git branches metadata-only packet rewrites are skipped (quiet refresh) to avoid merge conflicts; pass force to persist them anyway.

Check whether repo memory, code graph, memory graph, and stale-memory state are ready for merge. Leads with a human summary of team memories invalidated by the current change — relay it to the developer.

Replace one repo-local memory packet with a newer one that corrects or obsoletes it. Marks the old packet superseded, links it to the replacement, and writes bidirectional lineage edges so the history stays traceable. Use this instead of deleting when new knowledge updates an old fact, or to resolve a contradiction surfaced by kage_conflicts. Mutates both packets on disk: the superseded packet is withheld from recall but kept for lineage.

Codify durable, verified repo memory (runbooks, workflows, actionable decisions) into git-native SKILL.md files under .claude/skills/ that every teammate's agent auto-loads. Only grounded, non-stale packets become skills. Pass dry_run to preview without writing. dir overrides the output directory.

Capture a durable, reusable learning from the current session as a verified repo-local memory packet (committed under .agent_memory/, shared with the team via git). Use it the moment you discover something a future session should know: a decision and its rationale, a bug's root cause and fix, a convention, or a setup step. Prefer it over diff-based proposals when you already know what was learned. The write is rejected if every cited path is missing from the repo (set allow_missing_paths for a file you are about to create), and secrets/PII are scanned out before writing. Returns the new packet id plus any contradiction warnings against existing memory.

Record how useful a recalled repo-local memory packet was, which tunes Kage's trust and future recall. 'helpful' reinforces the packet, 'wrong' flags it as disputed, and 'stale' marks it for re-verification and withholds it from recall until refreshed. Use it right after a recalled packet helped you, misled you, or no longer matched the code. Mutates the packet's quality signals on disk.

Overview

What is Kage?

Kage is a framework for collaborative agent memory that is shared, code-grounded memory for developers and their coding agents. It captures a learning once—such as a bug cause, a decision, or a gotcha—so that the whole team plus every agent recalls it next time it is relevant.

How to use Kage?

Run the command npx -y @kage-core/kage-graph-mcp to try it in about 30 seconds. Memory is stored as git-tracked JSON that is reviewed in pull requests, and it works with any MCP client.

Key features of Kage

  • Shared memory grounded in your actual code.
  • Stored as git-tracked JSON reviewed in pull requests.
  • Citations validated on write to maintain accuracy.
  • Stale memory automatically withheld and flagged.
  • Works with Claude Code, Codex, Cursor, and Windsurf.
  • No vector database, API key, or service to run.

Use cases of Kage

  • Capture a bug cause once so the whole team and agents avoid repeating it.
  • Onboard new developers with an automatically recalled knowledge base.
  • Keep coding agents consistent by giving them access to shared learned decisions.
  • Review memory changes in pull requests like any other code change.

FAQ from Kage

Does Kage require any external services or API keys?

No. Kage does not need a vector database, API key, or any external service to run.

How is memory stored and reviewed?

Memory is stored as git-tracked JSON files, so changes are reviewed in pull requests like regular code changes.

What happens if the code that a memory references is deleted or refactored?

Stale memory—whose referenced code has been deleted or refactored—is withheld from recall and flagged for you, while citations are validated on write.

Which coding agents and MCP clients does Kage work with?

Kage works with Claude Code, Codex, Cursor, Windsurf, and any MCP client.

Frequently asked questions

Does Kage require any external services or API keys?

No. Kage does not need a vector database, API key, or any external service to run.

How is memory stored and reviewed?

Memory is stored as git-tracked JSON files, so changes are reviewed in pull requests like regular code changes.

What happens if the code that a memory references is deleted or refactored?

Stale memory—whose referenced code has been deleted or refactored—is withheld from recall and flagged for you, while citations are validated on write.

Which coding agents and MCP clients does Kage work with?

Kage works with Claude Code, Codex, Cursor, Windsurf, and any MCP client.

Comments

More Developer Tools MCP servers