MCP server for Anki flashcards: adaptive review, notes, media, and deck management via AnkiConnect.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Anki MCP Server.
syncSync with AnkiWeb to pull latest data and push changes
get_due_cardsGet cards that are due for review, optionally filtered by deck (answers omitted unless `include_answer: true`, default `false`)
get_cardsGet cards with flexible filtering by state (due, new, learning, suspended, buried) and deck (answers omitted unless `include_answer: true`, default `false`)
present_cardShow a card for review with its question/front side
rate_cardRate card performance (Again, Hard, Good, Easy) and schedule the next review
forgetCardsReset cards to new, discarding their scheduling without recording a review
Seamlessly integrate Anki with AI assistants through the Model Context Protocol
Beta - This project is in active development. APIs and features may change.
A Model Context Protocol (MCP) server that enables AI assistants to interact with Anki, the spaced repetition flashcard application.
Transform your Anki experience with natural language interaction - like having a private tutor. The AI assistant doesn't just present questions and answers; it can explain concepts, make the learning process more engaging and human-like, provide context, and adapt to your learning style. It can create and edit notes on the fly, turning your study sessions into dynamic conversations. More features coming soon!
For comprehensive guides, real-world examples, and step-by-step tutorials on using this MCP server with Claude Desktop, visit:
ankimcp.ai - Complete documentation with practical examples and use cases
See docs/ for supplementary documentation, including the reviewer setup guide and the sample Anki deck.
Three representative prompts showing the tool flows this server enables:
"Help me review my Spanish deck." β The assistant syncs with AnkiWeb (sync), fetches due cards (get_due_cards with deck filter), presents each card (present_card), and records your rating (rate_card). Natural study conversation with explanations tailored to you.
"Create 10 Arabic vocab cards with RTL styling." β The assistant lists note types (modelNames), creates a custom RTL model if needed (createModel + updateModelStyling for right-to-left CSS), then batch-creates the cards (addNotes).
"Import this image from my Downloads folder into the front of the selected note." β The assistant uploads the local file (storeMediaFile with a file path), reads the currently-selected note from the browser (guiSelectedNotes + notesInfo), and updates the front field with an <img> tag (updateNoteFields).
The server exposes 53 MCP tools β 42 essential tools for everyday Anki operations and 11 GUI tools that drive the Anki desktop interface for note editing/creation workflows.
sync - Sync with AnkiWeb to pull latest data and push changesget_due_cards - Get cards that are due for review, optionally filtered by deck (answers omitted unless include_answer: true, default false)get_cards - Get cards with flexible filtering by state (due, new, learning, suspended, buried) and deck (answers omitted unless include_answer: true, default false)present_card - Show a card for review with its question/front siderate_card - Rate card performance (Again, Hard, Good, Easy) and schedule the next reviewforgetCards - Reset cards to new, discarding their scheduling without recording a reviewsetDueDate - Reschedule cards to become due in N days ("0", "3-7", "1!"), without recording a reviewareSuspended - Check suspension state for one or more cards without changing anythingsuspend - Suspend cards so they are skipped during review until unsuspendedunsuspend - Unsuspend cards so they return to normal reviewNote:
forgetCardsandsetDueDatechange scheduling without logging a review, which is what separates them fromrate_card. Reach for them when a card's schedule is wrong rather than the answer: rating a cardAgainto bury it deeper records a real lapse and drops its ease factor, permanently skewing both future scheduling and your statistics.forgetCardswipes the interval and starts the card over;setDueDatekeeps the card's history and just moves the next review.
Note: Card
front/backcontent is rendered per card from its own template (as Anki shows it), so reversed and cloze cards display the correct direction. Static text added by your card templates appears in the output as well.
listDecks - List all decks, optionally with per-deck study-queue statisticsdeckStats - Get comprehensive statistics for a single deck (study queue, true card-state counts, ease/interval distributions)createDeck - Create a new empty deck (supports Parent::Child, max 2 levels)changeDeck - Move cards to a different deck (created if it doesn't exist)Note: Deck statistics come in two flavours. The
countsblock (and everythinglistDecksreports) mirrors Anki's deck browser: cards due today, capped by each deck's daily new/review limits, with suspended and buried cards excluded β soreviewis not "mature cards" and theotherbucket is just the arithmetic remainder (mostly review cards not due today plus new cards over the daily limit). For true per-state totals use thestatesblock ondeckStats/collection_stats, which countsnew,learning,review,suspendedandburiedvia Anki searches, ignoring due dates and daily limits.
addNote - Create a single note with specified fields and tagsaddNotes - Batch-create up to 100 notes sharing a deck and model (partial success supported)findNotes - Search for notes using Anki query syntax (deck:, tag:, is:due, etc.)notesInfo - Get detailed information about notes (fields, tags, CSS styling)updateNoteFields - Update existing note fields (CSS-aware, supports HTML content)deleteNotes - Delete notes and all associated cards (destructive, requires confirmation)getTags - Get all tags in the collection (use first to avoid duplication)addTags - Add space-separated tags to specified notesremoveTags - Remove space-separated tags from specified notesreplaceTags - Rename a tag across specified notesclearUnusedTags - Remove orphaned tags not used by any notes (destructive)getMediaFilesNames - List media files in collection.media, optionally filtered by patternretrieveMediaFile - Download a media file as base64 contentstoreMediaFile - Upload media from base64 data, an absolute file path, or a URLdeleteMediaFile - Remove a media file from collection.media (destructive)π‘ Best Practice for Images:
/Users/you/image.png) - Fast and efficienthttps://example.com/image.jpg) - Direct downloadJust tell Claude where the image is, and it will handle the upload automatically using the most efficient method.
modelNames - List all available note types/modelsmodelFieldNames - Get field names for a specific note typemodelStyling - Get CSS styling information for a note typemodelTemplates - Get the card templates (Front and Back HTML) for a note typecreateModel - Create a new note type with custom fields, card templates, and CSS (e.g., RTL models)updateModelStyling - Update the CSS styling for an existing note type (applies to all its cards)updateModelTemplates - Update the card templates (Front and Back HTML) for an existing note type (applies to all its cards)addModelField - Add a new field to an existing note type (appended at the end or inserted at a specific position)removeModelField - Remove a field from an existing note type (deletes its content from all notes; requires explicit confirmation)renameModelField - Rename a field in an existing note type (card templates referencing the old name must be updated separately)repositionModelField - Change the position of a field within an existing note typecollection_stats - Aggregated statistics across all decks with per-deck breakdown and collection-wide card-state countsreview_stats - Review history analysis (temporal patterns, retention metrics, study streaks)Tools that drive the Anki desktop interface. Intended for note editing/creation and deck-management workflows, not for review sessions.
guiBrowse - Open the Card Browser and search for cardsguiSelectCard - Select a specific card in the Card BrowserguiSelectedNotes - Get IDs of notes currently selected in the Card BrowserguiAddCards - Open the Add Cards dialog with preset note detailsguiEditNote - Open the note editor for a specific noteguiDeckOverview - Open the Deck Overview dialog for a specific deckguiDeckBrowser - Open the Deck Browser dialogguiCurrentCard - Get info about the current card in review modeguiShowQuestion - Show the question side of the current cardguiShowAnswer - Show the answer side of the current cardguiUndo - Undo the last action in AnkiThere are a few ways to get the server onto your machine. Once it's installed, head to Connecting an AI Client to wire it up to your AI assistant β locally or remotely.
The general-purpose way to install the server, suitable for any MCP client that launches it directly.
Install it globally for clients that run the ankimcp command:
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/anki-mcp-server)<a href="https://allmcps.com/mcp/anki-mcp-server"><img src="https://allmcps.com/api/badge/anki-mcp-server?style=directory" alt="Anki MCP Server on AllMCPs" /></a>