Learnbase started as a quiz / note reviewing tool but is expanding to become a tool for custom knowledge and task management.
Notes on the setup: This tool was built and tested with Claude Code. However it is intended to beset up easily with any terminal agent with a bit of tweaking
# Clone the repository
git clone https://github.com/username/learnbase.git
cd learnbase
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On macOS/Linux
# or
venv\Scripts\activate # On Windows
# Install the MCP server
pip install -e .Option 1: Ask Claude to configure it (easiest)
After installing LearnBase, just ask Claude Code:
"Can you configure the LearnBase MCP server in my ~/.claude.json file?"
Option 2: Manual setup
Edit your ~/.claude.json file and add the LearnBase MCP server configuration:
{
"mcpServers": {
"learnbase": {
"type": "stdio",
"command": "/absolute/path/to/learnbase/venv/bin/python",
"args": ["-m", "learnbase.mcp_server"],
"env": {}
}
}
}Important:
- Replace
/absolute/path/to/learnbasewith where you cloned LearnBase - Make sure you've activated your venv and run
pip install -e .first (see step 1) - If
mcpServersalready exists in your config, just add thelearnbaseentry inside it
Verify it works:
# Restart Claude Code, then ask:
"Can you list my notes?"
If Claude can access the LearnBase tools, you're all set!
The skills/ directory contains two skills that teach your AI how to work with LearnBase:
- quiz - Conducts Socratic review sessions
- verify - Researches and validates note accuracy with sources
Option 1: Ask Claude to do it (easiest)
"Can you copy the skills from this project to my ~/.claude/skills/ directory?"
Option 2: Do it manually
mkdir -p ~/.claude/skills
cp -r skills/* ~/.claude/skills/See skills/README.md for detailed documentation on each skill.
Now that LearnBase is set up, here's how to use it:
-
Add your first note: Just talk to Claude about something you're learning "Can you create a note about Python decorators for me?"
-
Review your notes: When notes are due, ask: "What should I review today?" or "quiz me!"
-
Verify note accuracy: Research and add sources to your notes: "What needs verifying?" or "validate this note"
-
Check your progress: "Show me my learning statistics"
See the sections below for detailed workflows and features.
- "What should I review?" ->
get_due_notesto get all the notes that need reviewing - User selects the note they want to review ->
review_noteto fetch the note content - [Skill conducts the interactive review]
record_review- Save your rating and update schedule
You can ask questions at any point during the conversation and the model will automatically carry on with the review once you've said everything has been clarified. It will also ask you if you have any questions when it scores your answer.
At the end of the session, you will be asked if you want to add anything you learned to this note, or to create a new note and store the information there.
Based on your answer, each question is given an ID and a percentage score. This means that if you struggle on a question, or ask to prioritise a question or key concept on the next review, this will be recorded with your note. Essential, the quiz tool is adaptive and should ask you increasingly more relevant questions on your notes based on your previous answers.
You can explicitly ask to focus on specific topics in your next review session. Just say something like:
- "I'd like to prioritize decorators next time"
- "Can we focus on async/await in the next session?"
- "I want to drill down on memory management"
The system will track these requests and automatically include questions on those topics in your next review. After you've been quizzed on a priority topic twice, it's automatically removed from your priority list. This works alongside the automatic prioritization of questions you've struggled with.
At the end of each review, you rate your overall confidence:
- 1 (Poor) - "I don't get this at all" → Review tomorrow
- 2 (Fair) - "Sort of getting it" → Review in a few days
- 3 (Good) - "I understand this well" → Review in 1-2 weeks
- 4 (Excellent) - "I could teach this" → Much longer interval
The system learns your pace and adjusts intervals automatically using the SM-2 algorithm.
LearnBase includes a verification system to help you ensure your notes are accurate and well-sourced.
The verify skill researches your notes to:
- Find authoritative sources (official docs, academic papers, etc.)
- Verify claims against primary sources
- Assign confidence scores (0.0-1.0) based on source quality
- Suggest specific amendments when needed
"What needs verifying?" - See unverified notes
"Validate this note" - Research and verify a specific note
"Find sources for [topic]" - Research a note about a topic
After validation, the skill will:
- Show you the sources it found and confidence score
- Suggest any amendments to improve accuracy
- Ask if you want to update the note with sources and changes
Notes with low confidence scores are flagged in your note list, so you can prioritize improving them.
After a conversation with Claude you can ask:
"Can you make a note of that"
OR
"Can you write a summary of this chat in my notes"
You can also ask Claude to create notes from articles, videos, or anything else you're learning about.
Claude will automatically save your notes to be reviewed on a spaced repetition basis, so the next time you review a specific note is generated at the end of the session based on your score and your confidence. If you prefer fixed intervals instead of adaptive scheduling, you can ask Claude to create scheduled reviews for your note e.g. once a month.
You can ask Claude
"Show me all my notes"
"Do I have any notes to review?"
"Show me my review statistics"
LearnBase exposes these tools to Claude:
add_note- Create a new noteget_note- Read a specific notelist_notes- See all your notesedit_note- Update contentdelete_note- Remove a note
get_stats- See your progress statscalculate_next_review- Preview when something will be due
save_session_history- Saves complete review session (questions, scores, timeline)- This updates question performance automatically using an exponential moving average
Each note is just markdown with YAML frontmatter:
---
title: "Python's Global Interpreter Lock"
created: 2025-12-16T10:30:00
review_mode: spaced
next_review: 2025-12-17T10:30:00
interval_days: 1
ease_factor: 2.5
review_count: 0
confidence_score: 0.85
sources:
- url: "https://docs.python.org/3/c-api/init.html#thread-state-and-the-global-interpreter-lock"
title: "Python Documentation - GIL"
accessed_date: "2025-12-16"
---
# Python's Global Interpreter Lock
The GIL is a mutex that protects access to Python objects...LearnBase has two main directories:
Where you clone the repository:
learnbase/ # Your git clone location
├── src/learnbase/ # Python package source code
│ ├── mcp_server.py # MCP server entry point
│ ├── core/ # Core models and algorithms
│ │ ├── models.py # Note dataclass with YAML frontmatter
│ │ ├── note_manager.py # File I/O for notes
│ │ └── spaced_rep.py # SM-2 spaced repetition algorithm
│ └── tools/ # MCP tool handlers
│ ├── notes.py # Note CRUD operations
│ ├── review.py # Review workflow
│ ├── stats.py # Analytics
│ └── performance.py # Question performance tracking
├── skills/ # AI agent skill files
│ ├── README.md # Skills documentation
│ ├── quiz/ # Review session skill
│ │ └── SKILL.md
│ └── verify/ # Note validation skill
│ └── SKILL.md
├── pyproject.toml # Package configuration
└── README.md # This file
Automatically created at ~/.learnbase/:
~/.learnbase/
├── notes/ # Your learning notes (markdown files)
│ ├── README.md # Auto-generated index
│ ├── python-gil.md # Example note
│ └── ...
└── history/ # Review session history (JSON files)
└── python-gil-2025-01-09-session-abc123.json
This directory is created automatically when you first use LearnBase. You don't need to configure anything!
PRs welcome!
MIT
Built on the SM-2 spaced repetition algorithm (the one Anki uses) and the MCP (Model Context Protocol) framework from Anthropic.