Labsco
MCP SERVER

TalkToAnki

by muxuuu

Create, edit and study Anki cards through the assistant — including in batches and with progress statistics.

Education, Tutoring & Study Tools
Summary
Anki has to be open — that is the whole failure mode.

The server talks to the AnkiConnect port on your desktop, so a closed Anki shows up as zero tools rather than a connection error. If a call hangs instead, check whether Anki is sitting behind a modal dialog waiting for a click. Beyond that, the statistics tools are the ones worth having: success rate by deck over a period is something the app makes you dig for.

What it is

A single-file server that drives a running Anki desktop through the AnkiConnect add-on. It covers deck and note management, bulk operations, and the review statistics Anki keeps but does not make easy to query.

What you get
  • Decks: `anki_get_deck_names`, `anki_create_deck`, `anki_get_deck_stats`
  • Cards: `anki_add_note`, `anki_find_notes`, `anki_get_note_info`, `anki_update_note`, `anki_delete_notes`, `anki_move_notes`, `anki_suspend_notes`
  • Bulk work: `anki_batch_add_notes` adds many cards in one call and reports how many succeeded and failed, `anki_batch_update_tags` retags in bulk, `anki_export_deck` writes a deck out as an .apkg file
  • Study data: `anki_get_due_cards`, `anki_get_study_progress` (new, young and mature counts with percentages), `anki_get_review_history` (again, hard, good and easy counts with a success rate)
  • Note types: `anki_get_note_types` lists the models and their fields, `anki_change_note_type` converts existing cards with automatic field mapping
  • `anki_sync` triggers a sync and `anki_get_server_info` reports connection state and configuration
Requirements

Python 3.8+, Anki desktop running, and the AnkiConnect add-on installed with code 2055492159. Published as TalkToAnki, version 1.0.0; the documented setup points the client at talktoanki_server.py directly. ANKI_CONNECT_URL defaults to http://localhost:8765 and ANKI_CONNECT_VERSION to 6; REQUEST_TIMEOUT, CONNECTION_TIMEOUT and MAX_RETRIES are tunable.