/ Verzeichnis / Playground / codebase-memory-mcp
● Community DeusData ⚡ Sofort

codebase-memory-mcp

von DeusData · DeusData/codebase-memory-mcp

Index any codebase into a persistent knowledge graph — 66 languages, sub-ms queries, 99% fewer tokens than file-by-file exploration.

codebase-memory-mcp builds a persistent knowledge graph from entire codebases using tree-sitter parsing across 66 languages. It indexes the Linux kernel (28M LOC) in 3 minutes, supports Cypher-like queries, call graph tracing, git diff mapping, and optional 3D visualization. Single static binary with zero dependencies, auto-configures for 11+ AI agents.

Warum nutzen

Hauptfunktionen

Live-Demo

In der Praxis

codebase-memory.replay ▶ bereit
0/0

Installieren

Wählen Sie Ihren Client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "codebase-memory": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/DeusData/codebase-memory-mcp"
      ],
      "_inferred": true
    }
  }
}

Öffne Claude Desktop → Settings → Developer → Edit Config. Nach dem Speichern neu starten.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "codebase-memory": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/DeusData/codebase-memory-mcp"
      ],
      "_inferred": true
    }
  }
}

Cursor nutzt das gleiche mcpServers-Schema wie Claude Desktop. Projektkonfiguration schlägt die globale.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "codebase-memory": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/DeusData/codebase-memory-mcp"
      ],
      "_inferred": true
    }
  }
}

Klicken Sie auf das MCP-Servers-Symbol in der Cline-Seitenleiste, dann "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "codebase-memory": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/DeusData/codebase-memory-mcp"
      ],
      "_inferred": true
    }
  }
}

Gleiche Struktur wie Claude Desktop. Windsurf neu starten zum Übernehmen.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "codebase-memory",
      "command": "TODO",
      "args": [
        "See README: https://github.com/DeusData/codebase-memory-mcp"
      ]
    }
  ]
}

Continue nutzt ein Array von Serverobjekten statt einer Map.

~/.config/zed/settings.json
{
  "context_servers": {
    "codebase-memory": {
      "command": {
        "path": "TODO",
        "args": [
          "See README: https://github.com/DeusData/codebase-memory-mcp"
        ]
      }
    }
  }
}

In context_servers hinzufügen. Zed lädt beim Speichern neu.

claude mcp add codebase-memory -- TODO 'See README: https://github.com/DeusData/codebase-memory-mcp'

Einzeiler. Prüfen mit claude mcp list. Entfernen mit claude mcp remove.

Anwendungsfälle

Praxisnahe Nutzung: codebase-memory-mcp

How to quickly understand a new codebase with codebase-memory

👤 Developers onboarding onto an unfamiliar project ⏱ ~15 min beginner

Wann einsetzen: You just joined a team or started working on a new repo and need to understand its architecture fast.

Voraussetzungen
  • codebase-memory installed — curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
Ablauf
  1. Index the codebase
    Index this project repository and give me an architecture overview.✓ Kopiert
    → High-level module map with key entry points and dependencies
  2. Explore a specific module
    Show me the call graph for the authentication module. What functions does login() call?✓ Kopiert
    → Call chain from login through middleware, validation, and database
  3. Find related code
    Search the graph for all functions that interact with the user table.✓ Kopiert
    → List of functions with file locations and relationships

Ergebnis: A solid mental model of the codebase architecture in minutes instead of hours.

Fallstricke
  • Indexing very large monorepos takes time on first run — Use index_status to check progress. Subsequent queries are instant since the graph persists.
Kombinieren mit: filesystem · github

Analyze the impact of a code change before refactoring

👤 Senior engineers planning a refactoring effort ⏱ ~20 min intermediate

Wann einsetzen: You want to know what will break before you rename, move, or delete a function or class.

Voraussetzungen
  • Codebase indexed — Run index_repository first
Ablauf
  1. Trace all callers
    Trace all call paths to the deprecated processPayment() function across the entire codebase.✓ Kopiert
    → Complete list of callers with file paths and call depths
  2. Map git changes to symbols
    I changed these files in my branch. Use detect_changes to show which symbols in the graph are affected.✓ Kopiert
    → List of affected functions and their downstream dependents

Ergebnis: A complete impact analysis showing all code that needs to change.

Fallstricke
  • Graph may be stale if code changed since last index — Re-run index_repository after significant code changes
Kombinieren mit: github · filesystem

Kombinationen

Mit anderen MCPs für 10-fache Wirkung

codebase-memory + github

Index a repo, then use GitHub MCP to find PRs that affect critical call paths

Index our repo, trace all callers of the auth middleware, then check if any open PRs modify those paths.✓ Kopiert
codebase-memory + filesystem

Index locally, query the graph, then edit the found files directly

Find all functions that call the deprecated API, then update each one to use the new API.✓ Kopiert

Werkzeuge

Was dieses MCP bereitstellt

WerkzeugEingabenWann aufrufenKosten
index_repository path: str Index a codebase into the knowledge graph (run once, persists) 0
search_graph label?: str, pattern?: str Search the graph by label or pattern 0
trace_call_path from: str, to: str Find call chains between two functions 0
detect_changes diff: str Map git diffs to affected symbols in the graph 0
get_architecture project?: str Get a high-level architecture overview of the indexed codebase 0
query_graph query: str Run a Cypher-like query against the graph 0
search_code pattern: str Grep-style text search across indexed code 0

Kosten & Limits

Was der Betrieb kostet

API-Kontingent
N/A — fully local
Tokens pro Aufruf
50–500 tokens per query (vs 2000+ for reading files directly)
Kosten in €
Free
Tipp
Index once, query many times. The graph persists between sessions so you don't re-index.

Sicherheit

Rechte, Secrets, Reichweite

Credential-Speicherung: N/A — no external credentials
Datenabfluss: 100% local processing. Your code never leaves your machine.

Fehlerbehebung

Häufige Fehler und Lösungen

Indexing fails on large repo

Ensure sufficient disk space for the graph database. For very large repos (>1M LOC), first indexing may take several minutes.

Prüfen: Check index_status for progress
Language not parsed correctly

Verify your language is in the 66 supported languages. Check tree-sitter grammar availability.

Prüfen: list_projects to see indexed stats
Graph queries return empty results

The codebase may not be indexed yet. Run index_repository first, then wait for completion.

Prüfen: index_status

Alternativen

codebase-memory-mcp vs. andere

AlternativeWann stattdessenKompromiss
filesystem MCPYou just need to read specific files rather than understand the whole codebaseNo graph, no call tracing — but zero setup

Mehr

Ressourcen

📖 Offizielle README auf GitHub lesen

🐙 Offene Issues ansehen

🔍 Alle 400+ MCP-Server und Skills durchsuchen