anki-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ANKI_CONNECT_URL | No | AnkiConnect endpoint | http://127.0.0.1:8765 |
| ANKI_CONNECT_API_KEY | No | Only if you set an apiKey in the add-on config | |
| ANKI_CONNECT_TIMEOUT | No | Request timeout (seconds) | 15 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| anki_versionA | Health check: confirm AnkiConnect is reachable and return its API version (expected: 6). Call this first if other tools are failing. |
| request_permissionA | Ask AnkiConnect whether this client is permitted to make requests. Returns the permission status (and requires user approval in Anki the first time if an origin allow-list is configured). |
| list_supported_actionsA | List every AnkiConnect action supported by the running Anki/add-on version (via apiReflect). Useful to discover capabilities or debug. |
| syncA | Sync the local collection with AnkiWeb (so changes reach AnkiDroid / other devices). Requires AnkiWeb login configured in Anki Desktop. |
| reload_collectionA | Tell Anki to reload the collection from disk. |
| get_profilesA | List the names of all Anki user profiles. |
| get_active_profileA | Return the name of the currently active Anki profile. |
| load_profileC | Switch Anki to the given user profile. |
| export_packageA | Export a deck to an .apkg file at 'path'. Set include_sched=True to keep scheduling info (due dates, review history). |
| import_packageC | Import an .apkg package file from 'path' into the collection. |
| raw_requestA | Escape hatch: call ANY AnkiConnect action by name with raw params. Use only when no dedicated tool covers what you need (e.g. a brand-new AnkiConnect action). 'params' must match AnkiConnect's exact keys. |
| list_decksA | List the names of all decks in the collection. |
| list_decks_with_idsA | List all decks as a map of deck name -> deck ID. |
| get_decks_for_cardsB | Given card IDs, return a map of deck name -> the card IDs it contains. |
| create_deckA | Create a new deck. Use '::' in the name to create a nested subdeck (e.g. 'Languages::Romanian'). Existing decks are left untouched. |
| delete_deckA | Delete a deck. If cards_too is True (default) its cards are deleted as well; otherwise the cards are moved to the Default deck. Irreversible. |
| move_cardsA | Move the given cards to another deck. The target deck is created
automatically if it does not exist. Note: in Anki you move cards, not
notes — get card IDs from |
| deck_statsB | Get review statistics (new/learning/review counts, totals) for the given deck names. |
| get_deck_configC | Get the options/config group for a deck (new/review limits, intervals, etc.). |
| save_deck_configA | Save a modified deck options group. Pass a config object previously obtained from get_deck_config with your changes applied. |
| set_deck_config_idC | Assign the given decks to an existing options group by its config ID. |
| clone_deck_configA | Create a new options group named 'name', optionally cloned from an existing group's config ID. Returns the new config ID (or False). |
| remove_deck_configA | Remove an options group by its config ID (decks using it revert to the default group). |
| list_note_typesA | List all note type (model) names, e.g. 'Basic', 'Cloze'. |
| list_note_types_with_idsA | List all note types as a map of model name -> model ID. |
| find_note_types_by_idB | Get full definitions (fields, templates, css) for note types by ID. |
| find_note_types_by_nameA | Get full definitions (fields, templates, css) for note types by name. |
| note_type_fieldsA | List the field names of a note type, in order (e.g. Basic -> ['Front', 'Back']). Use this before add_note to supply the right fields. |
| note_type_field_descriptionsB | List each field's description (placeholder text) for a note type. |
| note_type_field_fontsA | Return the editor font and size configured for each field of a note type. |
| note_type_fields_on_templatesA | Return, per card template, which fields appear on the front and back. |
| create_note_typeA | Create a new note type. 'fields' are the ordered field names. 'card_templates' is a list of {'Name','Front','Back'} template dicts whose Front/Back are HTML using {{Field}} placeholders. Optional 'css' styles the cards; set is_cloze=True for a cloze-deletion type. |
| note_type_templatesC | Return the card templates (Front/Back HTML) of a note type. |
| note_type_stylingB | Return the CSS styling of a note type. |
| update_note_type_templatesC | Update card templates of a note type. 'templates' maps template name -> {'Front': html, 'Back': html}. |
| update_note_type_stylingC | Replace the CSS styling of a note type. |
| find_and_replace_in_note_typesB | Find & replace text within a note type's templates/css. Toggle which parts to touch with front/back/css. |
| note_type_template_renameB | Rename a card template within a note type. |
| note_type_template_repositionB | Move a card template to a new position (0-based index). |
| note_type_template_addB | Add a card template to a note type. 'template' is {'Name','Front','Back'}. |
| note_type_template_removeB | Remove a card template from a note type. Irreversible. |
| note_type_field_renameB | Rename a field of a note type. |
| note_type_field_repositionC | Move a field to a new position (0-based index). |
| note_type_field_addC | Add a new field to a note type, optionally at a 0-based index. |
| note_type_field_removeA | Remove a field from a note type. Irreversible (data in it is lost). |
| note_type_field_set_fontC | Set the editor font of a field. |
| note_type_field_set_font_sizeC | Set the editor font size of a field. |
| note_type_field_set_descriptionC | Set the description (placeholder text) of a field. |
| add_noteA | Add a single note. 'fields' maps the note type's field names to their HTML/text values (e.g. {'Front': '...', 'Back': '...'}). The deck and note type (model) must already exist. Returns the new note ID. |
| add_notesA | Add many notes in one call. Each item is {'deck': str, 'model': str, 'fields': {..}, 'tags': [..]?, 'allow_duplicate': bool?}. Returns a note ID per note (null where a note could not be added, e.g. a duplicate). |
| can_add_notesA | Check whether notes could be added (without adding them). Same note shape as add_notes. Returns a list of booleans plus per-note error detail. |
| find_notesA | Search notes with Anki's query syntax (e.g. 'deck:Default tag:new'). Returns the total count, all matching note IDs, and detailed field data for up to 'limit' notes. |
| notes_infoA | Get detailed info (fields, tags, model, cards) for specific note IDs. |
| notes_mod_timeB | Get the last-modified timestamp for specific note IDs. |
| update_note_fieldsB | Update one or more fields of an existing note. Only the fields you pass are changed; omitted fields keep their current values. |
| update_noteA | Update fields and/or the full tag set of a note in one call. Pass 'fields' to change fields and/or 'tags' to REPLACE the note's tags. |
| update_note_tagsB | Replace the entire tag set of a note with 'tags'. |
| get_note_tagsC | Get the tags of a single note. |
| delete_notesA | Permanently delete the given notes (and all their cards). Irreversible. |
| remove_empty_notesA | Delete all notes that have no cards (empty notes). Irreversible. |
| list_tagsA | List every tag used anywhere in the collection. |
| add_tagsC | Add one or more tags to the given notes. |
| remove_tagsC | Remove one or more tags from the given notes. |
| clear_unused_tagsA | Delete tags that are no longer used by any note. |
| replace_tagC | Rename a tag on the given notes (replace old_tag with new_tag). |
| replace_tag_in_all_notesB | Rename a tag across the ENTIRE collection (replace old_tag with new_tag on every note). |
| find_cardsA | Search cards with Anki's query syntax. Returns the total count, all matching card IDs, and detailed info (deck, note, interval, due, suspended state) for up to 'limit' cards. |
| cards_infoC | Get detailed info for specific card IDs (deck, fields, interval, due, ease, review count, suspended/marked state). |
| cards_to_notesA | Map card IDs to their parent note IDs (deduplicated). |
| cards_mod_timeB | Get the last-modified timestamp for specific card IDs. |
| suspend_cardsB | Suspend the given cards so they stop appearing in reviews. |
| unsuspend_cardsA | Unsuspend the given cards so they return to the review queue. |
| are_suspendedA | For each card ID, return True if suspended, False if not, null if the card does not exist. |
| are_dueA | For each card ID, return whether it is currently due for review. |
| get_intervalsA | Get the current interval of each card. With complete=True, returns the full list of all intervals in each card's history instead. |
| get_ease_factorsB | Get the ease factor (per mille, e.g. 2500) of each card. |
| set_ease_factorsA | Set the ease factor of each card (parallel lists). Ease is per mille, e.g. 2500 = 250%. |
| set_card_valuesA | Advanced: set specific low-level fields of one card (parallel keys/ values lists). Use with care — writing raw card properties can corrupt scheduling if misused. |
| forget_cardsB | Reset cards to the 'new' state (forget all review progress). |
| relearn_cardsC | Put the given cards into the relearning queue. |
| set_due_dateA | Reschedule cards to be due in 'days'. 'days' is Anki's set-due-date spec: '0' = today, '3' = in 3 days, '1-7' = random within a range, add '!' (e.g. '3!') to also reset the interval to that value. |
| answer_cardsA | Programmatically answer cards as if reviewed. Each item is {'cardId': int, 'ease': 1-4} where 1=Again, 2=Hard, 3=Good, 4=Easy. |
| store_media_fileA | Store a media file (image/audio) in the collection's media folder so it can be referenced from a note, e.g. '[sound:word.mp3]' or ''. Provide exactly one source: a local 'path', a 'url' to download, or base64 'data_b64'. Returns the stored filename. |
| retrieve_media_fileA | Retrieve a media file's contents as base64 (or false if not found). |
| list_media_filesA | List media file names, optionally filtered by a glob pattern (e.g. '*.mp3'). |
| get_media_dir_pathA | Return the absolute path of the collection's media folder. |
| delete_media_fileB | Delete a file from the collection's media folder. Irreversible. |
| cards_reviewed_todayA | Return how many cards have been reviewed so far today. |
| cards_reviewed_by_dayA | Return review counts per day as [date_string, count] pairs. |
| collection_stats_htmlC | Return Anki's statistics report as an HTML string. |
| card_reviewsA | Return all review log entries for a deck made after the given review ID (a Unix-ms timestamp; use 0 for all). |
| get_reviews_of_cardsC | Return the full review history for specific card IDs. |
| get_latest_review_idB | Return the most recent review ID for a deck (0 if none). |
| insert_reviewsA | Insert raw review-log rows (advanced; each row is AnkiConnect's review tuple). Mainly for migrating history. |
| gui_browseA | Open Anki's Card Browser filtered by 'query' and return the shown card IDs. Anki must be in the foreground to see it. |
| gui_selected_notesA | Return the note IDs currently selected in the open Card Browser. |
| gui_add_cardsA | Open Anki's Add dialog pre-filled with the given note (does not save it automatically). Returns the note ID if the user confirms. |
| gui_edit_noteB | Open the Edit dialog for a specific note. |
| gui_current_cardA | Return info about the card currently shown in the reviewer (or null). |
| gui_show_questionA | Show the question side of the current reviewer card. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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/kazim4uk/anki-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server