AI agents · OpenClaw · self-hosting · automation

Quick Answer

Codebase Memory MCP vs Serena vs GitNexus vs Claude Context

Published:

The short answer

Use codebase-memory-mcp as the default, add Serena for refactoring, and check GitNexus’s licence before using it at work. As of November 15, 2026 (GitHub data read the same day):

ServerApproachLicenceStarsLatest releaseNeeds external service?Best for
codebase-memory-mcp (DeusData)Persistent local knowledge graph of code, docs, config and infrastructureMIT48,651v0.12.1 (Oct 16, 2026)NoDefault code memory for any agent
Serena (Oraios)Language-server symbol tools: find, edit, rename, moveGPL-3.0-or-later (SolidLSP part MIT)31,389v2.1.0 (Oct 19, 2026)NoPrecise refactors in large repos
GitNexusKnowledge graph of symbols, calls and execution flows + web explorerPolyForm Noncommercial 1.0.048,551v1.6.12 (Sep 12, 2026)NoImpact analysis on personal / OSS projects
Claude Context (Zilliz)Semantic vector search over the codebaseMIT12,694npm packages, no GitHub releaseYes: vector DB (Milvus/Zilliz Cloud) + embedding API”Find code that does X” in huge monorepos

All four repositories had commits between November 12 and 15, 2026, so none is abandoned.

What is the best code base memory MCP server? codebase-memory-mcp for most teams: MIT, fully local, no API key, broadest client support.

How they differ

codebase-memory-mcp builds a graph that connects source code to documentation, configuration and infrastructure, so an agent can trace a deployment back to its code or ask what a change could affect. It is pure C, parses 164 languages and formats with vendored grammars, adds “Hybrid LSP” type resolution for supported languages, and its installer sets up 46 client integrations (Claude Code, Codex, Cursor and others). An optional visual companion, CBM Lens, is in open beta (v0.0.1). Our hands-on review covers setup.

Serena gives the agent IDE-style operations at the symbol level — find references, rename across files, move a symbol — through language servers, instead of line numbers and grep. Serena v2 added a REPL-based agent interface. The application is GPL-3.0-or-later; that matters only if you redistribute it, not if you run it locally. See our Serena review.

GitNexus indexes a repository into a graph and exposes query, context, impact, trace, detect_changes and rename tools, plus a browser graph explorer. npx gitnexus analyze also writes AGENTS.md/CLAUDE.md files and Claude Code hooks (use --index-only to skip that). It needs Node.js 22.18+ or 24.11+. The catch is the PolyForm Noncommercial licence. More in our GitNexus review.

Claude Context embeds your code into a vector database and returns semantically related chunks. It is the only one of the four that needs external services: a Milvus or Zilliz Cloud database and an embedding provider key (OpenAI by default), so code chunks leave your machine unless you self-host both. See our Claude Context review.

Picks by situation

SituationPick
Company codebase, code must stay localcodebase-memory-mcp
Large Java/TypeScript/Python repo, many cross-file refactorsSerena (alongside a graph server)
“Which services break if I change this?“codebase-memory-mcp, or GitNexus for non-commercial work
Natural-language search across millions of linesClaude Context with self-hosted Milvus
Personal side project, want a visual graphGitNexus

Graph and symbol servers complement each other: running codebase-memory-mcp for structure and Serena for edits is a common pairing. Keep the number of MCP tools modest, though — every tool description costs context on each turn.

Setup checklist

  1. Index a branch you care about and ask three questions you already know the answer to (callers of a function, where a config value is used, what a PR touches).
  2. Compare tokens per task with and without the server on the same prompt.
  3. Re-index on branch switch or in a git hook; stale graphs mislead agents.
  4. For onboarding conventions that a graph cannot infer, add an AGENTS.md — see how to onboard AI agents to your codebase and best AI coding assistant for large codebases.

Last verified: November 15, 2026. We describe these tools from their repositories and documentation; GitHub star counts change daily.

Sources