anki-for-claude
Anki MCP Server, allows Claude Desktop to create, read and handle Anki Cards
Install / Use
claude mcp add MichaelPrutkow -- npx -y github:MichaelPrutkow/anki-for-claudeIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Tags
Our assessment of anki-for-claude
anki-for-claude scores 78/100 on our quality scale, 803rd of 947 AI & Machine Learning skills we index.
Its MCP Server is 9.3 KB long, well organised into 13 sections with 4 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated 18 days ago, so anki-for-claude is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 87/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
anki-for-claude compared with similar skills
All 4 of these similar skills score higher than anki-for-claude; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| anki-for-claude (this skill)by MichaelPrutkow | 78 | 3 | 18d ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 106.8k | 5d ago | CLAUDE.md |
| claude-memby thedotmack | 100 | 106.0k | today | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 89.0k | 4d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 78.4k | today | CLAUDE.md |
Frequently asked questions
- How do I install anki-for-claude?
- Run
claude mcp add MichaelPrutkow -- npx -y github:MichaelPrutkow/anki-for-claude. The install tabs above show the steps for each supported agent. - Which AI agents does anki-for-claude work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is anki-for-claude safe to use?
- It is MIT-licensed and scores 87/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is anki-for-claude still maintained?
- The repository was last updated 18 days ago, so anki-for-claude is actively maintained.
Skill content
View source on GitHubAnki for Claude
Claude writes your Anki cards. From lecture slides, PDFs, YouTube videos or whatever's in the chat.
A Claude plugin that runs locally against your Anki. It reads your material, writes the cards, draws the diagrams and makes native image occlusion cards. Later it goes through your review history and fixes the cards you keep failing.
Nothing hits your collection until you say yes.
Unofficial. Not affiliated with Ankitects Pty Ltd.
Demo
YouTube video + lecture slides in:
https://github.com/user-attachments/assets/68d1f24f-7f6c-480d-aa16-c312484f873b
Cards out, clicked through in Anki:
https://github.com/user-attachments/assets/00ac5217-9e81-4b8c-8479-c9aa38729dc4
What's different
Most AI flashcard tools turn a PDF into 300 cards you'll never review. This one writes fewer cards, from your own material, and keeps fixing the ones that don't stick.
- Cards follow actual rules. One fact per card, no yes/no questions, no lists (they become clozes), and a theorem gets separate cards for statement, hypotheses and key idea. The wording rules come from Wikipedia: Signs of AI writing, so the cards don't read like an LLM wrote them.
- You see every card word for word before it's added. Tell Claude what to change, approve, done.
- Real pictures. Graphs, trees and automata via Graphviz. Figures cut out of your PDF by their caption ("Fig. 3.2"). Plots via matplotlib. Native image occlusion, with masks placed from the PDF's text layer or the graph's node positions instead of guessed from pixels.
- Your review history decides what gets fixed.
statsranks notes by again rate, lapses, FSRS difficulty, answer time, leeches and red flags. Flag a card red on your phone and Claude picks it up next time. - A whole course in one go.
/anki:exam-prepgives every source its own agent, so 200 pages of slides never touch your context. You approve a topic blueprint weighted by past exams, the cards get written in parallel, audited, and approved topic by topic. - Everything is undoable. Every commit and edit returns a batch id,
undoreverts it.
Setup
You need:
- Anki 23.10+ with AnkiConnect:
Tools → Add-ons → Get Add-ons, code
2055492159, restart Anki. - uv:
brew install uv, or see the install guide. - Claude Code or the Claude desktop app.
- Optional: Graphviz for graphs, trees and automata
(
brew install graphviz).
Claude Code
/plugin marketplace add MichaelPrutkow/anki-for-claude
/plugin install anki@michaelprutkow
Desktop app: Customize → Plugins → Add → Add marketplace, enter
MichaelPrutkow/anki-for-claude, install Anki Flashcards.
Then say "check my Anki setup". First start takes a few seconds while uv pulls the dependencies.
In the desktop app, add a folder to the chat before your first message (your lecture folder, for example). The server runs on your machine, and without a folder the chat doesn't reliably reach it. Claude needs the folder for your PDFs anyway.
No config. It uses AnkiConnect on http://127.0.0.1:8765 and launches Anki if it's closed
(macOS).
Usage
"Make flashcards from this lecture for my deck Analysis 2."
Claude drafts, you review in the chat, it commits when you say yes. That's the loop.
| Skill | For |
| --- | --- |
| /anki:create-cards | Cards from any material |
| /anki:visuals | Graphs, PDF figures, plots, image occlusion |
| /anki:improve-cards | Find and fix weak cards, search, delete, undo |
| /anki:exam-prep | A whole course (slides, exercise sheets, past exams) into a prioritised deck |
| /anki:check-setup | Check Anki, AnkiConnect, the image occlusion note type and Graphviz |
Claude picks the skill itself. The slash commands are there to force one.
- Want it on autopilot? Schedule "improve my weakest cards in Analysis 2" as a task in the desktop app.
- PDFs and images are opened by their full path. A file you attach in the desktop app isn't on disk yet, so Claude saves it first or asks you for the path.
Under the hood
- Drafts are saved to disk, so they survive restarts. Every card is checked against your note types and for duplicates before you see it.
- The tools catch the usual formatting slips: LaTeX outside
\( \),$...$math Anki won't render, a<inside a formula, braces that close a cloze too early. - Pictures land in
~/Pictures/Anki for Claude, so you can look at them while reviewing. Image occlusion cards also get a<name>-masks.pngthat shows the masks. - The card rules live in a skill, so they cost nothing in chats that aren't about Anki.
- Tool output is short plain text. Long YouTube videos come back as a timestamped outline, and Claude only pulls the parts it needs.
undoskips cards you edited yourself in the meantime. Cards the plugin didn't create can't be deleted by it and are only edited after you agree.
Tools
| Tool | Access | What it does |
| --- | --- | --- |
| overview | read | Decks, card counts, note types and their exact field names |
| search_notes | read | Search with Anki's query syntax, one line per note |
| draft_add | draft | Check cards and add them to a draft |
| draft_add_occlusion | draft | Image occlusion note, masks by label or region |
| draft_edit | draft | Change or remove draft cards by number |
| draft_show | read | Show a draft, or list the open ones |
| stage_image | draft | Save an image, a PDF figure or part of a PDF page for a card |
| pdf_figures | read | Find figures and their captions in a PDF |
| render_graph | draft | Draw a graph, tree or automaton with Graphviz |
| stats | read | Card counts, retention and the cards you struggle with |
| youtube_transcript | web | Transcript or outline of a YouTube video |
| draft_commit | write | Add the approved cards, create missing decks |
| update_notes | write | Fix cards without losing their review history |
| undo | write | Revert a commit or an edit by its batch id |
| delete_notes | write | Delete notes this plugin created |
| sync | write | Sync with AnkiWeb so the cards reach your phone |
Draft tools only touch drafts and pictures, never your collection.
Safety
Back up first. This writes to your real collection: File → Export → Anki Collection Package.
It won't:
- add cards you didn't approve in the chat
- delete a note it didn't create
- edit a note it didn't create without asking
- open anything except images and PDFs
Privacy
Runs on your machine. Nothing is sent to me.
- Anki: AnkiConnect on
127.0.0.1. - Stored locally: drafts (deleted after 14 days untouched) and the undo journal in
~/.anki-mcp, pictures in~/Pictures/Anki for Claudeuntil you delete them. - Only when you ask: the video id goes to YouTube for a transcript, an image URL you want on a card gets fetched, and Anki syncs your collection to AnkiWeb.
- Programs it starts: Anki if it's closed (macOS), and Graphviz's
dotfor graphs.
Full policy: PRIVACY.md.
Known limits
- An open dialog in Anki blocks AnkiConnect. Every call times out until you close it.
- Claude Code and Cowork only. The server runs locally, so a plain chat (including claude.ai in the browser) can't reach it.
- Anki auto-starts on macOS only. On Windows and Linux, open it yourself.
- Duplicates work like in Anki: only the first field is compared.
- Deleting can't be undone. Fix a card instead.
- Image occlusion is rectangles only. Masks by label need a PDF text layer or a Graphviz graph, otherwise Claude places them by region.
- FSRS difficulty is read from the review log, because AnkiConnect doesn't expose FSRS memory states. Good enough for ranking.
Other MCP clients
The MCP server works without the plugin too, e.g. in Cursor. You get the tools, not the skills and agents.
git clone https://github.com/MichaelPrutkow/anki-for-claude.git
cd anki-for-claude
uv sync --no-dev
{
"mcpServers": {
"anki": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/anki-for-claude", "--no-dev", "-m", "anki_mcp"]
}
}
}
Development
uv sync
uv run pytest # tools against an in-memory fake of AnkiConnect, no Anki needed
claude plugin eval . # Claude with the plugin vs. without it, against mocked tools
claude --plugin-dir . # try it in Claude Code
Credits
- AnkiConnect by foosoft
- youtube-transcript-api by jdepoix
- pdfplumber, Pillow and Graphviz for the pictures
- MCP Python SDK
Related Skills
Agent-Reach
106.8kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
claude-mem
106.0kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Understand-Anything
89.0kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
78.4kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
