@temrjan/braintrain
v0.1.0
Published
MCP Memory Server for Claude Code - Your AI never forgets the journey
Maintainers
Readme
BrainTrain
MCP Memory Server for Claude Code "Your AI never forgets the journey"
Concept
BrainTrain is a memory system for Claude Code based on a train metaphor:
- Locomotive - Master session with base knowledge (DevStandards, architecture, code style)
- Wagons - Work sessions, linked in a chain
- Train - Entire project (locomotive + wagons)
┌─────────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
│ LOCOMOTIVE │───▶│ Wagon 1 │───▶│ Wagon 2 │───▶│ Wagon N │
│ (Master) │ │ │ │ │ │ │
├─────────────┤ ├─────────┤ ├─────────┤ ├─────────┤
│ • DevStd │ │ Context │ │ Context │ │ Context │
│ • Architect │ │ Locomot.│ │ Locomot.│ │ Locomot.│
│ • Style │ │ + │ │ + │ │ + │
│ │ │ own │ │ Wagon 1 │ │ Wagon.. │
└─────────────┘ └─────────┘ └─────────┘ └─────────┘Installation
claude mcp add braintrain -- npx -y braintrainOr via GitHub:
claude mcp add braintrain -- npx -y github:temrjan/braintrainUsage
Start a new project
bt_locomotive_create("myproject", "My awesome project")
bt_locomotive_learn("backend", "FastAPI, PostgreSQL, structure...")
bt_locomotive_learn("frontend", "React 19, Vite, components...")
bt_locomotive_learn("devstandards", "PM2, releases/current, ...")Work session
bt_wagon_start("Add product filter")
bt_recall() # Get locomotive context
[Work on the task...]
bt_wagon_save(
summary: "Added category filter to admin",
decisions: ["Used useState for filterCategoryId"]
)Next session
bt_wagon_start()
bt_recall()
# Context:
# - Locomotive: DevStandards, architecture, style
# - Wagon 1: "Added category filter..."
# Ready to continue!MCP Tools
Locomotive
| Tool | Description |
|------|-------------|
| bt_locomotive_create | Create new locomotive for a project |
| bt_locomotive_learn | Add knowledge to locomotive |
| bt_locomotive_update | Update standards or description |
| bt_locomotive_reset | Reset (archives current first) |
| bt_locomotive_clear | Clear completely without archiving |
Wagon
| Tool | Description |
|------|-------------|
| bt_wagon_start | Start new wagon (work session) |
| bt_wagon_save | Save and close current wagon |
| bt_wagon_clear | Clear old wagons (keep recent N) |
Context
| Tool | Description |
|------|-------------|
| bt_recall | Get full context (locomotive + wagons) |
| bt_status | Get train status |
Archive
| Tool | Description |
|------|-------------|
| bt_archive | Archive current project |
| bt_archive_list | List all archives |
| bt_archive_restore | Restore from archive |
Data Storage
~/.braintrain/
├── config.json
├── active/
│ └── {project}/
│ ├── locomotive.json
│ └── wagons/
│ ├── 001.json
│ ├── 002.json
│ └── current.json
└── archive/
└── {project}/
└── {timestamp}/License
MIT
"Train your brain, never lose the chain"
