Agent Knowledge logo

Agent Knowledge

Cross-session memory with a git-synced knowledge base, hybrid search, session recall, graph traversal, and analysis tools.

Install Agent Knowledge

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "agent-knowledge": {
      "command": "npx",
      "args": [
        "agent-knowledge"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 6 tools correctly ().

Overview

agent-knowledge connects AI coding assistants to persistent knowledge entries and searchable session transcripts. It combines a git-synced Markdown vault with hybrid TF-IDF and semantic retrieval, embeddings, scoring, and optional graph relationships. Use it when agents need to recover decisions, project context, debugging history, or prioritized session-start context across tools and machines. Its MCP interface also supports knowledge analysis, code-graph links, embedding maintenance, and session administration.

Use cases

  • Recover decisions and debugging context from earlier coding sessions
  • Build a Git-synced memory vault for project knowledge
  • Generate prioritized context at the start of an agent session
  • Traverse dependencies and relationships between knowledge or code nodes
  • Find stale, duplicated, disconnected, or missing knowledge

Key features

  • Hybrid semantic and TF-IDF search across sessions and knowledge entries
  • Git-synced Markdown knowledge base with secrets scrubbing
  • Token-budgeted session-start context hydration
  • Temporal and code-structure knowledge graphs
  • Session adapters for major AI coding assistants
  • Knowledge quality analysis and embedding administration

Tools6

What Agent Knowledge lets your agent do. Expand a tool for its parameters.

Verified live~3.2k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

15/15 checks healthy over the last 84d

What it can do

From the 6 tools this server returned when we ran it.

Can delete or modify data · 3Handles credentials · 1Makes network requests · 2Read-only tools · 3
Network at startup3 connections
Files written at startup2
Install scriptsprepare
npm provenanceSigned build
Package age246 days
Maintainers1

Observed 2026-11-28 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 1d ago via OSV.dev · agent-knowledge (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars19Stargazers on the source repository.
Last commit10d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed6Callable tools this server registers over MCP.
Directory activity6 viewsConfig copies, upvotes, and views on AllMCPs.

How Agent Knowledge works

What agent-knowledge does

agent-knowledge provides cross-session memory for AI coding assistants through six action-based MCP tools. Its two primary data sources are a structured Markdown knowledge base and conversation histories discovered from supported coding tools. Knowledge entries can contain project context, decisions, workflows, gotchas, and other durable information; session search retrieves details from prior conversations even when those conversations came from a different assistant.

The knowledge base is synchronized through Git. Writes and deletes can trigger synchronization, while a separate action performs a manual pull and push. Before data is pushed, secrets such as API keys, tokens, passwords, and private keys are scrubbed. Entries support metadata including categories, authors, confidence, provenance, and an evergreen flag that prevents decay and promotion-based appending.

How it works

Search combines semantic vector similarity with TF-IDF keyword ranking. General searches cover both sessions and knowledge entries, with optional diversity handling and category boosts. Scoped searches focus on session recall for errors, plans, configurations, tools, files, or decisions. Fuzzy matching helps with spelling variations, and individual session messages can be indexed for verbatim retrieval.

At session start, the knowledge tool's wakeup action builds a token-limited context bundle. It prioritizes identity, active tasks, recent decisions, known gotchas, the previous session summary, weighted entries, and semantic fallbacks. The default budget is 800 tokens, with unused capacity passed to later sections.

A temporal knowledge graph connects entries with relationships such as depends_on, supersedes, contradicts, and part_of. Directed traversal supports inbound, outbound, or bidirectional exploration. Code relationships use calls, imports, and inherits, with code:-prefixed node IDs and bulk-linking support for ingestion workflows. Edges can have validity windows and can be queried as of a point in time.

Setup and configuration

Node.js 20 or newer is required. Session adapters automatically inspect local storage for Claude Code, Cursor, Codex CLI, Aider, Continue.dev, Cline, and OpenCode. Additional session directories can be supplied through the comma-separated AGENT_KNOWLEDGE_EXTRA_SESSION_ROOTS environment variable.

Embedding providers include local Hugging Face models, OpenAI, Claude/Voyage, and Gemini. Runtime configuration, including the Git URL, can be viewed or changed through knowledge_admin. The wakeup token limit can be changed with the tool's token_budget argument or AGENT_KNOWLEDGE_WAKEUP_BUDGET. Verbatim session indexing can be disabled with AGENT_KNOWLEDGE_INDEX_VERBATIM=false.

Tools and capabilities

  • knowledge lists, reads, writes, deletes, and synchronizes entries, and creates session-start context bundles.
  • knowledge_search searches sessions and knowledge entries using hybrid ranking, scopes, category boosts, and optional diversity behavior.
  • knowledge_session lists sessions or returns a complete conversation or summary.
  • knowledge_admin reports index status, changes configuration, rebuilds embeddings, removes orphaned session embeddings, and vacuums the database.
  • knowledge_graph creates, removes, imports, invalidates, and traverses temporal or code-structure edges.
  • knowledge_analyze detects duplicates, disconnected entries, highly connected nodes, bridges, gaps, stale entries, search gaps, and produces compact briefs.

Automatic promotion uses weighted signals and multiple gates, while analysis can expose a diary of promotion runs. New entries can be auto-linked to similar existing entries, and write-time duplicate checks help identify overlapping content. Staleness analysis compares file paths and quoted code identifiers in entries with recent session activity; entries marked evergreen: true are exempt.

Limitations and notes

Session data remains on the local storage used by each coding assistant, while the knowledge vault is the part designed for Git-based cross-machine synchronization. Adding support for another host requires an adapter implementing the SessionAdapter interface. Rebuilding embeddings is needed when changing embedding providers, and orphan cleanup removes vectors for sessions that no longer exist on disk. The Claude Code plugin additionally provides a /knowledge pane for browsing and searching the vault beside a conversation.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Agent Knowledge

agent-knowledge is an MCP server that connects AI coding assistants to a Git-synced Markdown knowledge base and local session histories. Its main tools support knowledge CRUD and wakeup context, hybrid search, session retrieval, graph traversal, administration, and analysis for persistent cross-session memory.

Install it in an environment running Node.js 20 or newer, then configure it as an MCP server for a supported coding assistant. Claude Code, Cursor, Codex CLI, Aider, Continue.dev, Cline, and OpenCode sessions are auto-discovered when their local data is available.

It supports Claude Code, Cursor, Codex CLI, Aider, Continue.dev, Cline, and OpenCode session discovery. Additional session roots can be added with the AGENT_KNOWLEDGE_EXTRA_SESSION_ROOTS environment variable.

It searches session transcripts with a combination of TF-IDF keywords and semantic vector similarity. General searches cover sessions and knowledge entries, while scoped searches filter session recall by errors, plans, configurations, tools, files, or decisions.

Yes. Its knowledge vault synchronizes through Git, including automatic synchronization after writes and deletes and a manual pull-and-push action. Session transcripts remain in the local storage used by each coding assistant.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAgent Knowledge AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/agent-knowledge?style=directory)](https://allmcps.com/mcp/agent-knowledge)
HTML Embed
<a href="https://allmcps.com/mcp/agent-knowledge"><img src="https://allmcps.com/api/badge/agent-knowledge?style=directory" alt="Agent Knowledge on AllMCPs" /></a>