MCP server RepoBrain
Коммит 12 нояб. 2026 г.Позволяет AI-клиенту задавать вопросы по репозиторию и получать ответы с указанием путей к файлам и номеров строк.
Также известен как study8677/repobrain
- Звёзды
- 1 362
- Инструменты
- —
- Загрузки, 30 дней
- —
- Последняя версия
- —
- Последний коммит
- 12 нояб. 2026 г.
- Лицензия
- MIT
Что такое RepoBrain MCP?
RepoBrain — это MCP server. Позволяет AI-клиенту задавать вопросы по репозиторию и получать ответы с указанием путей к файлам и номеров строк.
Сводка сгенерирована из README проекта
О RepoBrain MCP server
Разработчики, которым нужно разобраться в незнакомом коде, могут использовать RepoBrain для получения точных ответов по своим репозиториям. Он работает как движок знаний, предоставляющий ответы с конкретными путями к файлам и номерами строк, что гарантирует ИИ-ассистенту опору на реальный исходный код. Система использует кластер мультиагентов для автономного чтения модулей и генерации локальной базы знаний, которая хранится в директории .repobrain/.
Пользователи могут настроить инструмент в среде Python 3.10+ и подключить его к OpenAI-compatible API или headless CLI, такому как Trae. Рабочий процесс включает запуск rb-refresh для построения слоя знаний и rb-ask для запросов к нему. Поскольку знания хранятся локально внутри проекта, ими можно делиться между различными IDE и агентами, такими как Cursor, Windsurf или VS Code с Copilot, что предотвращает привязку к конкретному вендору и обеспечивает согласованный контекст независимо от среды хоста.
Что вы можете с ним делать
- 1Отслеживание деталей реализацииПопросите ИИ найти, где реализован конкретный API, и определить все места его вызова.
- 2Анализ потоков данныхЗапросите объяснение того, как данные перемещаются от пользовательского интерфейса к бэкенд-системам.
- 3Оценка влияния измененийОпределите, какие именно модули будут затронуты при изменении определенной функции.
- 4Онбординг в новые проектыИспользуйте автоматизированных агентов, чтобы быстро изучить архитектуру новой кодовой базы.
Взято из README проекта. Каждый вариант использования проверен на соответствие цитате из него.
Автоматические проверки
Запущено 13 нояб. 2026 г.Полный отчёт →Еще не проверено. Для сервера требуется оценка 80, отсутствие серьезных проблем и достаточно данных для нашей проверки. Как работают проверки · Что исправить, чтобы получить больше баллов
- Связанный и доступный исходный репозиторийstudy8677/repobrain is public and reachablegithub.com/study8677/repobrain ↗Пройдено
- Пакет указывает этот репозиторий как источникНе проверялось
- Происхождение сборки (аттестация Sigstore)Не проверялось
- Open source лицензия (OSI)MITspdx.org/licenses/MIT.html ↗Пройдено
- Коммит или релиз за последний годLast commit or release 2026-11-12github.com/study8677/repobrain ↗Пройдено
- OpenSSF ScorecardНе проверялось
- Имя пакета не похоже на популярный пакетНе проверялось
- Нет критических предупреждений в пакете или его зависимостяхНе проверялось
- Нет скрытых инструкций для модели0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersПройдено
- Деструктивные инструменты помеченыНе проверялось
- Удалённая конечная точка отвечает на рукопожатие MCPНе проверялось
README
Открыть на GitHubRepoBrain
Cross-IDE repository knowledge engine for grounded codebase Q&A.
Formerly known as Antigravity Workspace Template — same project, new name.
RepoBrain helps you understand an unfamiliar repository, trace an implementation,
and ask questions with source-file references. It keeps project knowledge in
.repobrain/, shared across supported IDEs and agents.
Project Philosophy
Cross-IDE repository knowledge engine for grounded codebase Q&A. Same .repobrain/ knowledge layer reads in every IDE; one engine, every host.
An AI Agent's capability ceiling = the quality of context it can read.
rb-refresh deploys a multi-agent cluster that autonomously reads your code — each module gets its own Agent that generates a knowledge doc. rb-ask routes questions to the right Agent, grounded in real code with file paths and line numbers.
Instead of handing Claude Code / Codex a repo-wide grep and making it hunt on its own, give it a ChatGPT for your repository.
Traditional approach: RepoBrain approach:
CLAUDE.md = 5000 lines of docs Claude Code calls ask_project("how does auth work?")
Agent reads it all, forgets most Router → ModuleAgent reads actual source, returns exact answer
Hallucination rate stays high Grounded in real code, file paths, and git history
| Problem | Without RepoBrain | With RepoBrain |
|---|---|---|
| Agent forgets coding style | Repeats the same corrections | Reads .repobrain/conventions.md — gets it right the first time |
| Onboarding a new codebase | Agent guesses at architecture | rb-refresh → ModuleAgents self-learn each module |
| Switching between IDEs | Different rules everywhere | One .repobrain/ folder — every IDE reads it |
| Asking "how does X work?" | Agent reads random files | ask_project MCP → Router routes to the responsible ModuleAgent |
Architecture is files + a live Q&A engine, not plugins. Portable across any IDE, any LLM, zero vendor lock-in.
Read the full project philosophy.
Quick Start
Ask an AI assistant that can run commands in your project to install RepoBrain:
Read AI_INSTALL.md and follow it to install RepoBrain in this project.
The guide installs the tools, configures a model backend, then builds the knowledge base and checks an answer. A logged-in headless CLI such as Trae can serve as the backend without an API key; an OpenAI-compatible API is also supported. Requirements: Python 3.10+, Git with at least one commit, and a clean worktree before refresh.
For platform-specific installation or manual configuration, see
the installation guide and the quick-start guide.
Installing RepoBrain into an existing project does not require rb init or rb-init.
Everyday Use
Run these commands in your project directory after installation and configuration:
rb-refresh
rb-ask "How does authentication work in this project?"
rb-refresh automatically builds the first knowledge base, updates affected groups
after committed changes, or continues a matching interrupted task. If knowledge is
already current, it skips without calling a model. After a failure, run the same
command again to continue.
Use this only when you want to regenerate all knowledge:
rb-refresh --full
rb-ask reads the existing knowledge base and answers with source evidence. It
reminds you when committed code is newer; it does not refresh during a question.
Examples of useful questions:
- Where is this API implemented, and what calls it?
- How does data move from the UI to the backend?
- Which modules are affected by changing this function?
How It Works
Source code → rb-refresh → .repobrain/ knowledge → rb-ask → answer with code references
RepoBrain groups related code, generates module knowledge, and routes each question to relevant context. Knowledge lives in your project, so supported IDEs share the same base. Updates are staged separately and become active only when complete; a failed update preserves the existing usable generation.
The first build can take several minutes or longer on large repositories and uses your configured model. Commit or stash local changes before refreshing. IDE rules and new-project scaffolding are optional; see the usage reference.
Support Matrix
| Use | Environments | How to connect |
|---|---|---|
| Native plugins | Claude Code, Codex CLI | Setup, refresh, and ask via slash commands. |
| Compatible IDEs | Cursor, Windsurf, Gemini CLI, VS Code + Copilot, Cline, Aider, DeepSeek Harness | Shared context files, CLI, or an MCP client. |
| Other agents and scripts | Any host that can run commands or call MCP tools | CLI/JSON output or optional rb-mcp. |
Platform-specific commands, JSON output, and MCP registration are documented in the usage reference and INSTALL.md.
Evaluation
A locked comparison on Flask, ripgrep, Vite, and Prometheus used the same source access and model route for RepoBrain and CodeGraph + Trae. The full report includes accuracy, query time, tokens, and cold-build cost. Results apply to that experiment; AI knowledge generation and static graph indexing are different workloads.
Documentation
- Installation and troubleshooting
- Commands, JSON, and optional integrations
- Knowledge generation and Q&A architecture
- External MCP tools · Sandbox configuration
- Release changes
- Full documentation: English · 中文 · Español
NLPM Audit Feedback — Improved by NLPM, a natural-language programming linter by xiaolai.
Contributing
Ideas are contributions too! Open an issue to report bugs, suggest features, or propose architecture.
Contributors
Star History
License
MIT License. See LICENSE for details.
Built for the AI-native development era
Friendly Link: LINUX DO
Вопросы о RepoBrain MCP
Что делает RepoBrain?
Он создает базу знаний вашего репозитория и направляет вопросы модульным агентам, чтобы ответы основывались на реальном исходном коде с указанием путей к файлам и номеров строк.
Какие IDE и AI-клиенты поддерживает RepoBrain?
Он работает с Claude Code, Codex CLI, Cursor, Windsurf, Gemini CLI, VS Code с Copilot, Cline, Aider и другими хостами, которые могут выполнять команды или вызывать MCP инструменты.
Нужен ли RepoBrain API key?
Не обязательно — в качестве бэкенда для модели можно использовать авторизованный headless CLI или OpenAI-compatible API.
Как обновить базу знаний?
Запустите rb-refresh, которая создает первую базу знаний, обновляет затронутые группы после коммитов или возобновляет прерванную задачу; используйте флаг --full для полной перегенерации.
Где хранится база знаний?
Знания проекта хранятся в папке .repobrain/ внутри вашего репозитория и доступны во всех поддерживаемых IDE и агентах.