AI 코딩 에이전트가 세션 전반에 걸쳐 실수, 성공 사례, 아키텍처 결정 사항을 기억할 수 있도록 지속적인 학습 메모리를 제공합니다.
다른 이름 gitmem-dev/gitmem, gitmem-mcp
- 스타
- 9
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- 1.2.1
- 마지막 커밋
- 2026년 11월 13일
- 라이선스
- MIT
GitMem MCP란?
GitMem은(는) MCP server입니다. AI 코딩 에이전트가 세션 전반에 걸쳐 실수, 성공 사례, 아키텍처 결정 사항을 기억할 수 있도록 지속적인 학습 메모리를 제공합니다.
프로젝트 README에서 생성된 요약
GitMem MCP server 정보
GitMem은 AI 코딩 에이전트가 서로 다른 세션 사이에서도 지식을 유지할 수 있도록 지속적인 메모리 계층을 제공합니다. 에이전트는 실수를 scar로, 성공을 win으로, 아키텍처 선택을 decision으로 저장할 수 있습니다. 이를 통해 개발자가 새로운 채팅 세션을 시작할 때마다 지침을 반복하거나 컨텍스트를 다시 설명해야 하는 번거로움을 방지합니다.
사용자는 단일 명령어를 사용하여 Claude Code, Cursor, VS Code 또는 Windsurf와 같은 환경을 자동으로 감지하고 서버를 설정할 수 있습니다. 이 시스템은 로컬 우선(local-first) 방식으로 작동하며, 데이터를 사용자의 기기에 있는 .gitmem 디렉토리에 저장합니다. 팀이나 고급 사용자를 위해, 자체 호스팅하는 Supabase 인스턴스에 연결하여 시맨틱 검색과 클라우드 지속성을 활성화할 수 있는 Pro 티어를 제공합니다.
이 MCP server는 메모리 관리, 과거 학습 내용 검색, 미완료 작업 스레드 처리를 위한 20개 이상의 MCP 도구를 포함합니다. 또한 .cursorrules 또는 CLAUDE.md와 같은 기존 설정 파일과 통합되어, 에이전트가 수동 개입 없이도 관련 컨텍스트에 즉시 접근할 수 있도록 보장합니다.
활용 사례
- 1반복되는 코딩 실수 방지AI 에이전트가 새로운 코드를 작성하기 전에 유효성 검사 요구 사항과 같은 특정 오류를 회상하여 방지할 수 있습니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
GitMem MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 GitMem MCP 설치
$ claude mcp add --env 'SUPABASE_SERVICE_ROLE_KEY=<YOUR_SUPABASE_SERVICE_ROLE_KEY>' gitmem -- npx -y gitmem-mcpCursor에 GitMem MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"gitmem": {
"command": "npx",
"args": [
"-y",
"gitmem-mcp"
],
"env": {
"SUPABASE_SERVICE_ROLE_KEY": "<YOUR_SUPABASE_SERVICE_ROLE_KEY>"
}
}
}
}VS Code에 GitMem MCP 설치
.vscode/mcp.json
{
"servers": {
"gitmem": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"gitmem-mcp"
],
"env": {
"SUPABASE_SERVICE_ROLE_KEY": "<YOUR_SUPABASE_SERVICE_ROLE_KEY>"
}
}
}
}VS Code CLI에 GitMem MCP 설치
$ code --add-mcp '{"name":"gitmem","type":"stdio","command":"npx","args":["-y","gitmem-mcp"],"env":{"SUPABASE_SERVICE_ROLE_KEY":"<YOUR_SUPABASE_SERVICE_ROLE_KEY>"}}'Claude Desktop에 GitMem MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"gitmem": {
"command": "npx",
"args": [
"-y",
"gitmem-mcp"
],
"env": {
"SUPABASE_SERVICE_ROLE_KEY": "<YOUR_SUPABASE_SERVICE_ROLE_KEY>"
}
}
}
}Codex에 GitMem MCP 설치
$ codex mcp add gitmem --env 'SUPABASE_SERVICE_ROLE_KEY=<YOUR_SUPABASE_SERVICE_ROLE_KEY>' -- npx -y gitmem-mcpCodex config.toml에 GitMem MCP 설치
~/.codex/config.toml
[mcp_servers.gitmem] command = "npx" args = ["-y", "gitmem-mcp"] [mcp_servers.gitmem.env] SUPABASE_SERVICE_ROLE_KEY = "<YOUR_SUPABASE_SERVICE_ROLE_KEY>"
Gemini CLI에 GitMem MCP 설치
$ gemini mcp add -s user -e 'SUPABASE_SERVICE_ROLE_KEY=<YOUR_SUPABASE_SERVICE_ROLE_KEY>' gitmem npx -- -y gitmem-mcpGemini settings.json에 GitMem MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"gitmem": {
"command": "npx",
"args": [
"-y",
"gitmem-mcp"
],
"env": {
"SUPABASE_SERVICE_ROLE_KEY": "<YOUR_SUPABASE_SERVICE_ROLE_KEY>"
}
}
}
}구성
SUPABASE_SERVICE_ROLE_KEY비밀Supabase service role key for pro tier features. Not required for free tier.
OPENROUTER_API_KEYSUPABASE_URLSupabase project URL for pro tier features (semantic search, analytics). Not required for free tier.
| 이름 | 설명 | 유형 |
|---|---|---|
| SUPABASE_SERVICE_ROLE_KEY | Supabase service role key for pro tier features. Not required for free tier. | 비밀 |
| OPENROUTER_API_KEY | — | |
| SUPABASE_URL | Supabase project URL for pro tier features (semantic search, analytics). Not required for free tier. |
자동 검사
2026년 11월 12일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능통과
- 오픈 소스 라이선스 (OSI)통과
- 최근 1년 내 커밋 또는 릴리스통과
- 패키지 이름이 인기 패키지와 유사하지 않음통과
- 원격 엔드포인트가 HTTPS 사용검사되지 않음
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 모델에 대한 숨겨진 지침 없음통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음통과
README
GitHub에서 보기GitMem is an MCP server that gives your AI coding agent persistent learning memory across agent sessions. It remembers mistakes (scars), successes (wins), and decisions — so your agent learns from experience instead of starting from scratch every time.
What's MCP? Model Context Protocol is how AI coding tools connect to external capabilities. GitMem is an MCP server — install it once and your agent gains persistent memory.
Works with Claude Code, Cursor, VS Code (Copilot), Windsurf, and any MCP-compatible client.
Quick Start
npx gitmem-mcp init
One command. The wizard auto-detects your IDE and sets up everything:
.gitmem/directory with starter scars- MCP server config (
.mcp.json,.vscode/mcp.json,.cursor/mcp.json, etc.) - Instructions file (
CLAUDE.md,.cursorrules,.windsurfrules,.github/copilot-instructions.md) - Lifecycle hooks (where supported)
.gitignoreupdated
Already have existing config? The wizard merges without destroying anything. Re-running is safe.
npx gitmem-mcp init --yes # Non-interactive
npx gitmem-mcp init --dry-run # Preview changes
npx gitmem-mcp init --client vscode # Force specific client
How It Works
recall --> work --> learn --> close --> recall --> ...
- Recall — Before acting, the agent checks memory for relevant lessons from past sessions
- Work — The agent does the task, applying past lessons automatically
- Learn — Mistakes become scars, successes become wins, strategies become patterns
- Close — Session reflection persists context for next time
Every scar includes counter-arguments — reasons why someone might reasonably ignore it. This prevents memory from becoming a pile of rigid rules.
What Gets Remembered
| Type | Purpose | Example |
|---|---|---|
| Scars | Mistakes to avoid | "Always validate UUID format before DB lookup" |
| Wins | Approaches that worked | "Parallel agent spawning cut review time by 60%" |
| Patterns | Reusable strategies | "5-tier test pyramid for MCP servers" |
| Decisions | Architectural choices with rationale | "Chose JWT over session cookies for stateless auth" |
| Threads | Unfinished work that carries across sessions | "Rate limiting still needs implementation" |
Key Features
- Automatic Recall — Scars surface before the agent takes similar actions
- Session Continuity — Context, threads, and rapport carry across sessions
- Closing Ceremony — Structured reflection captures what broke, what worked, and what to do differently
- 20+ MCP Tools — Full toolkit for memory management, search, threads, and multi-agent coordination
- Zero Config —
npx gitmem-mcp initand you're running - Non-Destructive — Merges with your existing
.mcp.json,CLAUDE.md, and hooks
Supported Clients
| Client | Setup | Hooks |
|---|---|---|
| Claude Code | npx gitmem-mcp init |
Full (session, recall, credential guard) |
| Cursor | npx gitmem-mcp init --client cursor |
Partial (session, recall) |
| VS Code (Copilot) | npx gitmem-mcp init --client vscode |
Instructions-based |
| Windsurf | npx gitmem-mcp init --client windsurf |
Instructions-based |
| Claude Desktop | Add to claude_desktop_config.json |
Manual |
| Any MCP client | npx gitmem-mcp init --client generic |
Instructions-based |
The wizard auto-detects your IDE. Use --client to override.
Add this to your MCP client's config file:
{
"mcpServers": {
"gitmem": {
"command": "npx",
"args": ["-y", "gitmem-mcp@latest"]
}
}
}
| Client | Config file |
|---|---|
| Claude Code | .mcp.json |
| Cursor | .cursor/mcp.json |
| VS Code | .vscode/mcp.json |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
CLI Commands
| Command | Description |
|---|---|
npx gitmem-mcp init |
Interactive setup wizard (auto-detects IDE) |
npx gitmem-mcp init --client <name> |
Setup for specific client (claude, cursor, vscode, windsurf, generic) |
npx gitmem-mcp init --yes |
Non-interactive setup |
npx gitmem-mcp init --dry-run |
Preview changes |
npx gitmem-mcp activate <key> |
Activate Pro tier (auto-applies schema) |
npx gitmem-mcp deactivate |
Remove Pro credentials, free device slot |
npx gitmem-mcp setup |
Output schema SQL (for manual Supabase setup) |
npx gitmem-mcp uninstall |
Clean removal (preserves .gitmem/ data) |
npx gitmem-mcp uninstall --all |
Full removal including data |
npx gitmem-mcp check |
Diagnostic health check |
Pro Tier
Self-hosted on your own Supabase. You bring the infrastructure, gitmem sets it up.
| What you get | Why your agent cares |
|---|---|
| Semantic search | Recall returns the right scars, not keyword noise |
| Session analytics | Spot patterns in what keeps going wrong |
| Sub-agent briefing | Hand institutional context to sub-agents automatically |
| Cloud persistence | Memory survives machine changes, shareable across team |
| A/B testing analytics | Measure which scar phrasings actually change agent behavior |
Quick start
npx supabase login # one time
export SUPABASE_URL="https://yourproject.supabase.co"
export SUPABASE_SERVICE_ROLE_KEY="eyJ..."
export OPENROUTER_API_KEY="sk-or-v1-..."
npx gitmem-mcp activate <your-license-key>
The activate command creates all tables, views, RPC functions, and indexes automatically. No manual SQL needed.
See docs/pro-setup-guide.md for the full guide.
The free tier gives you everything for solo projects. Pro makes recall smarter and memory portable.
GitMem + MEMORY.md
Your AI agent likely has its own memory file (MEMORY.md, .cursorrules, etc.). Here's how they work together:
| MEMORY.md | GitMem | |
|---|---|---|
| Loaded | Every turn (system prompt) | On-demand (tool calls) |
| Best for | Preferences, shortcuts, quick reference | Earned lessons, unfinished work, decisions |
| Updates | Agent writes directly | Session lifecycle (close ceremony) |
| Example | "User prefers terse output" | "Always validate UUID before DB lookup" |
Tip: Include .gitmem/agent-briefing.md in your MEMORY.md for a lightweight bridge between the two systems.
Privacy & Data
- Local-first — All data stored in
.gitmem/on your machine by default - No telemetry — GitMem does not collect usage data or phone home
- Cloud opt-in — Pro tier Supabase backend requires explicit configuration via environment variables
- Your data — Sessions, scars, and decisions belong to you. Delete
.gitmem/to remove everything
Development
git clone https://github.com/gitmem-dev/gitmem.git
cd gitmem
npm install
npm run build
npm test
See CONTRIBUTING.md for full development setup.
License
MIT — see LICENSE.
GitMem MCP 질문
GitMem MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add --env 'SUPABASE_SERVICE_ROLE_KEY=<YOUR_SUPABASE_SERVICE_ROLE_KEY>' gitmem -- npx -y gitmem-mcp를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
GitMem MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.