anki-mcp-server-addon

ankimcp/anki-mcp-server-addon

3.2

If you are the rightful owner of anki-mcp-server-addon and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

AnkiMCP Server is an Anki addon that allows AI assistants to interact with your flashcard collection using the Model Context Protocol (MCP).

Tools
5
Resources
0
Prompts
0

AnkiMCP Server (Addon)

An Anki addon that exposes your collection to AI assistants via the Model Context Protocol (MCP).

What is this?

AnkiMCP Server runs a local MCP server inside Anki, allowing AI assistants like Claude to interact with your flashcard collection. This enables AI-powered study sessions, card creation, and collection management.

Part of the ankimcp.ai project.

Note on First Run

On first run, this addon downloads pydantic_core (~2MB) from PyPI. This is required because pydantic_core contains platform-specific binaries (Windows/macOS/Linux) that cannot be bundled in a single addon file.

Features

  • Local HTTP server - Runs on http://127.0.0.1:3141/ by default
  • MCP protocol - Compatible with any MCP client (Claude Desktop, etc.)
  • Auto-start - Server starts automatically when Anki opens
  • Tunnel-friendly - Works with Cloudflare Tunnel, ngrok, etc.
  • Cross-platform - Works on macOS, Windows, and Linux (x64 and ARM)

Installation

From AnkiWeb (recommended)

  1. Open Anki and go to Tools → Add-ons → Get Add-ons...
  2. Enter code: 124672614
  3. Restart Anki

From GitHub Releases

  1. Download anki_mcp_server.ankiaddon from Releases
  2. Double-click to install, or use Tools → Add-ons → Install from file...
  3. Restart Anki

Usage

The server starts automatically when you open Anki. Check status via Tools → AnkiMCP Server Settings...

Connect with Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "anki": {
      "url": "http://127.0.0.1:3141/"
    }
  }
}

Configuration

Edit via Anki's Tools → Add-ons → AnkiMCP Server → Config:

{
  "mode": "http",
  "http_port": 3141,
  "http_host": "127.0.0.1",
  "auto_connect_on_startup": true
}

Available Tools

Essential Tools

ToolDescription
syncSynchronize collection with AnkiWeb
list_decksList all decks in the collection
create_deckCreate a new deck
find_notesSearch for notes using Anki's search syntax
notes_infoGet detailed information about notes
add_noteAdd a new note to a deck
update_note_fieldsUpdate fields of existing notes
delete_notesDelete notes from the collection
get_due_cardsGet cards due for review
present_cardGet card content for review
rate_cardRate a card after review (Again/Hard/Good/Easy)
model_namesList available note types
model_field_namesGet field names for a note type
model_stylingGet CSS styling for a note type
update_model_stylingUpdate CSS styling for a note type
create_modelCreate a new note type
store_media_fileStore a media file (image/audio)
get_media_files_namesList media files matching a pattern
delete_media_fileDelete a media file

GUI Tools

These tools interact with Anki's user interface:

ToolDescription
gui_browseOpen the card browser with a search query
gui_add_cardsOpen the Add Cards dialog
gui_edit_noteOpen the note editor for a specific note
gui_current_cardGet info about the currently displayed card
gui_show_questionShow the question side of current card
gui_show_answerShow the answer side of current card
gui_select_cardSelect a specific card in the reviewer
gui_deck_browserNavigate to deck browser
gui_undoUndo the last operation

Resources

ResourceDescription
system_infoAnki version and system information

Prompts

PromptDescription
review_sessionGuided review session workflow

Requirements

  • Anki 25.x or later (Python 3.13)

Architecture

The addon runs an MCP server in a background thread with HTTP transport (FastMCP + uvicorn). All Anki operations are bridged to the main Qt thread via a queue system, following the same proven pattern as AnkiConnect.

For details, see Anki Add-on Development Documentation.

License

AGPL-3.0-or-later

Links