Loading...
Loading...
Comprehensive reference for the Mankey Anki CLI and MCP server. Use when working with Anki flashcards via the mankey command, creating notes, managing decks, reviewing cards, querying collection data, or building MCP tool integrations. Covers all 96 tools across 8 categories (deck, note, card, model, media, stats, gui, system) with full parameter details.
npx skill4agent add briansunter/mankey mankey-cli2055492159claude_desktop_config.json.mcp.json{
"mcpServers": {
"anki": {
"command": "npx",
"args": ["mankey"]
}
}
}npx mankey deck list # List decks
npx mankey tools # List all 96 tools
npx mankey note add --deck Default --model Basic --front "Q" --back "A"
npx mankey run <toolName> '<json>' # Run any tool by name| Option | Description |
|---|---|
| Anki-Connect server URL |
| Environment variable (default: |
defaults write net.ankiweb.dtop NSAppSleepDisabled -bool true| Command | Description |
|---|---|
| List all deck names |
| Create a deck (use |
| Get new/learn/review/total counts |
| Delete decks and their cards |
| Command | Description |
|---|---|
| Create a note |
| Search notes |
| Get note details |
| Update a note |
| Delete notes permanently |
| Get tags for a note |
| Command | Description |
|---|---|
| Search cards |
| Get card details |
| Suspend cards |
| Unsuspend cards |
| Answer card (1=Again 2=Hard 3=Good 4=Easy) |
| Get next due cards in review order |
| Command | Description |
|---|---|
| List all note types |
| Get field names for a model |
| Create model |
| Command | Description |
|---|---|
| Today's review count |
| Due cards with learning/review breakdown |
| Full collection statistics HTML |
npx mankey run <toolName> '<jsonArgs>'
# Example:
npx mankey run addNote '{"deckName":"Default","modelName":"Basic","fields":{"Front":"Hello","Back":"World"}}'
npx mankey run findCards '{"query":"deck:Default is:due","limit":20}'runreferences/tools-by-category.mdoffsetlimitdeck::decks[]deckdecks[]cardsToodeckNamemodelNamefields{}tags[]allowDuplicatenotes[]queryoffsetlimitnotes[]idfields{}tags[]note.idnote.fields{}notes[]notenotes[]tagsnotes[]tagsnotes[]tagToReplacereplaceWithTagtagToReplacereplaceWithTagnotes[]queryoffsetlimitdecklimitoffsetcards[]answers[].cardIdanswers[].easecards[]cards[]cards[]cards[]easeFactors[]cards[]completecards[]cards[]cards[]cards[]cardkeys[]newValues[]cards[]cards[]decknotes[]modelNamemodelNameinOrderFields[]cardTemplates[]cssisClozemodelNamemodelNamemodelNamemodel.namemodel.templates{}model.namemodel.cssfilenamedataurlpathdeleteExistingfilenamepatternfilenamedeckwholeCollectiondeckstartIDdeckcards[]queryreorderCards{}note{}easenamenamecardnotepathdeckpathincludeSchedpathscopes[]actions[]actions[]cards[]dayscardconfig{}decks[]configIdnamecloneFromconfigId# Deck overview: new/learning/review/total counts
npx mankey deck stats "Japanese::JLPT N5"
# Today's study stats
npx mankey stats today
# Due cards with queue breakdown (learning vs review vs new)
npx mankey stats due --deck "Japanese::JLPT N5"
# Find well-known cards (high interval = strong retention)
npx mankey run findCards '{"query":"deck:Default prop:ivl>30"}'
# Get full learning data for specific cards (interval, ease, reps, lapses)
npx mankey card info <cardId1> <cardId2>
# Returns: interval (days until review), factor (ease multiplier),
# reps (successful reviews), lapses (times forgotten),
# queue (0=new, 1=learning, 2=review, 3=relearning),
# type (0=new, 1=learning, 2=review, 3=relearn)# Cards failed many times (high lapse count)
npx mankey run findCards '{"query":"deck:Default prop:lapses>5"}'
# Cards with low ease (difficulty multiplier, 2500 = default)
npx mankey run findCards '{"query":"deck:Default prop:ease<2.0"}'
# Cards currently in relearning (recently forgotten)
npx mankey run findCards '{"query":"deck:Default is:learn -is:new"}'
# Get ease factors for specific cards
npx mankey run getEaseFactors '{"cards":[123,456]}'# Single card
npx mankey note add --deck "Japanese" --model Basic --front "日本語" --back "Japanese language" --tags japanese,vocabulary
# Bulk create via generic runner
npx mankey run addNotes '{"notes":[
{"deckName":"Japanese","modelName":"Basic","fields":{"Front":"猫","Back":"cat"},"tags":["japanese"]},
{"deckName":"Japanese","modelName":"Basic","fields":{"Front":"犬","Back":"dog"},"tags":["japanese"]}
]}'
# Cloze deletion
npx mankey run addNote '{"deckName":"Science","modelName":"Cloze","fields":{"Text":"The {{c1::mitochondria}} is the powerhouse of the cell"}}'
# Check what fields a model needs before creating
npx mankey model fields "Basic (and reversed card)"# Get next due cards in review order (Learning > Review > New)
npx mankey card next --deck Default --limit 5
# Answer cards: 1=Again 2=Hard 3=Good 4=Easy
npx mankey card answer <cardId> 3
# Batch answer multiple cards
npx mankey run answerCards '{"answers":[
{"cardId":123,"ease":3},
{"cardId":456,"ease":4}
]}'# Find all cards with a tag
npx mankey note find "tag:japanese"
# Add tags to notes
npx mankey run addTags '{"notes":[123,456],"tags":"vocab important"}'
# Replace a tag across entire collection
npx mankey run replaceTagsInAllNotes '{"tagToReplace":"old-tag","replaceWithTag":"new-tag"}'
# Clean up unused tags
npx mankey run clearUnusedTags '{}'
# Move cards between decks
npx mankey run changeDeck '{"cards":[123,456],"deck":"Japanese::Advanced"}'# Search with Anki query syntax
npx mankey card find "deck:Japanese is:due" --limit 50
npx mankey note find "tag:vocab added:7" # Added in last 7 days
npx mankey card find "prop:ivl>90 deck:Default" # Well-known cards
# Suspend/unsuspend cards
npx mankey card suspend 123 456 789
npx mankey card unsuspend 123 456 789
# Reset cards to new state (clear scheduling)
npx mankey run forgetCards '{"cards":[123,456]}'
# Reschedule cards
npx mankey run setDueDate '{"cards":[123,456],"days":"0"}' # Due today
npx mankey run setDueDate '{"cards":[123,456],"days":"7"}' # Due in 7 days| Query | Matches |
|---|---|
| Cards in deck (use quotes for |
| Notes with tag |
| Notes without tag |
| Cards due for review |
| New cards (never reviewed) |
| Review cards (graduated from learning) |
| Cards in learning phase |
| Suspended cards |
| Cards with interval > N days |
| Cards with ease factor < N |
| Cards failed more than N times |
| Cards reviewed more than N times |
| Cards added in last N days |
| Cards rated in last N days |
| Cards where field contains value |
deck:Japanese is:due prop:lapses>3offsetlimitpagination: { total, offset, limit, hasMore, nextOffset }notesInfocardsInfo