anki_get_deck_namesLABSCO 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_notesadds many cards in one call and reports how many succeeded and failed,anki_batch_update_tagsretags in bulk,anki_export_deckwrites 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_typeslists the models and their fields,anki_change_note_typeconverts existing cards with automatic field mapping anki_synctriggers a sync andanki_get_server_inforeports 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.
Setup effort
Build from source — git clone https://github.com/muxuuu/TalkToAnki.git
USE CASES
Turning a page of notes into a deck
Generate the cards in the conversation and write them all in one batch call, with a per-card success count back.
Finding out whether the studying is working
Pull the review history for a deck and read the success rate rather than eyeballing the graphs.
Fixing cards that were made with the wrong template
Convert them to the right note type with fields mapped automatically instead of retyping them.
Cleaning up a messy collection
Search for the cards that match, then retag, move or suspend them as a group.
20 tools
Listed in project docs. Your client may show a different list.
anki_create_deckanki_get_deck_statsanki_add_noteanki_find_notesanki_get_note_infoanki_syncanki_get_server_infoanki_update_noteanki_delete_notesanki_move_notesanki_suspend_notesanki_get_due_cardsanki_get_study_progressanki_get_review_historyanki_batch_add_notesanki_batch_update_tagsanki_export_deckanki_change_note_typeanki_get_note_typesBEFORE YOU INSTALL
What to know first
Tools you get
20 tools named in the project's documentation.
Requires
Python 3.8+
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/muxuuu/TalkToAnki.git
cd TalkToAnki
pip install -r requirements.txtMCP Clients
Cursor
{
"mcpServers": {
"anki": {
"command": "python",
"args": [
"<YOUR_PATH_TO_PROJECT>/TalkToAnki/talktoanki_server.py"
],
"env": {
"ANKI_CONNECT_URL": "http://localhost:8765",
"ANKI_CONNECT_VERSION": "6",
"LOG_LEVEL": "INFO"
}
}
}
}