Skip to main content
Glama

🧠 local-brain-mcp

Локальная, с нулевой задержкой, git-ориентированная ИИ-память для Claude Code, Cursor, Copilot и Windsurf.

Нет облака. Нет API-ключей. Нет риска для конфиденциальности. Вспоминание менее чем за 5 мс.


Почему local-brain?

Проблема с облачными инструментами ИИ-памяти

Как local-brain это решает

🐌 150–800 мс сетевая задержка при каждом извлечении

⚡ < 5 мс — локальный векторный поиск SQLite

☁️ Ваш код отправляется на сторонние серверы

🔒 100% на устройстве, нулевой исходящий трафик

💸 Раздувание токенов в каждой сессии

📦 Жёсткий лимит бюджета в 250 токенов на извлечение

🗑️ Устаревший контекст из старых решений

🔄 Инвалидация Git-diff помечает старые воспоминания как УСТАРЕВШИЕ

🌊 WIP/опечатки в коммитах засоряют мозг

🎯 Фильтр Conventional Commits оставляет только значимые уроки

🏗️ Шум монорепозитория между пакетами

🎯 Запросы с ограничением по пути, пространства имён для каждого пакета


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 available

MCP-инструменты

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

~/.claude.json

Cursor

~/.cursor/mcp.json

Windsurf

~/.codeium/windsurf/mcp_config.json

VS Code Copilot

~/.vscode/mcp.json

Zed

~/.config/zed/settings.json


Технологический стек

  • Протокол: @modelcontextprotocol/sdk (StdioServerTransport)

  • Хранилище: better-sqlite3 (SQLite WAL-режим с BLOB-векторами)

  • Эмбеддинги: Чисто-JS TF-IDF хеширование признаков (384-мерное, менее 1 мс, 100% офлайн)

  • Git-движок: simple-git

  • CLI-движок: commander


Лицензия

MIT — создавайте свободно.

F
license - not found
Not graded
quality - not tested
C
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

  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides 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
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI coding assistants with persistent, context-rich memory of a codebase, including documentation and git history, enabling recall across sessions.
    104
    Apache 2.0
  • A
    license
    A
    quality
    A
    maintenance
    Provides 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.
    5
    25
    MIT

View all related MCP servers

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

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/cosmiccoder200x-sys/local-brain-mcp'

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