
myBrAIn 是一款 MCP(模型上下文协议)服务器,旨在为语言模型(如 Google Antigravity)提供持久且上下文的内存。
概览
是一个MCP(模型上下文协议)服务器,旨在为语言模型(如Google Antigravity)提供持久性和上下文内存。它作为开发环境的“第二大脑”,使AI能够记住项目规则、架构决策以及跨不同聊天会话的技术见解。 系统分为三个主要部分:* :管理持久性(db.py)和分析智能(analyzer.py),用于从代码中提取洞见。* :标准MCP接口(server.py),允许Antigravity与大脑交互。* :基于Streamlit的高级仪表盘(admin.py),用于可视化、管理和调试存储记忆,并具备高级功能如、 、 和仪表盘。* :一个实时监控代码库漂移的后台守护进程线程(observer.py)。 最简单的运行方式是使用 Docker Compose。 1. : 2.: * Windows: python -m venv && .\venv\Scripts\activate * Unix: python3 -m venv venv & source venv/bin/activate 3.
概述(AI 翻译)
确定性、自用性、情境感知的第二大脑用于谷歌反重力。
引言
myBrAIn 是一个 MCP(模型上下文协议)服务器,旨在为语言模型(如 Google Antigravity)提供持久性和上下文记忆。它充当开发环境的“第二大脑”,使 AI 能够记住项目规则、架构决策和不同聊天会话中的技术见解。
系统架构
该系统分为三个主要部分:
- Core:管理持久性(
db.py)和分析智能(analyzer.py),用于从代码中提取洞见。 - 服务器:标准MCP接口(
server.py),允许反重力与大脑交互。 - 管理员UI:基于Streamlit的高级仪表盘(
admin.py),用于可视化、管理和调试存储的记忆,配备如知识图谱、内存导出和静默观察者仪表盘等高级功能。 - Observer:一个实时监控代码库漂移的后台守护进程(
observer.py)。
🏗 安装
A. Docker 部署(推荐)
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
🧠 myBrAIn — MCP Ecosystem
Deterministic, Idempotent, Context-Aware Second Brain for Google Antigravity.
Introduction
myBrAIn is an MCP (Model Context Protocol) server designed to provide persistent and contextual memory to language models (like Google Antigravity). It acts as a “second brain” for your development environment, allowing the AI to remember project rules, architectural decisions, and technical insights across different chat sessions.
System Architecture
The system is divided into three main components:
- Core: Manages persistence (
db.py) and analytical intelligence (analyzer.py) for extracting insights from code. - Server: The standard MCP interface (
server.py) that allows Antigravity to interact with the brain. - Admin UI: A premium dashboard (
admin.py) based on Streamlit to visualize, manage, and debug stored memories with advanced features like Knowledge Graphs, Memory Export, and the Silent Observer dashboard. - Observer: A background daemon thread (
observer.py) that monitors codebase drift in real-time.
🏗 Installation
A. Docker Deployment (Recommended)
The easiest way to run myBrAIn is using Docker Compose.
# Clone & Prepare
git clone https://github.com/lilium360/myBrAIn.git
cd myBrAIn
cp .env.example .env
# Spin up
docker compose up -d
The Admin UI will be available at: http://localhost:8501
B. Local Installation (Native Python)
- Clone & Enter:
git clone https://github.com/lilium360/myBrAIn.git cd myBrAIn - Setup Environment:
- Windows:
python -m venv venv && .\venv\Scripts\activate - Unix:
python3 -m venv venv && source venv/bin/activate
- Windows:
- Install:
pip install -r requirements.txt
🚀 Usage Guide
1. Launching the Admin Dashboard
To graphically manage the database and visualize insights:
- Via Docker: Already running after
docker compose up. Open http://localhost:8501. - Via Python: Run
streamlit run admin.py(orpython -m streamlit run admin.py).
2. Integration in IDEs (Cursor, VS Code + Antigravity)
Add this to your mcpServers configuration JSON:
Option A: Via Docker
{
"mcpServers": {
"mybrain": {
"command": "docker",
"args": ["exec", "-i", "mybrain-admin", "python", "server.py"],
"env": {
"MYBRAIN_DATA_DIR": "/data/mybrain"
}
}
}
}
Option B: Via Python (Local)
{
安装
docker exec -i mybrain-admin python server.py配置
{
"mcpServers": {
"mybrain": {
"command": "docker",
"args": ["exec", "-i", "mybrain-admin", "python", "server.py"],
"env": {
"MYBRAIN_DATA_DIR": "/data/mybrain"
}
}
}
}