get_leech_cardsLABSCO SUMMARY
Leeches are the right thing to point a model at.
A leech is a card that has failed enough times that the scheduling has given up on it, and the fix is almost always rewriting the card rather than reviewing it again — which is exactly the sort of judgement a model can help with. Writing a dated tag back is what keeps that useful over weeks: you can tell at a glance which leeches you have already reworked. Anki has to be open for any of it to work.
What it is
A narrow Anki server aimed at one problem: the cards that keep failing. It talks to a running Anki through the AnkiConnect add-on, retrieves cards tagged as leeches with enough data to reason about why they are hard, and writes a date-stamped tag back so you can see which ones you have already been through.
What you get
get_leech_cardsretrieves cards tagged as leeches, with adetailedflag for full card data or just IDs, and acountfor a random sampletag_reviewed_cardswrites a date-stamped review tag (見直し::YYYYMMDD) onto card IDs you passcustom_tag_prefixreplaces that prefix if you keep your collection in another language- A mock mode for trying it without touching a real collection
Requirements
Anki running with the AnkiConnect add-on installed — the server talks to it over HTTP, not to the collection file. Node.js and npm to build: npm install, npm run build, then point your client at dist/index.js (package anki-mcp-server, version 1.0.1). ANKI_CONNECT_URL defaults to http://localhost:8765 and ANKI_CONNECT_VERSION to 6; if localhost does not connect, set the URL to your machine's LAN address and allow it in AnkiConnect. ANKI_MOCK_MODE runs it without Anki at all.
Setup effort
Build from source — clone the repository and build it, then point your client at the built dist/index.js
USE CASES
Working out why certain cards keep failing
Pull the leech-tagged cards with full data and look for what they have in common.
Rewriting a handful of bad cards at a time
Ask for a random sample rather than the whole leech pile.
Keeping track of what you have already reworked
Tag the card IDs you went through with today's date.
Trying the workflow before wiring it to your collection
Run in mock mode with no Anki instance attached.
2 tools
Listed in project docs. Your client may show a different list.
tag_reviewed_cardsBEFORE YOU INSTALL
What to know first
Tools you get
2 tools named in the project's documentation.
Requires
- Anki running with the AnkiConnect add-on
- Node.js and npm
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Clone the repository and build it, then point your client at the built dist/index.js. This one is built from source rather than installed with a single command.
Server setup
Build from source
git clone https://github.com/captain-blue210/anki-mcp-server.git
cd anki-mcp-server
npm install
npm run buildnode
node <YOUR_PATH_TO_ANKI_MCP_SERVER>/dist/index.jsMCP Clients
Claude Desktop
{
"mcpServers": {
"anki": {
"command": "node",
"args": [
"<YOUR_PATH_TO_ANKI_MCP_SERVER>/dist/index.js"
]
}
}
}