/ 디렉터리 / 플레이그라운드 / codebase-memory-mcp
● 커뮤니티 DeusData ⚡ 바로 사용

codebase-memory-mcp

제작: 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.

왜 쓰나요

핵심 기능

라이브 데모

실제 사용 모습

codebase-memory.replay ▶ 준비됨
0/0

설치

클라이언트 선택

~/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
    }
  }
}

Claude Desktop → Settings → Developer → Edit Config 열기. 저장 후 앱 재시작.

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

Cursor는 Claude Desktop과 동일한 mcpServers 스키마 사용. 프로젝트 설정이 전역보다 우선.

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

Cline 사이드바의 MCP Servers 아이콘 클릭 후 "Edit Configuration" 선택.

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

Claude Desktop과 같은 형식. Windsurf 재시작 후 적용.

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

Continue는 맵이 아닌 서버 오브젝트 배열 사용.

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

context_servers에 추가. 저장 시 Zed가 핫 리로드.

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

한 줄 명령. claude mcp list로 확인, claude mcp remove로 제거.

사용 사례

실전 활용법: codebase-memory-mcp

How to quickly understand a new codebase with codebase-memory

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

언제 쓸까: You just joined a team or started working on a new repo and need to understand its architecture fast.

사전 조건
  • codebase-memory installed — curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
흐름
  1. Index the codebase
    Index this project repository and give me an architecture overview.✓ 복사됨
    → 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?✓ 복사됨
    → 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.✓ 복사됨
    → List of functions with file locations and relationships

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

함정
  • Indexing very large monorepos takes time on first run — Use index_status to check progress. Subsequent queries are instant since the graph persists.
함께 쓰기: filesystem · github

Analyze the impact of a code change before refactoring

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

언제 쓸까: You want to know what will break before you rename, move, or delete a function or class.

사전 조건
  • Codebase indexed — Run index_repository first
흐름
  1. Trace all callers
    Trace all call paths to the deprecated processPayment() function across the entire codebase.✓ 복사됨
    → 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.✓ 복사됨
    → List of affected functions and their downstream dependents

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

함정
  • Graph may be stale if code changed since last index — Re-run index_repository after significant code changes
함께 쓰기: github · filesystem

조합

다른 MCP와 조합해 10배 효율

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.✓ 복사됨
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.✓ 복사됨

도구

이 MCP가 노출하는 것

도구입력언제 호출비용
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

비용 및 제한

운영 비용

API 쿼터
N/A — fully local
호출당 토큰
50–500 tokens per query (vs 2000+ for reading files directly)
금액
Free
Index once, query many times. The graph persists between sessions so you don't re-index.

보안

권한, 시크릿, 파급범위

자격 증명 저장: N/A — no external credentials
데이터 외부 송신: 100% local processing. Your code never leaves your machine.

문제 해결

자주 발생하는 오류와 해결

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.

확인: Check index_status for progress
Language not parsed correctly

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

확인: 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.

확인: index_status

대안

codebase-memory-mcp 다른 것과 비교

대안언제 쓰나단점/장점
filesystem MCPYou just need to read specific files rather than understand the whole codebaseNo graph, no call tracing — but zero setup

더 보기

리소스

📖 GitHub에서 공식 README 읽기

🐙 열린 이슈 보기

🔍 400+ MCP 서버 및 Skills 전체 보기