Labsco
MCP SERVER

Anki MCP Server

by dhkim0124

Build and edit Anki decks by describing them, without opening the card editor.

Education, Tutoring & Study Tools
Summary
Ten cards on a topic, in the deck style you asked for.

The server asks about deck, style and card type before it creates anything and requires explicit confirmation before a delete, so a vague request does not quietly produce fifty wrong cards. Anki has to be open — everything routes through AnkiConnect, and nothing works while the app is closed.

What it is

A Python server that drives a running Anki through the AnkiConnect add-on. Fifteen tools across decks, cards, note types and media, plus built-in styling templates.

What you get
  • Decks listed with total, new, due and learning counts, created — nested with :: — and deleted — list_decks, create_deck, delete_deck
  • Cards created one at a time, in a batch, or on a custom note type with audio or image attached — create_card, create_card_batch, create_card_custom
  • Anki's own query syntax for finding cards, then editing fields and tags or removing them — search_cards, update_card, delete_cards
  • Custom note types with your own fields, CSS and HTML templates, updated later without recreating them — create_note_type, get_note_types, update_note_type_style, update_note_type_template
  • Images and audio uploaded to Anki's media folder, and the collection synced with AnkiWeb — add_media, sync_anki
  • Four built-in styles — default, duolingo, dark and code — plus custom CSS, checked for javascript: URLs, script tags and inline event handlers before it reaches Anki
Requirements

Anki 2.1.x or newer running in the background with the AnkiConnect add-on installed — add-on code 2055492159, and http://localhost:8765 should return AnkiConnect v.6. Python 3.9 or higher with the dependencies from requirements.txt, and your client pointed at anki_server.py.