flashcard-mcp

flashcard-mcp

A lightweight MCP server that adds spaced-repetition flashcards (SM-2) to AI assistants, storing data locally in SQLite and enabling card creation, review, and scheduling.

Category
访问服务器

README

<div align="center">

🃏 Flashcard MCP

Give any AI assistant a memory that actually lasts.

A lightweight MCP server that adds spaced-repetition flashcards (the classic SM-2 algorithm behind SuperMemo and Anki) to Claude, Cursor, VS Code, and every other MCP-compatible assistant.

<p align="center"> <img alt="GitHub stars" src="https://img.shields.io/github/stars/cokovali10-sketch/flashcard-mcp?style=for-the-badge&logo=github&color=7c3aed"> <img alt="License" src="https://img.shields.io/badge/license-MIT-7c3aed?style=for-the-badge"> <img alt="Python" src="https://img.shields.io/badge/python-3.10%2B-7c3aed?style=for-the-badge&logo=python"> <img alt="MCP" src="https://img.shields.io/badge/built%20with-MCP-7c3aed?style=for-the-badge"> </p>

Stop re-teaching your AI the same thing every session. Your assistant now learns vocabulary, concepts, and facts once — then reviews them at the optimal moment so they stick forever.

</div>


Why?

Every AI session starts from zero. You ask your assistant to help you learn English words, it makes a nice list — and by tomorrow both of you have forgotten everything.

Flashcard MCP fixes this: it stores flashcards locally and schedules reviews using the SM-2 algorithm, the scientifically-backed method that powers SuperMemo and Anki. The AI creates the cards, you review them, and the server decides exactly when to bring each card back so it moves from short-term to long-term memory.

  • 🔒 100% local — your data lives in a single SQLite file. No cloud, no accounts, no tracking.
  • 🧠 Real spaced repetition — the SM-2 algorithm, not a random "quiz".
  • ⚡ Zero config — install, add two lines to your MCP config, done.
  • 🐍 Pure Python, zero heavy dependencies — one tiny package, nothing else.

Installation

pip install flashcard-mcp

Configuration

Add the server to your MCP client. Examples for the most common setups:

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "flashcards": {
      "command": "flashcard-mcp",
      "args": []
    }
  }
}

VS Code / Cursor (.mcp.json):

{
  "servers": {
    "flashcards": {
      "type": "stdio",
      "command": "flashcard-mcp"
    }
  }
}

Data location: the database is created at ./data/flashcards.db next to the package. Override it with the FLASHCARD_DB environment variable.

How it works

  1. You ask your AI to build a deck — e.g. "Create a deck 'English' and add cards for these phrasal verbs: look up, break down, give up."
  2. The AI calls the tools — the server creates the deck and cards in SQLite.
  3. When you want to review — ask "Let's review my due cards." The server returns exactly the cards that are due today, per the SM-2 schedule.
  4. You grade each card (0–5), the algorithm updates the easiness factor and picks the next review date. Perfect recalls → longer intervals. Misses → the card comes back tomorrow.
  5. Repeat — over time each card is reviewed at expanding intervals and permanently lands in your long-term memory.

Tools

Tool Description
create_deck Create a study deck
list_decks List all decks with card counts
delete_deck Delete a deck and its cards
add_card Add a flashcard (front / back)
list_cards List flashcards, filtered by deck
delete_card Delete a flashcard
get_due_cards Get cards due for review today
review_card Grade a card (quality 0–5) and reschedule it
get_stats Total cards, due today, per-deck breakdown
export_cards Export everything as JSON

The SM-2 algorithm

When you grade a card, the server updates two numbers:

  • Easiness factor (EF) — how easy this card is for you. Starts at 2.5, never drops below 1.3.
  • Interval (days) — the gap until the next review. 1 → 6 → 6×EF → 6×EF² → …

A grade below 3 resets the card to a 1-day interval. This is exactly the schedule that makes spaced repetition effective — it targets reviews right before you'd forget.

Development

pip install -e ".[dev]"
pytest

Project structure

flashcard_mcp/
├── src/flashcard_mcp/
│   ├── srs.py      # SM-2 scheduling algorithm
│   ├── db.py       # SQLite storage layer
│   └── server.py   # MCP server + tool definitions
└── tests/          # unit + end-to-end stdio tests

Roadmap

  • [ ] Anki .apkg import/export
  • [ ] HTML dashboard with retention graphs
  • [ ] Prompt templates for vocabulary / exam / language learning
  • [ ] Prebuilt study decks

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选