AnkiMCP Server — Claude Code MCP server: what it does, how to install
Connects an active Anki desktop collection to Claude Code over MCP. It lets an assistant inspect deck statistics, update note schemas, and create flashcards directly.
Open on GitHubWhat AnkiMCP Server does
This add-on spins up a local HTTP endpoint inside Anki at http://127.0.0.1:3141/. It launches automatically alongside the desktop software. Claude Code talks directly to this listener to inspect cards, pull deck metrics, and create entries without touching manual CSV exports.
During the initial launch, the extension fetches a 2 MB pydantic_core wheel directly from PyPI. Anki packages cannot bundle operating-system-specific binaries into one installer archive, so this step requires an active internet connection. Downloaded files stay in Anki's storage area across updates. For network protection, the built-in HTTP server validates loopback Host and Origin headers. You must adjust this allowlist manually before routing traffic through tunnels like ngrok or Cloudflare.
Available MCP methods include aggregate review scheduling metrics via cards_stats, note-type schema adjustments with model_field_*, and graphical review execution via gui_deck_review. Destructive actions, such as removing note fields, remain deactivated out of the box. You have to enable them explicitly in the extension preferences.
What it helps with
- pull interval schedules and due metrics with
cards_stats - adjust and reorder schema fields on note types
- trigger review steps in Anki's window with
gui_answer_card - generate study materials and save cards directly to decks
Example prompts for the agent
- Check due cards and review metrics for deck "Biology" using cards_stats.
- Add a new field named Context to the Basic note type right after Front.
- Start a review session on deck Spanish using gui_deck_review.
How to install AnkiMCP Server
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about AnkiMCP Server
How do I install AnkiMCP Server in Claude Code?
In Anki, open the add-on installation window, enter code 124672614, and restart the app. Then connect it to Claude Code by executing claude mcp add anki --transport http http://127.0.0.1:3141/.
What does AnkiMCP Server do?
It hosts an MCP HTTP service right inside the Anki desktop client. This interface lets AI coding agents inspect flashcard intervals, modify note fields, and control review workflows.
Why does the add-on need network access on its first run?
The add-on downloads a precompiled pydantic_core binary (~2 MB) from PyPI because platform-dependent native modules cannot ship inside the standard Anki addon bundle. The file is cached locally in Anki's data directory for all subsequent launches.