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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。