local-brain-mcp
🧠 local-brain-mcp
로컬 우선, 제로 레이턴시, git 인지형 AI 메모리 — Claude Code, Cursor, Copilot & Windsurf용.
클라우드 없음. API 키 없음. 개인정보 위험 없음. 5ms 미만 리콜.
왜 local-brain인가?
클라우드 AI 메모리 도구의 문제점 | local-brain이 해결하는 방법 |
🐌 리콜당 150–800ms 네트워크 레이턴시 | ⚡ < 5ms — 로컬 SQLite 벡터 검색 |
☁️ 코드가 외부 서버로 전송됨 | 🔒 100% 온디바이스, 제로 이그레스 |
💸 세션마다 토큰 비대화 | 📦 리콜당 250토큰 하드 예산 상한 |
🗑️ 오래된 결정에서 비롯된 낡은 컨텍스트 | 🔄 Git-diff 무효화가 오래된 메모리를 STALE로 표시 |
🌊 WIP/오타 커밋이 브레인을 오염시킴 | 🎯 Conventional commit 필터가 고신호 교훈만 유지 |
🏗️ 모노레포 패키지 간 노이즈 | 🎯 경로 범위 쿼리, 패키지별 네임스페이싱 |
Related MCP server: Heimdall MCP Server
빠른 시작
# 1. Install
npm install -g local-brain-mcp
# 2. Init — auto-detects Claude Code, Cursor, Copilot, Windsurf
npx local-brain init
# 3. Ingest your git history
cd /path/to/your-project
npx local-brain ingest
# 4. Restart your AI editor — the MCP tools are now availableMCP 도구
brain_recall
코드베이스 메모리를 시맨틱 검색합니다. 결과는 250토큰으로 제한됩니다.
{
"query": "JWT auth bug",
"file_path": "src/auth/jwt.ts",
"max_items": 5,
"category": "fix"
}출력 예시:
## Brain Recall: "JWT auth bug"
• [src/auth/jwt.ts @ 8a4f12] (fix): JWT refresh race condition — RS256 cert rotates every 24h. Never use HS256 in dev.
• [src/auth/session.ts @ c31d04] (bug): Sessions expire silently on Tuesdays 02:00 UTC — auth service maintenance window.brain_learn
교훈이나 팀 컨벤션을 수동으로 저장합니다.
{
"lesson": "Always seed the test DB before running Playwright tests or auth flows break.",
"category": "convention",
"file_path": "tests/setup.ts"
}brain_trace
특정 파일에 대한 모든 메모리의 전체 이력을 확인합니다.
{
"file_path": "src/db/client.ts"
}brain_prune
오래되었거나 더 이상 사용되지 않는 메모리를 제거합니다. 선택적으로 전체 git 무효화 패스를 실행할 수 있습니다.
{
"status": "stale",
"run_invalidation": true
}CLI 명령어
local-brain init # setup wizard — writes MCP config for all detected editors
local-brain ingest # scan git history and build the brain DB
local-brain ingest --since "6 months ago" --verbose
local-brain status # show DB memory counts
local-brain prune --invalidate # detect + remove stale memories작동 방식
git history
↓
[git-ingest.ts] — filters WIP/typo/format commits
↓
[embeddings.ts] — pure-JS TF-IDF feature hashing (sub-1ms, zero network)
↓
[db.ts] — stores in .git/brain.db (Float32Array BLOB vectors in SQLite)
↓ (on file change)
[invalidation.ts] — marks stale if file changed > 30%
↓ (on MCP tool call)
[recall.ts] — in-memory cosine similarity search, scoped to package, capped to 250 tokens
↓
Claude Code / Cursor / Copilot / Windsurf / Zed지원 편집기
편집기 | 자동 감지되는 설정 |
Claude Code |
|
Cursor |
|
Windsurf |
|
VS Code Copilot |
|
Zed |
|
기술 스택
프로토콜:
@modelcontextprotocol/sdk(StdioServerTransport)저장소:
better-sqlite3(BLOB 벡터를 사용하는 SQLite WAL 모드)임베딩: 순수 JS TF-IDF 피처 해싱 (384차원, 1ms 미만, 100% 오프라인)
Git 엔진:
simple-gitCLI 엔진:
commander
라이선스
MIT — 자유롭게 활용하세요.
This server cannot be installed
Maintenance
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
AlicenseNot gradedqualityCmaintenanceProvides persistent memory for AI coding assistants, storing and retrieving architectural decisions, patterns, and solutions across sessions using semantic search, while also offering git integration for commit messages and code expertise mapping.MIT- AlicenseNot gradedqualityDmaintenanceProvides AI coding assistants with persistent, context-rich memory of a codebase, including documentation and git history, enabling recall across sessions.104Apache 2.0
- AlicenseAqualityAmaintenanceProvides persistent memory and a codebase knowledge graph for AI coding assistants, enabling shared context across multiple tools like Claude, Cursor, and ChatGPT, with significant token reduction.525MIT
- AlicenseNot gradedqualityAmaintenanceGives AI coding assistants persistent project memory and semantic code search, running fully locally with no API keys required.MIT
Related MCP Connectors
Your company's brain for AI agents. Cited, permission-aware knowledge across every system.
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Git-backed platform for skills, tools, and context for AI agents
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/cosmiccoder200x-sys/local-brain-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server