FlashLearn
Local Leitner flashcard MCP server enabling AI clients to create decks, manage cards, study with spaced repetition, and track progress.
README
FlashLearn
FlashLearn is a local Leitner flashcard system with two entry points:
- an MCP stdio server so an AI client can create decks, create cards, read cards, study cards, promote/demote cards, and inspect progress
- a localhost web app for interactive study and deck progress
The app stores data in data/flashlearn.json by default. Set FLASHLEARN_DATA=/path/to/file.json to use another location.
Run the Web App
npm run web
Open http://127.0.0.1:5731.
If that port is already in use, FlashLearn automatically tries the next port and prints the URL.
The web UI lets you add decks and cards, study due cards, turn on All cards to study beyond the due queue, reveal answers, skip cards, mark cards as remembered or forgotten, manually promote/demote cards, search cards, and view progress by deck and Leitner box.
The dashboard also shows an annual practice heatmap with daily average, days learned, longest streak, and current streak; category/tag progress chips; and active toggles for due cards, mastered cards, empty decks, archived decks, and practice-focus mode. Category selection filters both the card library and the study queue, and each card in the library has Practice, Edit, promote/demote, and delete actions for immediate recall and cleanup.
Use Backup JSON to download a full flashlearn-backup.json, or Export CSV to download card rows for spreadsheet review. Deck settings support renaming, descriptions, custom Leitner intervals such as 0,1,3,7,14, archive/restore, and delete.
Keyboard shortcuts while not typing in a form:
rorSpace: reveal1orf: forgot2ork: remembers: skipp: promoted: demote
The card library can filter by box, due date range, mastery state, minimum review count, and maximum review count.
Run the MCP Server
npm run mcp
Example MCP client config for Codex or another JSON-configured MCP client:
First, get the repository's absolute path from its root:
pwd -P
Replace /absolute/path/to/flashlearn below with that output. This keeps the
configuration portable between clones and does not depend on a particular user
account or Desktop layout.
{
"mcpServers": {
"flashlearn": {
"command": "node",
"args": ["/absolute/path/to/flashlearn/src/mcp-server.js"]
}
}
}
Example Claude Desktop config:
{
"mcpServers": {
"flashlearn": {
"command": "node",
"args": ["/absolute/path/to/flashlearn/src/mcp-server.js"],
"env": {
"FLASHLEARN_DATA": "/absolute/path/to/flashlearn/data/flashlearn.json"
}
}
}
}
Available MCP tools:
create_decklist_decksupdate_deckarchive_deckdelete_deckcreate_cardupdate_carddelete_cardread_cardsdue_cardsreview_cardpromote_carddemote_cardprogressexport_data
Useful MCP tool arguments:
create_deckandupdate_deck: passboxIntervalsDaysfor deck-specific Leitner spacing.list_decks,read_cards,due_cards, andprogress: passincludeArchivedto include archived decks.read_cards: filter withquery,tag,dueOnly,dueBefore,dueAfter,box,mastered,reviewCountMin,reviewCountMax, andhideMastered.export_data: passformat: "json"for backup data orformat: "csv"for card rows.
Leitner Behavior
New cards start in box 1 and are due immediately. The default box intervals are:
box 1: now
box 2: 1 day
box 3: 2 days
box 4: 4 days
box 5: 7 days
box 6: 14 days
box 7: 30 days
When you remember a card, FlashLearn promotes it one box. When you forget a card, it returns to box 1. The highest box counts as mastered, but the card can still be studied manually or demoted later.
Verification
Install the locked dependencies and Chromium once in a fresh clone:
npm ci
npx playwright install chromium
Then run the complete verification suite:
npm test
npm run smoke:mcp
npm run smoke:web
npm run test:ui
npm run test:ui runs Playwright against an isolated temp data file and writes desktop/mobile screenshots under test-results/.
GitHub Actions runs the same four gates on Node.js 22. The CI runner also installs Chromium and its Linux system dependencies before the UI tests.
License
FlashLearn is available under the MIT License. The npm package
remains marked private to prevent accidental publication.
Research Note
See docs/card-systems-research.md for researched alternatives and why this project uses Leitner as the default scheduler.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.