AnkiWeb MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ANKIWEB_EMAIL | No | Account email for non-interactive sign-in. | |
| ANKIWEB_COOKIE | No | Raw ankiweb.net session cookie string. | |
| ANKIUSER_COOKIE | No | Raw ankiuser.net session cookie string (defaults to ANKIWEB_COOKIE). | |
| ANKIWEB_PASSWORD | No | Account password paired with ANKIWEB_EMAIL. | |
| ANKIWEB_CONFIG_DIR | No | Directory for fallback session.json (default: ~/.config/claude-ankiweb). | |
| ANKIWEB_DISABLE_KEYRING | No | Set to 1 to use session.json instead of the OS keychain. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
AnkiWeb MCP Server for Claude.
Authorization & usability rules:
NEVER ask the user to type or paste their AnkiWeb password in chat, and NEVER ask them to run terminal scripts.
Whenever a tool fails with
error_code: "not_authenticated"(orankiweb_auth_statusreturnssigned_in: false), callankiweb_loginimmediately to open the secure local sign-in form in the user's browser.If
ankiweb_loginreturnspending_in_browser: true, sharelogin_urlas a backup link and callankiweb_auth_statusonce the user says they have signed in.Check
usable(andblocked_reason/action_required_url) onankiweb_auth_status: an account can besigned_in: truewhileusable: false(e.g.email_verification_requiredorterms_confirmation_required). In that case, shareaction_required_urlso the user can finish that step on AnkiWeb.
Study session rules:
Show
cards[0].question_textfirst; when flipping, showcards[0].answer_only_textso the front question is not repeated.AnkiWeb streams a 1-2 card lookahead window per call.
ankiweb_answer_cardautomatically returns updatedcountsand the next duecards—do not callankiweb_get_study_cardsagain after every answer.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| ankiweb_auth_statusA | Check whether AnkiWeb is signed in AND usable for deck/card calls. Returns
|
| ankiweb_loginA | Open a secure local browser form for the user to sign in to AnkiWeb. Waits up to |
| ankiweb_logoutA | Clear saved AnkiWeb and AnkiUser session cookies from keychain and disk. |
| ankiweb_list_decksA | List all decks in the user's AnkiWeb collection with card and due counts. |
| ankiweb_create_deckA | Create a deck on AnkiWeb. Use |
| ankiweb_rename_deckC | Rename an existing AnkiWeb deck by |
| ankiweb_remove_deckB | Permanently delete a deck and all of its cards from AnkiWeb. |
| ankiweb_list_notetypesA | List available note types (e.g. |
| ankiweb_add_noteA | Add a single flashcard note to AnkiWeb. Args:
deck: Target deck name (e.g. |
| ankiweb_add_notes_batchB | Add multiple flashcard notes to AnkiWeb in a single batch. Each item in |
| ankiweb_search_notesA | Search notes on AnkiWeb using Anki query syntax (e.g. AnkiWeb returns up to 100 matching notes per search. Pass |
| ankiweb_get_noteA | Fetch full field values, field names, and tags for a specific |
| ankiweb_update_noteA | Update field values and/or tags on an existing note.
|
| ankiweb_get_study_cardsA | Fetch the current lookahead window (1-2 cards) of due study cards from AnkiWeb. Pass Each returned card provides clean |
| ankiweb_answer_cardA | Submit a review answer ( Automatically returns updated |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 15 tools
Each tool maps to a distinct resource/action pair: auth (status/login/logout), decks (list/create/rename/remove), notes (add/add_notes_batch/search/get/update), and study (get_study_cards/answer_card). The only near-overlap is add_note vs add_notes_batch, and the descriptions make the single-vs-batch split unambiguous. get_study_cards and answer_card are also clearly delineated by the explicit note that answering returns the next window.
All 15 tools share the ankiweb_ prefix followed by a consistent snake_case verb_noun pattern (list_decks, create_deck, search_notes, answer_card, etc.). The only minor deviation is ankiweb_auth_status being a noun phrase, but it is still readable and predictable within the set.
15 tools is well within the ideal 3-15 range for an AnkiWeb client. Each tool covers a needed operation across auth, deck management, note CRUD, and study review, with no redundant or filler tools.
The surface covers auth, deck lifecycle (list/create/rename/delete), note read/write/search, and study review, but there is no way to delete a note or card, which is a notable gap for collection management. Note types are also read-only (list only), and there is no bulk update/remove path despite the batch add.