Best MCP Servers for Memory and Knowledge Management in 2026
Persistent memory is the unsolved problem in AI agents. A session ends, context disappears. The memory/knowledge category in the AgentRank index has the fastest freshness rate in the index at 37.6% — more active new development here than any other category. We scored 1382 memory and knowledge tools. Here are the ones doing it right.
Top memory and knowledge MCP servers
Ranked by the composite AgentRank score — a weighted blend of stars (15%), freshness (25%), issue health (25%), contributors (10%), and inbound dependents (25%). Average score across all 1382 memory and knowledge tools is 33. The tools below are in the top tier.
| # | Repository | Score | Stars | Use Case | Lang |
|---|---|---|---|---|---|
| 1 | oraios/serena Coding agent toolkit with semantic retrieval and editing via MCP server and other integrations | 93.61 | 21,474 | Semantic Code Retrieval | Python |
| 2 | ForLoopCodes/contextplus Semantic intelligence MCP server combining RAG, Tree-sitter AST, and Obsidian-style linking for large codebases | 88.35 | 1,459 | Codebase Knowledge Graph | TypeScript |
| 3 | Gentleman-Programming/engram Persistent memory system for AI coding agents — agent-agnostic Go binary with SQLite, MCP server, HTTP API, CLI, and TUI | 86.25 | 1,290 | Persistent Session Memory | Go |
| 4 | DeusData/codebase-memory-mcp MCP server that indexes your codebase into a persistent knowledge graph — 64 languages, sub-ms queries | 75.79 | 649 | Codebase Indexing | C |
| 5 | samvallad33/vestige Cognitive memory for AI agents — FSRS-6 spaced repetition, 29 brain modules, 3D dashboard, single 22MB Rust binary | 72.71 | 420 | Cognitive / Long-term Memory | Rust |
| 6 | CheMiguel23/MemoryMesh Knowledge graph server using MCP to provide structured memory persistence for AI models | 72.25 | 335 | Knowledge Graph | TypeScript |
| 7 | GreatScottyMac/context-portal Memory bank MCP server building project-specific knowledge graphs for AI-powered RAG in IDEs | 67.12 | 756 | Project Memory Bank | Python |
Choosing by use case
Semantic codebase retrieval (serena)
oraios/serena tops this category at a score of 93.61 with 21,474 stars and 134 contributors — by far the most active project here. It is a coding agent toolkit built around semantic retrieval: instead of loading entire files into context, it retrieves exactly the code an agent needs based on the task. Supports MCP and other integration modes. The contributor count (134) suggests this is now institutional-grade tooling, not a side project.
Large codebase intelligence (Context+)
ForLoopCodes/contextplus scores 88.35 with a novel approach: it combines RAG, Tree-sitter AST parsing, spectral clustering, and Obsidian-style linking to turn a large codebase into a searchable, hierarchical feature graph. The goal is 99% accuracy — the claim is that most retrieval tools fail on large codebases because they don't understand code structure. Context+ uses AST to understand it. Only 2 open issues, active commits, and 1,459 stars.
Persistent session memory (engram)
Gentleman-Programming/engram is the dedicated memory store in this list, scoring 86.25 with 1,290 stars. It is agent-agnostic: a single Go binary with SQLite + FTS5 that provides an MCP server, HTTP API, CLI, and a TUI for browsing stored memories. The key property is persistence — memories survive across sessions and across tools. Works with Claude Desktop, Cursor, Cline, and any MCP client. If you want an agent that remembers decisions, preferences, and context between sessions, this is the tool.
Codebase knowledge graph (codebase-memory-mcp)
DeusData/codebase-memory-mcp takes a different angle on codebase memory: it indexes your entire codebase into a persistent knowledge graph with 64-language support and sub-millisecond queries. Score of 75.79 and 649 stars. The 99% token reduction versus grep is the headline — instead of loading thousands of lines for context, agents query the graph. Single Go binary, no Docker, no API keys required.
Cognitive memory with decay (vestige)
samvallad33/vestige is the most interesting architectural experiment in this list, scoring 72.71. It models memory biologically — using FSRS-6 spaced repetition to apply forgetting curves to stored facts, with 29 distinct "brain modules" representing different memory types (episodic, semantic, procedural, etc.). The idea: agents should forget irrelevant information over time, not accumulate it indefinitely. 22MB Rust binary, 420 stars, and an integrated 3D memory visualization dashboard.
Structured knowledge graphs (MemoryMesh)
CheMiguel23/MemoryMesh provides structured graph memory — typed nodes and relationships rather than text blobs. Score of 72.25 with 335 stars. The distinction matters: a flat memory store answers "what do you remember about X?", while a knowledge graph answers "what does X depend on?" and "who maintains X?". TypeScript, 4 contributors, active maintenance.
Project-scoped memory bank (context-portal)
GreatScottyMac/context-portal (ConPort) builds a project-specific knowledge graph scoped to your IDE workspace, scoring 67.12 with 756 stars. Rather than general-purpose agent memory, ConPort focuses on what AI coding assistants need in an IDE context: decisions made, code patterns, project conventions, and architectural context. RAG-powered retrieval from a local graph. Python, 10 contributors.
What to watch for
This category moves faster than any other
The memory/knowledge category has a freshness rate of 37.6% in the AgentRank index —
the highest of any category. More tools are being actively committed to here than in database,
DevOps, or communication tooling. The problem is unsolved and the competition is real.
Tools that rank well today may be overtaken quickly. Check last_commit dates
and issue activity before committing to a dependency.
Codebase-specific vs. general-purpose memory
There are two distinct sub-problems here. Codebase memory (serena, codebase-memory-mcp, Context+) is about reducing context window usage in coding workflows — fetching what's relevant instead of loading everything. General agent memory (engram, vestige, MemoryMesh) is about persisting knowledge across sessions and tools. Most projects tackle one or the other. Pick based on your actual pain point.
Low issue health is common here
Several tools in this category have open-to-closed issue ratios below 1.0 — meaning more open issues than closed. That's a signal of fast-moving development with real users filing bugs. It's not necessarily a red flag, but check whether critical issues are being triaged. contextplus and engram are the cleanest on this dimension in the top tier.
Browse the full memory category: All memory and knowledge MCP servers ranked — 1382 tools indexed, updated daily.
Building a memory MCP server? Submit it to get indexed and scored.
Methodology
Tools classified as "memory/knowledge" via keyword matching on description, repo name, and topics — including persistent memory, knowledge graphs, codebase indexing, RAG, context management, and retrieval-augmented generation. Only non-archived repositories included. Scores computed using: stars 15%, freshness 25%, issue health 25%, contributors 10%, inbound dependents 25%.
Get the weekly AgentRank digest
Top movers, new tools, ecosystem insights — straight to your inbox.