Skip to content
Conduit

mcp server

mcp-anki

MCP server for Anki: create and edit notes, read deck limits and today's scheduler counts, through AnkiConnect.

Nikodem5/mcp-ankicommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

Before you start

  • uv (`curl -LsSf https://astral.sh/uv/install.sh | sh`)
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "mcp-anki": {
      "command": "uvx",
      "args": [
        "mcp-anki"
      ]
    }
  }
}

same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12

Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs

README

synced Oct 25, 2026

mcp-anki

An MCP server that exposes Anki to an MCP client (Claude Desktop, Claude Code) through the AnkiConnect add-on.

Anki is the only data store, the server keeps no state of its own.

Requirements

  • Python 3.13+ and uv
  • Anki Desktop running, with AnkiConnect (add-on code 2055492159) on 127.0.0.1:8765

Run

uv sync
uv run mcp-anki --check   # confirm AnkiConnect is reachable before wiring up a client
uv run mcp-anki

Claude Desktop config (%APPDATA%\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "mcp-anki": {
      "command": "FULL_PATH_TO_UV",
      "args": ["--directory", "FULL_PATH_TO_PROJECT", "run", "mcp-anki"]
    }
  }
}

Optional environment variables:

VariableDefaultPurpose
ANKI_CONNECT_URLhttp://127.0.0.1:8765Where AnkiConnect is listening
ANKI_CONNECT_KEYunsetAPI key, if AnkiConnect's requestPermission requires one
MCP_ANKI_LOGmcp_tools.logPath to the call log

Anki has to be open for every tool to work.

Tools

ToolPurpose
test_anki_connectionConfirm AnkiConnect is reachable
anki_check_existsSearch for existing notes before creating a duplicate
anki_add_cardCreate a note of any note type in a deck
anki_get_notesFetch fields, tags, and deck for notes matching a query
anki_update_cardUpdate fields and/or tags of a note; unknown field names raise
anki_add_cardsAdd up to 100 notes in one all-or-nothing batch
anki_can_add_cardsPre-flight a batch without writing
anki_list_modelsList note types
anki_get_model_fieldsA note type's field names and descriptions
anki_get_cardsCard-level scheduling data (interval, ease, lapses, due)
anki_delete_noteDelete a note and its cards; previews by default
anki_reschedule_cardsMove the due date of every card matching a query; previews by default
anki_list_decksList every deck name in the collection
anki_list_decks_with_idsDeck names with ids
anki_create_deckCreate a deck if missing
anki_move_cardsMove cards matching ids or a query to another deck
anki_delete_deckDelete a deck and its cards; previews by default
anki_get_deck_preset_limitsRead new/day and review/day from the deck's Preset
anki_set_deck_preset_limitsWrite those limits, cloning a shared Preset first
anki_get_deck_statsToday's actual new/learn/review counts from the scheduler
anki_syncSync the collection with AnkiWeb

Calls are logged to mcp_tools.log with arguments and results.

Deck limits: the tier problem

Anki applies daily limits in three tiers, highest precedence first:

Today only  >  This deck  >  Preset

AnkiConnect can only read and write the Preset tier. If a deck has a "This deck" or "Today only" override set in Deck Options, anki_set_deck_preset_limits will report success and change the Preset while the app keeps showing the old numbers — the override wins, and nothing in the API can see it. Clear it by hand in Anki.

anki_get_deck_stats reads what the scheduler actually computed for today, so use it to check whether a limit change took effect.

When the limit tiers won't cooperate, anki_reschedule_cards goes around them: instead of capping how many cards a day shows, it moves the cards themselves. deck:"HSK 4" is:due with days="1-14" spreads a backlog of 220 due cards over the next two weeks at roughly 16 a day. It previews by default (dry_run is True); applying it overwrites due dates irreversibly, with Ctrl+Z in the Anki app as the only undo.

License

MIT

↑↓ navigate openesc close