Skip to main content
Glama

Memory MCP

AI 코딩 어시스턴트를 위한 영구 메모리 및 세션 전문 검색 기능으로, MCP 서버로 노출됩니다.

문제점

AI 코딩 어시스턴트는 세션 간의 모든 내용을 잊어버립니다. 아키텍처 결정, 사용자 환경 설정, 프로젝트 컨텍스트, 지난 화요일에 디버깅한 내용 등 모든 것이 사라집니다. 그래서 매번 같은 내용을 다시 설명해야 합니다.

Memory MCP는 다음 두 가지 기능으로 이 문제를 해결합니다.

  1. 명시적 메모리 -- 세션 간에 유지되는 메모, 결정 사항, 패턴 및 환경 설정을 저장합니다. 어시스턴트가 당신이 말한 내용을 기억합니다.

  2. 세션 검색 -- 전체 대화 기록에 대한 전문 검색을 수행합니다. 로그를 일일이 뒤질 필요 없이 3주 전에 논의했던 내용을 바로 찾을 수 있습니다.

데이터베이스 서버도, 백그라운드 프로세스도, 클라우드도 필요 없습니다. 사용자의 컴퓨터에 있는 단 하나의 SQLite 파일만 있으면 됩니다.

Related MCP server: MCP Vector Memory

지원되는 세션 소스

소스

위치

형식

Claude Code

~/.claude/projects/

JSONL (스트리밍 콘텐츠 블록)

Claude Code 기록

~/.claude/history.jsonl

JSONL (세션 파일 정리 후에도 유지)

OpenCode

~/.local/share/opencode/opencode.db

SQLite (세션, 메시지, 파트 테이블)

Oh My Pi

~/.omp/agent/sessions/

JSONL (줄당 이벤트)

새로운 소스를 추가하려면 파서 파일 하나와 레지스트리 항목이 필요합니다. 새 세션 소스 추가하기를 참조하세요.

설치

SQLite FTS5 지원이 포함된 Python 3.11+가 필요합니다 (표준 Python 빌드에 포함됨).

pip install -e .

또는 uv를 사용하여 직접 실행하세요 (설치 불필요):

uv run --directory /path/to/memory_mcp python -m memory_mcp

MCP 설정

MCP 클라이언트 설정(예: ~/.claude/mcp.json 또는 프로젝트 수준의 .mcp.json)에 추가하세요:

pip 설치 시:

{
  "mcpServers": {
    "memory": {
      "command": "memory-mcp"
    }
  }
}

uv 사용 시 (설치 불필요):

{
  "mcpServers": {
    "memory": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/memory_mcp", "python", "-m", "memory_mcp"]
    }
  }
}

도구

메모리 (명시적 지식 저장소)

도구

설명

save_memory

선택적 태그와 컨텍스트를 포함한 메모를 저장합니다. 향후 모든 세션에서 유지됩니다.

search_memory

저장된 메모 전체에 대한 전문 검색을 수행합니다. 키워드 기반이며 관련성 순으로 정렬됩니다.

list_memories

최근 메모를 탐색하며, 태그별로 필터링할 수 있습니다.

delete_memory

ID를 사용하여 메모를 삭제합니다.

세션 (과거 대화 검색)

도구

설명

list_sessions

과거 세션을 탐색합니다. 소스(claude_code, omp) 또는 프로젝트 경로별로 필터링할 수 있습니다.

get_session

특정 세션의 전체 대화 내용을 가져옵니다.

search_sessions

모든 세션 메시지, 사고 블록 및 도구 사용 내역에 대한 전문 검색을 수행합니다.

refresh_sessions

세션 디렉토리를 다시 스캔하고 새 파일이나 변경된 파일을 인덱싱합니다.

작동 원리

시작 시 Memory MCP는 구성된 세션 디렉토리를 스캔하고 모든 대화를 FTS5 전문 검색 인덱스가 포함된 로컬 SQLite 데이터베이스에 인덱싱합니다. 이후 실행 시에는 mtime이 변경되지 않은 파일은 건너뜁니다.

  • 데이터베이스 위치: ~/.memory_mcp/memory.db (MEMORY_MCP_DB 환경 변수로 재정의 가능)

  • 세션 소스: 표준 위치에서 자동 감지 (MEMORY_MCP_SOURCES 환경 변수로 확장 가능, 형식: type:path;type:path)

  • 인덱싱: 파일 mtime 기준 증분 방식, 8개 스레드로 병렬 처리

  • 검색: BM25 랭킹, 접두사 매칭, 구문 지원을 포함한 FTS5

새 세션 소스 추가하기

  1. SessionParser 프로토콜을 구현하는 memory_mcp/parsers/your_source.py를 생성합니다:

    • source_type: str 속성

    • parse_file(path: str) -> ParsedSession | None 메서드

  2. memory_mcp/parsers/__init__.py에 등록합니다.

  3. memory_mcp/config.py에 디렉토리 감지 기능을 추가합니다.

예제는 parsers/claude_code.py 또는 parsers/omp.py를 참조하세요.

테스트

python tests/test_e2e.py

엔드투엔드 테스트는 MCP 서버를 하위 프로세스로 시작하여 stdio 프로토콜을 통해 8개의 모든 도구를 실행하고 응답을 검증합니다. 실제 데이터가 영향을 받지 않도록 임시 데이터베이스를 사용합니다.

아키텍처

memory_mcp/
  server.py        # FastMCP entry point, lifespan manages DB + startup scan
  config.py        # Auto-detects session dirs, DB path
  db.py            # SQLite + FTS5 schema, all queries, sync triggers
  scanner.py       # Walks session dirs, dispatches to parsers, parallel indexing
  parsers/
    base.py        # ParsedSession / ParsedMessage dataclasses, SessionParser protocol
    claude_code.py # Claude Code JSONL parser (merges streamed assistant blocks)
    claude_history.py # Claude Code history.jsonl parser (one file, many sessions)
    omp.py         # OMP JSONL parser
    opencode.py    # OpenCode SQLite parser (reads DB directly, read-only)
  tools/
    memory.py      # save_memory, search_memory, list_memories, delete_memory
    sessions.py    # list_sessions, get_session, search_sessions, refresh_sessions

라이선스

MIT

Install Server
A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Provides persistent local memory functionality for AI assistants, enabling them to store, retrieve, and search contextual information across conversations with SQLite-based full-text search. All data stays private on your machine while dramatically improving context retention and personalized assistance.
    3
  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Provides AI coding agents with persistent, long-term memory through local semantic search and SQLite storage. It enables agents to save and retrieve architectural decisions or project context across different conversation sessions without requiring cloud services.
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides AI coding assistants with persistent project memory to retain architectural decisions, code patterns, and domain knowledge across sessions. It stores data locally in a SQLite database, allowing agents to remember, recall, and manage project-specific context using full-text search.
    8
    Apache 2.0
  • A
    license
    A
    quality
    B
    maintenance
    Provides AI coding assistants with persistent memory storage using a local SQLite database. Enables tools to remember project details, notes, and relationships across sessions to maintain context and reduce repetitive explanations.
    17
    4
    MIT

View all related MCP servers

Related MCP Connectors

  • Persistent memory for AI agents. Search, store, and recall across sessions.

  • Persistent memory for AI agents — verbatim conversations, searchable by meaning.

  • Universal memory for AI agents and tools. Save, organize and search context anywhere.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nerdyaustin/memory_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server