srs-mcp
srs-mcp
エージェント非依存のMCPサーバーで、間隔反復学習のためのもの — Anki GUIもXvfbもAnkiConnectも不要。 エージェントは各自持参、こちらはカードボックスとスケジューラーを提供します。
小さなSQLiteストアの周りにFSRS(Free Spaced Repetition Scheduler、現代のAnkiが使うのと同じアルゴリズム)をラップしているため、エージェントはカードの作成、期限切れの確認、想起の記録を完全にヘッドレスで行えます。
なぜヘッドレスAnkiではないのか?
Anki デスクトップアプリをヘッドレスで動かすには、Qt + 仮想フレームバッファ(Xvfb)+ AnkiConnectアドオンが必要で、脆くバージョンに依存します。anki PyPIパッケージなら、GUIなしで実際の.anki2コレクションを操作でき、スマホのAnkiとの相互運用が必要な場合に使えます。しかし、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)— 1枚を削除(リセット / クリーンアップ)stats(deck=None) -> {total, due_now, suspended, reviews, decks}
カードの検索:デッキではなく検索
カードは、あらかじめデッキに分類するのではなく、テキストを検索することで見つかります — due_cards(q="horace")。deckフィールドに書き込むものはもうありません。トピックをカード自体に含めれば(「Horace, Odes 1.11: …」)、検索可能なままです。
デッキは単一値・自由テキスト・完全一致のラベルで、デッキごとのスケジュールは付属していないため、検索で得られないものは何もなく、正確さを犠牲にしていました。このデッキで測定したところ、エージェントは5種類の区切り文字の慣習にわたってHoraceの名前を10通りも作り出しており、最善のdeck="Horace"でも97枚中20枚のHoraceカードしか返せませんでした。一方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ストレージ
起動時に選択される2つのバックエンド:
Postgres(共有デッキ) —
SRS_DATABASE_URL(またはDATABASE_URL)にPostgresの接続文字列(例:Neon DB)を設定します。同じURLを指すすべてのデプロイは1つの共有デッキを読み書きするため、どこからでも(ローカル、Railwayなど)カードを追加・復習できます。FSRSのカードIDは大きいため、Postgresではcards.card_id列はBIGINTです。psycopg依存関係が必要です(すでに宣言済み)。SQLite(フォールバック) —
*DATABASE_URLが設定されていない場合、カードはSRS_DB(デフォルト./srs.db)のSQLiteファイルに保存されます。シングルホスト / オフライン。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