Anki MCP server with learning intelligence and a source-to-cards pipeline.
Unlike other Anki MCPs that only do CRUD, ankimaster exposes your review analytics, finds your leeches and weak areas, and lets you create flashcards with full source traceability — so an LLM can pull from Notion, Obsidian, or any source and you always know where each card came from.
- Anki running
- AnkiConnect addon installed (Tools > Add-ons > Get Add-ons > code
2055492159)
Add to your MCP config:
{
"mcpServers": {
"ankimaster": {
"command": "npx",
"args": ["ankimaster"]
}
}
}git clone https://github.com/gabrielrf97/ankimaster.git
cd ankimaster
npm install && npm run buildThen add it to your MCP client. For Claude Code:
claude mcp add ankimaster -- node $(pwd)/dist/index.jsFor Claude Desktop, add to your config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"ankimaster": {
"command": "node",
"args": ["/absolute/path/to/ankimaster/dist/index.js"]
}
}
}Replace /absolute/path/to/ankimaster with the actual path where you cloned the repo.
--port <number> AnkiConnect port (default: 8765)
--host <string> AnkiConnect host (default: localhost)
| Tool | Description |
|---|---|
list_decks |
List all decks |
create_deck |
Create a deck |
create_note |
Create a single note |
batch_create_notes |
Create multiple notes (max 50) |
search_notes |
Search using Anki query syntax |
get_note_info |
Get note details by ID |
update_note |
Update note fields/tags |
delete_note |
Delete a note |
list_note_types |
List note types with their fields |
| Tool | Description |
|---|---|
get_deck_stats |
Deck overview: card counts, ease/interval distributions, lapse stats |
get_review_stats |
Review history, retention estimation, ease buckets |
find_leeches |
Find problem cards: high lapses, low ease, tagged leeches — with card content for rewriting |
find_weak_areas |
Identify worst-performing tags or decks by aggregated difficulty score |
analyze_cards |
Deep card analysis: full review timeline, ease trajectory, rating distribution |
| Tool | Description |
|---|---|
create_source_cards |
Create cards with source attribution (Notion, Obsidian, PDF, URL). Auto-tags with source type, ID, and title |
get_source_cards |
Find cards from a specific source — check before creating to avoid duplicates |
ankimaster uses Anki's native tag system for source attribution. Every card created through create_source_cards gets tagged with:
ankimaster— identifies cards created through this toolsource:{type}— the source type (notion, obsidian, pdf, url, manual)source_id:{hash}— deterministic hash of the source URL for lookupsource_title:{slug}— slugified source title
With a Notion MCP also connected, the LLM can:
- Read a Notion page via the Notion MCP
- Call
get_source_cardsto check if cards already exist from that page - Generate flashcards from the content
- Call
create_source_cardswith the Notion page URL as the source
Same pattern works for Obsidian, PDFs, web pages, or any source the LLM can access.
- HTML sanitization: Card content is sanitized —
<script>,<iframe>, tracking pixels, and event handlers are stripped - Zero unnecessary deps: Only
@modelcontextprotocol/sdkas a production dependency. Rawfetch()to AnkiConnect instead of third-party wrappers - No telemetry, no external calls: Only talks to your local AnkiConnect instance
MIT