srs-mcp
srs-mcp
与代理无关的 MCP 服务器,用于间隔重复学习——**无需 Anki GUI、无需 Xvfb、无需 AnkiConnect。**自带代理;它提供卡片盒 + 调度器。
它将 FSRS(Free Spaced Repetition Scheduler,现代 Anki 使用的同款算法)封装在一个小巧的 SQLite 存储之上,因此代理可以创建卡片、查看到期卡片并记录回忆情况——完全无头运行。
为什么不用无头 Anki?
无头驱动 Anki 桌面应用意味着需要 Qt + 虚拟帧缓冲(Xvfb)+ AnkiConnect 插件——既脆弱又和版本强耦合。如果你需要与手机上的 Anki 互通,anki PyPI 包可以在无 GUI 的情况下驱动真实的 .anki2 集合。但如果你只是想要 API 背后的间隔重复,你根本不需要 Anki:FSRS 是一个库,而这个服务器只是围绕它的约 200 行代码。
Related MCP server: anki-mcp
工具
add_card(front, back) -> {card_id, due}— 创建并调度一张卡片。保持back简短——一个词或一个短语;无法在几秒内评分的卡片是笔记,而不是闪卡due_cards(q=None, limit=20) -> [{card_id, front, back, deck, due}]— 当前到期的卡片,可选地按主题缩小范围(q="horace")grade_card(card_id, rating) -> {card_id, rating, next_due, reps}— 记录回忆情况(again/hard/good/easy,或 1-4)edit_card(card_id, front=None, back=None)— 就地编辑内容;调度保持不变(修正拼写错误/缩短冗长答案,而不是重复创建)suspend_card(card_id)/unsuspend_card(card_id)— 搁置一张卡片(保留其历史,从到期队列中移除)/ 恢复它list_cards(q=None, limit=50)— 无论到期日期如何,概览所有卡片delete_card(card_id)— 删除一张(重置/清理)stats(deck=None) -> {total, due_now, suspended, reviews, decks}
查找卡片:搜索,而非牌组
卡片通过搜索其文本来查找——due_cards(q="horace")——而不是预先将它们归档到牌组中。不再有任何东西写入 deck 字段;把主题写进卡片本身("Horace, Odes 1.11: …"),它就能保持可被找到。
牌组是单值、自由文本、精确匹配的标签,没有附加任何按牌组的调度,所以它们没有带来搜索做不到的事情,反而牺牲了准确性:在用于衡量的牌组上,代理们发明了十个 Horace 的名称,跨越五种分隔符约定,因此最好的 deck="Horace" 只能从 97 张 Horace 卡片中返回 20 张,而 q="horac" 返回 89 张——包括那些被错误归档到 Talks 下的。due_cards/list_cards/stats 上的列和 deck= 过滤器保留给旧版本标记的卡片。参见 plans/002-decks.md。
复习循环:due_cards → 用 front 考问用户 → 对照 back 检查 → grade_card。FSRS 根据评分计算下一个到期日期。
运行
uv sync
# HTTP (default; for Railway / remote agents)
PORT=8000 uv run srs-mcp
# or stdio (local agent)
MCP_TRANSPORT=stdio uv run srs-mcp存储
两种后端,启动时选择:
Postgres(共享牌组) — 将
SRS_DATABASE_URL(或DATABASE_URL)设置为 Postgres 连接字符串(例如 Neon DB)。指向同一 URL 的每个部署都读写一个共享牌组,因此你可以从任何地方(本地、Railway 等)添加和复习卡片。FSRS 卡片 ID 很大,所以 Postgres 上的cards.card_id列是BIGINT。需要psycopg依赖(已声明)。SQLite(回退) — 当未设置
*DATABASE_URL时,卡片存放在SRS_DB指定的 SQLite 文件中(默认./srs.db)。单主机/离线。在 SQLite-on-Railway 设置中,在/data挂载一个卷并保持SRS_DB=/data/srs.db,这样卡片盒就能在重新部署后存活。
模式完全相同(表 cards),并在首次使用时自动创建。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables AI assistants to manage Anki flashcard decks and cards through natural language, supporting deck creation, card additions (basic and cloze types), and review queue management.682MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to interact with Anki flashcard collections, including deck management, note search, viewing contents, and editing fields.16MIT
- AlicenseNot gradedqualityCmaintenanceA 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.MIT
- AlicenseNot gradedqualityCmaintenanceProvides a privacy-first adaptive review engine with local SQLite storage, enabling item creation, due review retrieval, grading, and statistics via MCP tools.MIT
Related MCP Connectors
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Voice-led, FSRS-scheduled flashcards from YouTube, PDFs, web, or text. Auto-graded quizzes.
Persistent memory for AI agents. Search, store, and recall across sessions.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/klutometis/srs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server