About anki-mcp/anki-mcp-desktop
anki-mcp/anki-mcp-desktop is an MCP server published by anki-mcp in the RAG category: click MCPB installation. Built on NestJS with comprehensive test coverage. Conduid read 53 tools from its source: addModelField, addNote, addNotes, addTags, areSuspended, changeDeck and 47 more. No package is published for it, so it installs from a source checkout.
The repository has 587 stars and 42 forks, and its last commit was on 29 Nov 2026. The latest release is v0.27.0 (4 Oct 2026). It follows v0.26.0 (18 Sep 2026), and the 5 most recent releases go back to v0.24.2 (26 Aug 2026). It passes all 1 static checks Conduid ran on the repository. Its topics include ai-learning-tool, ai-tutor, anki, anki-addon and anki-flashcards.
Install
git clone https://github.com/anki-mcp/anki-mcp-desktopTools (53)
addModelFieldAdd a new field to an existing note type (appended at the end or inserted at a specific position)| Parameter | Type | Description |
|---|---|---|
| fieldName * | string | Name of the new field to add (e.g., "Grammar", "IPA", "Example") |
| index | number | Position to insert the field (0-based). Omit to append at the end. |
| modelName * | string | Name of the note type to modify (e.g., "Basic", "Latin Vocabulary") |
addNoteCreate a single note with specified fields and tags| Parameter | Type | Description |
|---|---|---|
| allowDuplicate | boolean | Whether to allow adding duplicate notes |
| deckName * | string | The deck to add the note to |
| duplicateScope | string | Scope for duplicate checking |
| duplicateScopeOptions | object | Specific deck to check for duplicates |
| fields * | object | Field values as key-value pairs (e.g., {"Front": "question", "Back": "answer"}) |
| modelName * | string | The note type/model to use (e.g., "Basic", "Cloze") |
| tags | array | Optional tags to add to the note |
addNotesBatch-create up to 100 notes sharing a deck and model (partial success supported)| Parameter | Type | Description |
|---|---|---|
| allowDuplicate | boolean | Whether to allow adding duplicate notes |
| deckName * | string | The deck to add all notes to |
| duplicateScope | string | Scope for duplicate checking |
| modelName * | string | The note type/model for all notes (e.g., "Basic", "Cloze") |
| notes | array | Field values as key-value pairs (e.g., {"Front": "question", "Back": "answer"}) |
| tags | array | Tags applied to all notes (merged with per-note tags) |
addTagsAdd space-separated tags to specified notes| Parameter | Type | Description |
|---|---|---|
| notes * | array | Array of note IDs to modify |
| tags * | string | Space-separated tags to add (e.g., "tag1 tag2") |
areSuspendedCheck suspension state for one or more cards without changing anythingchangeDeckMove cards to a different deck (created if it doesn't exist, with the same deck-name rules as `createDeck`)| Parameter | Type | Description |
|---|---|---|
| cards * | array | Array of card IDs to move |
| deck * | string | Target deck name ("::" for nested, e.g. "Spanish::Verbs"; a new deck can have at most ${MAX_DECK_DEPTH} levels) |
clearUnusedTagsRemove orphaned tags not used by any notes (destructive)collection_statsAggregated statistics across all decks with per-deck breakdown and collection-wide card-state counts| Parameter | Type | Description |
|---|---|---|
| ease_buckets | array | Bucket boundaries for ease factor distribution. Default: [2.0, 2.5, 3.0]. Example: [2.0, 2.5, 3.0] creates buckets: <2.0, 2.0-2.5, 2.5-3.0, >3.0 |
| interval_buckets | array | Bucket boundaries for interval distribution in days. Default: [7, 21, 90]. Example: [7, 21, 90] creates buckets: <7d, 7-21d, 21-90d, >90d |
createDeckCreate a new empty deck along with any missing parent decks (nested `Parent::Child::Grandchild`, up to 10 levels for a new deck; an existing deck of any depth is reused)| Parameter | Type | Description |
|---|---|---|
| deckName * | string | Deck name; nest with "::", e.g. "Spanish::Verbs" (a new deck can have at most ${MAX_DECK_DEPTH} levels) |
createModelCreate a new note type with custom fields, card templates, and CSS (e.g., RTL models)| Parameter | Type | Description |
|---|---|---|
| cardTemplates * | array | Template name (e.g., "Card 1") |
| css | string | Optional CSS styling for cards. For RTL languages, include "direction: rtl;" in .card class. |
| inOrderFields * | array | Field names in order (e.g., ["Front", "Back"]). At least one field required. |
| isCloze | boolean | Create as cloze deletion model (default: false) |
| modelName * | string | Unique name for the new model (e.g., "Basic RTL", "Advanced Vocabulary") |
deckStatsGet comprehensive statistics for a single deck (study queue, true card-state counts, ease/interval distributions)| Parameter | Type | Description |
|---|---|---|
| deck * | string | Deck name (e.g., "Japanese::JLPT N5") |
| easeBuckets | array | Bucket boundaries for ease factor distribution. Default: [2.0, 2.5, 3.0] |
| intervalBuckets | array | Bucket boundaries for interval distribution in days. Default: [7, 21, 90] |
deleteMediaFileRemove a media file from `collection.media` (destructive)| Parameter | Type | Description |
|---|---|---|
| filename * | string | Filename of the media file to delete (e.g., "old_audio.mp3") |
deleteNotesDelete notes and all associated cards (destructive, requires confirmation)| Parameter | Type | Description |
|---|---|---|
| confirmDeletion * | boolean | Confirms the permanent deletion of these notes and their cards; the call is rejected unless this is true |
| notes * | array | Array of note IDs to delete (max 100 at once for safety). Get these IDs from findNotes tool. ALL cards associated with these notes will be deleted. |
findNotesSearch for notes using Anki query syntax (`deck:`, `tag:`, `is:due`, etc.)| Parameter | Type | Description |
|---|---|---|
| query * | string | Anki search query. Use Anki query syntax like "deck:DeckName", "tag:tagname", "is:due", "is:new", "is:review", "front:text", "back:text", or combine with spaces for AND, OR for alternatives. Empty string returns all notes. |
forgetCardsReset cards to new, discarding their scheduling without recording a review| Parameter | Type | Description |
|---|---|---|
| cards * | array | Array of card IDs to reset to new (max 100). Card IDs (not note IDs) — use get_cards, get_due_cards, or notesInfo to obtain them. |
getMediaFilesNamesList media files in `collection.media`, optionally filtered by pattern| Parameter | Type | Description |
|---|---|---|
| pattern | string | Optional filter pattern (e.g., "*.mp3") |
getTagsGet all tags in the collection (use first to avoid duplication)| Parameter | Type | Description |
|---|---|---|
| pattern | string | Optional filter pattern - returns only tags containing this string (case-insensitive) |
get_cardsGet cards with flexible filtering by state (due, new, learning, suspended, buried) and deck (answers omitted unless `include_answer: true`, default `false`)| Parameter | Type | Description |
|---|---|---|
| deck_name | string | Specific deck name to get cards from. If not specified, gets cards from all decks |
| include_answer | boolean | Whether to include each card's answer (back). Defaults to false so answers are not seen before the user reveals them via present_card; true suits content analysis or editing rather than live review. |
| limit | number | Maximum number of cards to return |
get_due_cardsGet cards that are due for review, optionally filtered by deck (answers omitted unless `include_answer: true`, default `false`)| Parameter | Type | Description |
|---|---|---|
| deck_name | string | Specific deck name to get cards from. If not specified, gets cards from all decks |
| include_answer | boolean | Whether to include each card's answer (back). Defaults to false so answers are not seen before the user reveals them via present_card; true suits content analysis or editing rather than live review. |
| include_learning | boolean | Include cards in learning phase (seen but not yet graduated). Default: true |
| include_new | boolean | Include new cards (never seen before). Default: false |
| limit | number | Maximum number of cards to return |
guiAddCardsOpen the Add Cards dialog with preset note details| Parameter | Type | Description |
|---|---|---|
| note | object | Deck to add the note to |
guiBrowseOpen the Card Browser and search for cards| Parameter | Type | Description |
|---|---|---|
| query * | string | Anki search query using standard syntax (e.g., "deck:Spanish tag:verb", "is:due", "added:7") |
| reorderCards | object | Sort order for the cards in browser |
guiCurrentCardGet info about the current card in review mode (includes the answer; errors outside review mode)guiDeckBrowserOpen the Deck Browser dialogguiDeckOverviewOpen the Deck Overview dialog for a specific deck| Parameter | Type | Description |
|---|---|---|
| name * | string | Deck name to open (get from listDecks) |
guiEditNoteOpen the note editor for a specific note| Parameter | Type | Description |
|---|---|---|
| note * | number | Note ID to edit (get from findNotes or notesInfo) |
guiSelectCardSelect a specific card in the Card Browser| Parameter | Type | Description |
|---|---|---|
| card * | number | Card ID to select in the browser (get from guiBrowse results) |
guiSelectedNotesGet IDs of notes currently selected in the Card BrowserguiShowAnswerShow the answer side of the current cardguiShowQuestionShow the question side of the current cardguiUndoUndo the last action in AnkilistDecksList all decks, optionally with per-deck study-queue statistics| Parameter | Type | Description |
|---|---|---|
| includeStats | boolean | Include card count statistics for each deck |
modelFieldNamesGet field names for a specific note type| Parameter | Type | Description |
|---|---|---|
| modelName * | string | The name of the model/note type to get fields for |
modelNamesList all available note types/modelsmodelStylingGet CSS styling information for a note type| Parameter | Type | Description |
|---|---|---|
| modelName * | string | The name of the model/note type to get styling for |
modelTemplatesGet the card templates (Front and Back HTML) for a note type| Parameter | Type | Description |
|---|---|---|
| modelName * | string | The name of the model/note type to get templates for |
notesInfoGet detailed information about notes (fields, tags, note type, card IDs; CSS comes from `modelStyling`)| Parameter | Type | Description |
|---|---|---|
| notes * | array | Array of note IDs to get information for (max 100 at once for performance). Get these IDs from findNotes tool. |
present_cardShow a card for review with its question/front side| Parameter | Type | Description |
|---|---|---|
| card_id * | number | The ID of the card to retrieve |
| show_answer | boolean | Whether to include the answer/back content in the response |
rate_cardRate card performance (Again, Hard, Good, Easy) and schedule the next review| Parameter | Type | Description |
|---|---|---|
| card_id * | number | The ID of the card to rate |
| rating * | number | The user's rating for the card: 1=Again (failed), 2=Hard, 3=Good, 4=Easy |
removeModelFieldRemove a field from an existing note type (deletes its content from all notes; requires explicit confirmation)| Parameter | Type | Description |
|---|---|---|
| confirmDeletion * | boolean | Confirms that all data in this field will be permanently deleted; the call is rejected unless this is true. |
| fieldName * | string | Name of the field to remove (e.g., "Grammar", "IPA") |
| modelName * | string | Name of the note type to modify (e.g., "Basic", "Latin Vocabulary") |
removeTagsRemove space-separated tags from specified notes| Parameter | Type | Description |
|---|---|---|
| notes * | array | Array of note IDs to modify |
| tags * | string | Space-separated tags to remove (e.g., "tag1 tag2") |
renameModelFieldRename a field in an existing note type (Anki rewrites references to the old name in the card templates)| Parameter | Type | Description |
|---|---|---|
| modelName * | string | Name of the note type to modify (e.g., "Basic", "Latin Vocabulary") |
| newFieldName * | string | New name for the field (e.g., "Grammar Notes") |
| oldFieldName * | string | Current name of the field to rename (e.g., "Notes") |
replaceTagsRename a tag across specified notes| Parameter | Type | Description |
|---|---|---|
| notes * | array | Array of note IDs to modify |
| replaceWithTag * | string | The tag to replace with |
| tagToReplace * | string | The tag to search for and replace |
repositionModelFieldChange the position of a field within an existing note type| Parameter | Type | Description |
|---|---|---|
| fieldName * | string | Name of the field to reposition (e.g., "Grammar") |
| index * | number | New 0-based position for the field (0 = first field). |
| modelName * | string | Name of the note type to modify (e.g., "Basic", "Latin Vocabulary") |
retrieveMediaFileDownload a media file as base64 content| Parameter | Type | Description |
|---|---|---|
| filename * | string | Filename of the media file to retrieve (e.g., "pronunciation.mp3") |
review_statsReview history analysis (temporal patterns, retention metrics, study streaks)| Parameter | Type | Description |
|---|---|---|
| deck | string | Deck name to filter reviews. Matches the EXACT deck only - subdecks are NOT included, so a parent deck still returns reviews for cards assigned directly to it (but not its subdecks' cards). Omit (or pass an empty string) to analyze the entire collection (all decks). |
| end_date | string | End date (defaults to today) |
| start_date * | string | Start date for analysis (ISO format: YYYY-MM-DD) - REQUIRED |
setDueDateReschedule cards to become due in N days (`"0"`, `"3-7"`, `"1!"`), without recording a review| Parameter | Type | Description |
|---|---|---|
| cards * | array | Array of card IDs to reschedule (max 100). Card IDs (not note IDs) — use get_cards, get_due_cards, or notesInfo to obtain them. |
| days * | string | How many days from now the cards become due. "0" = today, "1" = tomorrow, "3-7" = a random day in that inclusive range (spreads a batch out instead of stacking it on one day). Append "!" — e.g. "1!" — to also overwrite the card's interval with that value, rather than leaving the existing interval in place. |
storeMediaFileUpload media from base64 data, an absolute file path, or a URL| Parameter | Type | Description |
|---|---|---|
| data | string | Base64-encoded file content |
| deleteExisting | boolean | Overwrite existing file (default: true) |
| filename * | string | Filename to store in Anki (e.g., "pronunciation.mp3", "image.jpg") |
| path | string | Absolute path to a local media file (images, audio, video only) |
| url | string | URL to download file from |
suspendSuspend cards so they are skipped during review until unsuspendedsyncSync with AnkiWeb to pull latest data and push changesunsuspendUnsuspend cards so they return to normal reviewupdateModelStylingUpdate the CSS styling for an existing note type (applies to all its cards)| Parameter | Type | Description |
|---|---|---|
| css * | string | New CSS styling content. For RTL languages, include "direction: rtl;" in .card class. This will completely replace the existing CSS. |
| modelName * | string | Name of the model to update (e.g., "Basic", "Basic RTL") |
updateModelTemplatesUpdate the card templates (Front and Back HTML) for an existing note type (applies to all its cards)| Parameter | Type | Description |
|---|---|---|
| modelName * | string | Name of the model to update (e.g., "Basic", "Cloze") |
| templates * | object | HTML template for the front/question side |
updateNoteFieldsUpdate existing note fields (CSS-aware, supports HTML content)| Parameter | Type | Description |
|---|---|---|
| note | object | The ID of the note to update. Get this from findNotes or notesInfo. |
Security checks
- ✓README presentThe repository's README runs to about 4.5K words.
5 checks have not been run yet.
Releases
README
The repository's README runs to about 4.5K words. The original in the repository is authoritative.
Read full README