Enables AI assistants to interact with Anki flashcard collections, providing tools for deck and note management, card reviews, note type configuration, media file handling, and GUI operations within the Anki application.
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 defaultMCP 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)
Open Anki and go to Tools → Add-ons → Get Add-ons...
Enter code:
124672614Restart Anki
From GitHub Releases
Download
anki_mcp_server.ankiaddonfrom ReleasesDouble-click to install, or use Tools → Add-ons → Install from file...
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):
Configuration
Edit via Anki's Tools → Add-ons → AnkiMCP Server → Config:
Available Tools
Essential Tools
Tool | Description |
| Synchronize collection with AnkiWeb |
| List all decks in the collection |
| Create a new deck |
| Search for notes using Anki's search syntax |
| Get detailed information about notes |
| Add a new note to a deck |
| Update fields of existing notes |
| Delete notes from the collection |
| Get cards due for review |
| Get card content for review |
| Rate a card after review (Again/Hard/Good/Easy) |
| List available note types |
| Get field names for a note type |
| Get CSS styling for a note type |
| Update CSS styling for a note type |
| Create a new note type |
| Store a media file (image/audio) |
| List media files matching a pattern |
| Delete a media file |
GUI Tools
These tools interact with Anki's user interface:
Tool | Description |
| Open the card browser with a search query |
| Open the Add Cards dialog |
| Open the note editor for a specific note |
| Get info about the currently displayed card |
| Show the question side of current card |
| Show the answer side of current card |
| Select a specific card in the reviewer |
| Navigate to deck browser |
| Undo the last operation |
Resources
Resource | Description |
| Anki version and system information |
Prompts
Prompt | Description |
| Guided 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
ankimcp.ai - Project homepage
MCP Protocol - Model Context Protocol specification
Anki Add-on Docs - Official Anki addon development documentation