Skip to main content
Glama
mcp-anki-connect
by rockyxwall

MCP Anki Connect (mcp-anki-connect)

A Model Context Protocol (MCP) server that provides seamless, high-performance integration with Anki via the AnkiConnect add-on.

Enables AI agents (Antigravity, Claude, etc.) to inspect collections, create notes, manage decks, analyze tag hierarchies, and organize study cards programmatically.


Prerequisites

  1. Install AnkiConnect Add-on in Anki:

    • Open Anki.

    • Go to Tools → Add-ons → Get Add-ons...

    • Enter code: 2055492159

    • Click OK and restart Anki.

  2. Keep Anki running when using the MCP server.


Related MCP server: Anki MCP Server

Installation & Build

# Install dependencies
npm install

# Build TypeScript to dist/
npm run build

MCP Configuration

1. Antigravity IDE (Workspace Configuration)

Add to .agents/mcp_config.json in your workspace:

{
  "mcpServers": {
    "mcp-anki-connect": {
      "command": "node",
      "args": [
        "dist/index.js"
      ]
    }
  }
}

2. Claude Desktop

Add to your Claude configuration (%APPDATA%\Claude\claude_desktop_config.json on Windows, ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "mcp-anki-connect": {
      "command": "node",
      "args": [
        "/path/to/mcp-anki-connect/dist/index.js"
      ]
    }
  }
}

Tools

Analysis & Batch Organization

  • deck_summary – Get card counts, total notes, and subdeck distribution in a single token-efficient call.

  • tag_summary – Inspect note and card counts per tag (supports optional prefix filtering like ict).

  • batch_tag_by_deck – Automatically migrate notes from subdecks to hierarchical tags (::).

Flashcard & Note Management

  • create_flashcard – Create quick front/back flashcards in the default deck.

  • add_note – Create custom notes with specified deck, model, fields, and tags.

  • add_notes – Bulk create multiple notes.

  • update_note_fields – Edit fields on existing notes.

  • find_notes – Search notes using Anki search syntax.

  • notes_info – Retrieve detailed note fields and tags.

  • add_tags / remove_tags – Manage note tags.

Deck Operations & Presets

  • deck_names – List all decks in collection.

  • deck_names_and_ids – List deck names with internal IDs.

  • change_deck – Move cards to another deck.

  • delete_decks – Delete specified decks.

  • deck_presets_summary – Inspect all unique deck configuration presets across the collection with daily limits, retention targets, review orders, and FSRS stats in a single call.

  • get_deck_config – Retrieve the full configuration group object for a specific deck.

  • save_deck_config – Save and update deck configuration settings and presets.

  • set_deck_config_id – Assign decks to a configuration preset ID.

  • clone_deck_config_id – Clone an existing configuration preset with a new name.

  • remove_deck_config_id – Delete an unused configuration preset by ID.

Note Types & Card Templates (Card Types)

  • model_names – List all note type/model names in the collection.

  • model_names_and_ids – Map model names to their unique internal IDs.

  • model_field_names – Retrieve field names for a specific note type.

  • model_fields_on_templates – Inspect field mappings on template question and answer sides.

  • model_templates – Retrieve all card templates (Card Types) with front/back HTML for a model.

  • model_template_rename – Rename a card template (card type) within a model.

  • update_model_templates – Bulk update front/back HTML templates on an existing model.

  • model_styling – Get CSS styling rules for a note model.

  • remove_empty_models – Safely purge unused note types/models that have 0 notes.

Card Operations

  • find_cards – Search cards with query syntax.

  • cards_info – Inspect card review history and states.

  • cards_to_notes – Resolve note IDs from card IDs.

  • suspend / unsuspend – Change card suspension status.

  • are_suspended / are_due – Check card states.

  • get_intervals – Inspect card scheduling intervals.

GUI Control

  • gui_browse – Open Anki card browser with pre-filled search.

  • gui_deck_browser – Jump to deck selection screen.

  • gui_deck_review – Start review session for a deck.

  • gui_add_cards – Open card creation modal in Anki.


Acknowledgements

Based on the original implementation by spacholski1225/anki-connect-mcp, providing structured Model Context Protocol (MCP) integration for AnkiConnect.


License

MIT

Available Tools

56 tools
add_noteD

Inputs: fields (required), deckName (required), modelName (required), tags, +1 more.

add_notesD

Inputs: notes (required).

add_tagsD

Inputs: tags (required), notes (required).

are_dueD

Inputs: cards (required).

are_suspendedD

Inputs: cards (required).

batch_tag_by_deckD

Inputs: mappings (required).

batch_update_io_descriptionsD

Inputs: updates (required).

can_add_notesD

Inputs: notes (required).

cards_infoD

Inputs: cards (required).

cards_to_notesD

Inputs: cards (required).

change_deckD

Inputs: deck (required), cards (required).

clone_deck_config_idD

Inputs: name (required), cloneFrom.

create_flashcardD

Inputs: back (required), front (required).

deck_namesD

Inputs: no named parameters.

deck_names_and_idsD

Inputs: no named parameters.

deck_summaryD

Inputs: deckName (required), includeSubdecks.

delete_decksD

Inputs: decks (required), cardsToo.

delete_media_fileD

Inputs: filename (required).

find_cardsD

Inputs: query (required).

find_notesD

Inputs: query (required).

get_deck_configD

Inputs: deck (required).

get_decksD

Inputs: cards (required).

get_image_occlusion_noteD

Inputs: noteId (required).

get_intervalsD

Inputs: cards (required), complete.

get_tagsD

Inputs: no named parameters.

gui_add_cardsD

Inputs: no named parameters.

gui_answer_cardD

Inputs: ease (required).

gui_browseD

Inputs: query (required).

gui_current_cardD

Inputs: no named parameters.

gui_deck_browserD

Inputs: no named parameters.

gui_deck_overviewD

Inputs: name (required).

gui_deck_reviewD

Inputs: name (required).

gui_exit_ankiD

Inputs: no named parameters.

gui_show_answerD

Inputs: no named parameters.

gui_show_questionD

Inputs: no named parameters.

gui_start_card_timerD

Inputs: no named parameters.

list_image_occlusion_notesD

Inputs: limit, offset, deckName, missingOnly.

model_field_namesD

Inputs: modelName (required).

model_fields_on_templatesD

Inputs: modelName (required).

model_namesD

Inputs: no named parameters.

model_names_and_idsD

Inputs: no named parameters.

multiD

Inputs: actions (required).

notes_infoD

Inputs: notes (required).

remove_deck_config_idD

Inputs: configId (required).

remove_tagsD

Inputs: tags (required), notes (required).

retrieve_media_fileD

Inputs: filename (required).

save_deck_configD

Inputs: config (required).

set_deck_config_idD

Inputs: decks (required), configId (required).

store_media_fileD

Inputs: data (required), filename (required).

suspendD

Inputs: cards (required).

tag_summaryD

Inputs: prefix.

unsuspendD

Inputs: cards (required).

update_image_occlusion_descriptionD

Inputs: noteId (required), description (required), tags, header, +1 more.

update_note_fieldsD

Inputs: id (required), fields (required).

upgradeD

Inputs: no named parameters.

versionD

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    D1.5/5.0

    Scored across 56 tools

    Disambiguation3/5

    Many tools have similar purposes (e.g., add_note vs add_notes, deck_names vs deck_names_and_ids) and lack descriptions, increasing the risk of misselection. However, most tool names are specific enough to hint at their function, and distinct categories like GUI control and media management are identifiable.

    Naming Consistency3/5

    Most names follow a snake_case pattern, but verbs vary (create_, get_, add_, gui_, batch_) and some are standalone nouns (version, multi) or verbs without objects (upgrade). This mix is readable but not fully consistent.

    Tool Count2/5

    With 56 tools, the server is far above the recommended 3-15 range and even exceeds the 'heavy' threshold of 25. The scope is broad, but this volume is overwhelming for agents and likely to cause selection fatigue.

    Completeness3/5

    The tool set covers most major Anki workflows: decks, notes, cards, tags, media, GUI control, and configuration. However, there are notable gaps such as no explicit delete_note or rename_deck, and update_note_fields exists but no full CRUD for cards beyond suspend/unsuspend.

    Related MCP Connectors

    Related MCP Servers