anki-mcp
Provides card CRUD (create, search, update, delete), deck management, archive/sync (export/import .apkg, AnkiWeb sync), progress analytics (deck maturity, Interest Heat Score, study streak), and conversation extraction for creating flashcards.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@anki-mcp create a flashcard about the capital of France"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
anki-mcp
MCP server for Anki via AnkiConnect — create, search, and manage flashcards directly from Claude Code or any MCP client.
Features
Card CRUD — create (bulk with duplicate detection), search, update, delete
Deck management — list, create (supports
::hierarchy)Archive & sync — export/import
.apkgfiles, trigger AnkiWeb syncProgress analytics — deck maturity, Interest Heat Score (which topics you retain best), study streak
Conversation extraction —
/anki extractscans a conversation for learnable moments and proposes cardsDaily progress script — cron-friendly report generator that reads Anki's SQLite directly
Claude Code skill — interactive card creation via
/ankislash command
Related MCP server: TalkToAnki
Requirements
Python 3.13+
Anki desktop running
AnkiConnect addon installed (addon code
2055492159)Claude Code or any MCP client
Installation
git clone https://github.com/chaosisnotrandomitisrhythmic/anki-mcp.git
cd anki-mcp
uv syncUsage
Add to your MCP config (~/.claude/settings.json, project .mcp.json, or Claude Desktop config):
{
"mcpServers": {
"anki": {
"command": "uv",
"args": ["--directory", "/path/to/anki-mcp", "run", "anki-mcp"]
}
}
}Tools
Tool | Description |
| Create flashcards (bulk, with duplicate detection) |
| Find cards using Anki query syntax |
| Edit a card's fields or tags |
| Remove cards by ID |
| All decks with card counts (new/learn/review) |
| Create a deck (supports |
| Export deck to |
| Restore |
| Trigger AnkiWeb sync |
| Learning report with Interest Heat Score |
| Check AnkiConnect connectivity |
Configuration
All configuration is via environment variables with sensible defaults:
Variable | Description | Default |
| Directory for |
|
| Path to Anki's | Platform-aware (macOS: |
| Directory for daily progress reports |
|
Daily Progress Script
A standalone script that reads Anki's SQLite database and generates a Markdown progress report. Works even when Anki is running (read-only via WAL mode).
# Run manually
cd /path/to/anki-mcp && uv run python scripts/daily_progress.py
# Cron example (daily at 7:03 AM)
3 7 * * * cd /path/to/anki-mcp && uv run python scripts/daily_progress.pyThe report includes deck overview, Interest Heat Score, and study streak.
Claude Code Skill
The skills/SKILL.md file provides a Claude Code skill for interactive card creation. It supports:
/anki— manual card creation/anki extract— scan conversation for extractable knowledge and create cards/anki progress— show learning progress
Uninstallation
Remove the
ankientry frommcpServersin your MCP configOptionally remove the skill:
rm -rf ~/.claude/skills/anki/Optionally delete the archive directory (
~/.local/share/anki-mcp/by default)Remove the repo:
rm -rf /path/to/anki-mcp
Your Anki cards are stored in Anki itself — nothing is lost by removing this server.
Contributing
See CONTRIBUTING.md.
Security
See SECURITY.md.
License
Available Tools
11 toolsadd_notesA
Create flashcards in Anki. Handles bulk creation with duplicate detection.
Args: notes: List of notes, each with front, back, tags, deck, model
Returns: Count of added/skipped cards and any errors
Inputs: notes (required). Returns: result
create_deckA
Create a new deck. Supports :: for nested hierarchy (e.g. 'AWS::IAM').
Args: name: Deck name (use :: for sub-decks)
Returns: Deck ID of the created deck
Inputs: name (required). Returns: result
delete_notesC
Delete cards by their note IDs.
Args: note_ids: List of note IDs to delete
Returns: Confirmation of deletion
Inputs: note_ids (required). Returns: result
export_deckA
Export a deck to .apkg file in the configured archive directory.
Args: deck: Deck name to export archive: If true, also delete the deck from Anki after export
Returns: Path to the exported .apkg file
Inputs: deck (required), archive. Returns: result
healthARead-only
Check if AnkiConnect is reachable and get Anki version.
Returns: Connection status and Anki version info
Inputs: no named parameters. Returns: result
import_deckA
Import/restore a .apkg file from the archive directory.
Args: filename: Name of the .apkg file in the configured archive directory
Returns: Confirmation of import
Inputs: filename (required). Returns: result
list_decksARead-only
List all Anki decks with card counts.
Returns: All decks with new/learn/review counts and total cards
Inputs: no named parameters. Returns: result
progressARead-only
Show learning progress: deck maturity, Interest Heat Score, study consistency.
Interest Heat Score ranks tags by how well knowledge consolidates — high scores reveal where genuine interest lives (effortless retention).
Syncs with AnkiWeb first to include mobile reviews.
Args: deck: Optional deck name to scope the report (default: all decks) top_n: Number of top tags to show in heat ranking (default: 15)
Returns: Markdown report with deck overview, interest heat, and study streak
Inputs: deck, top_n. Returns: result
search_notesARead-only
Search for existing cards using Anki query syntax.
Examples: 'deck:Default', 'tag:python', 'front:terraform', 'added:7' (last 7 days), 'deck:AWS tag:iam'
Args: query: Anki search query string limit: Max results to return (default 20)
Returns: Matching notes with their fields, tags, and IDs
Inputs: query (required), limit. Returns: result
syncA
Trigger AnkiWeb sync.
Returns: Confirmation that sync completed
Inputs: no named parameters. Returns: result
update_noteA
Edit an existing card's fields or tags.
Args: note_id: The note ID (from search_notes results) front: New front field content (optional) back: New back field content (optional) tags: New tag list — replaces all existing tags (optional)
Returns: Confirmation of update
Inputs: note_id (required), back, tags, front. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool targets a distinct operation (note CRUD, deck management, import/export, sync, progress, health) with no overlapping purposes. Even similar operations like add_notes and update_note are clearly differentiated by their descriptions.
The dominant pattern is verb_noun (add_notes, search_notes, list_decks, export_deck), but a few single-word tools (sync, progress, health) deviate. These are still unambiguous and readable, so only a minor inconsistency exists.
11 tools are well-scoped for an Anki MCP server, covering note management, deck operations, backup/restore, sync, and analytics without unnecessary bloat. Count falls comfortably in the ideal range.
Core CRUD for notes is complete (add, search, update, delete). Deck management lacks a direct delete_deck tool, though export_deck's archive option provides an indirect workaround. Sync and progress round out the lifecycle, leaving only minor gaps.
Maintenance
Related MCP Connectors
Remote MCP server for saving, searching, syncing, and managing Teak cards.
Zotero MCP server for Claude and ChatGPT: search, citations, safe writes, PDF passages and pages.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP server that enables AI assistants like Claude to interact with Anki flashcard decks, allowing users to create, manage, and update flashcards through natural language conversations.945MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants to seamlessly manage Anki flashcards, decks, and templates through the AnkiConnect API. It supports intelligent querying, batch note creation, and detailed study progress analysis using natural language.4MIT
- FlicenseAqualityDmaintenanceAn MCP server that enables Claude Code to create, manage, and search Anki flashcards directly from the terminal. It supports batch card creation, deck statistics retrieval, and synchronization with AnkiWeb for cross-platform review.8-
- AlicenseAqualityCmaintenanceMCP stdio server for controlling local Anki via AnkiConnect. Enables LLMs to manage Anki decks and notes through a standardized tool interface.119 npmMIT