anki-mcp — Claude Code MCP server: Anki cards in chat
Connects an Anki collection to an AI assistant: quiz sessions, study analytics, bulk tag and deck edits.
claude mcp add anki-mcp -- npx -y @arielbk/anki-mcpWhat anki-mcp does
The server sits between Anki and any MCP client, talking to the app through AnkiConnect. Your assistant can read decks, cards and review history, so questions like which topics keep slipping get answered from your own data. Seven tools cover card management, quiz sessions, analytics, search and bulk operations.
Two things have to be in place first: Anki itself, and the AnkiConnect add-on added with code 2055492159. Anki has to stay open while the server runs, otherwise calls to it fail. AnkiConnect 25.2.25.0 or newer is needed for full compatibility; older builds handle most features.
The package @arielbk/anki-mcp runs through npx, so there is nothing to build. stdio is the default transport, and a local HTTP mode is available too: node dist/index.js --http --host=127.0.0.1 --port=3000, with the endpoint at http://127.0.0.1:3000/mcp. Working on the code means cloning the repo, then pnpm install and pnpm build.
What it helps with
- quiz yourself on cards you have not reviewed in days
- tag hundreds of cards in one pass
- hunt down duplicate cards across decks
- see which topics have weak retention
- turn lecture notes into flashcards
Example prompts for the agent
- Show me my Anki decks and the card count in the biggest one
- Tag every cardiovascular card with cardiology and move them to my MCAT deck
How to install anki-mcp
Platform CLI
claude mcp add anki-mcp -- npx -y @arielbk/anki-mcpPlatform CLI
codex mcp add anki-mcp -- npx -y @arielbk/anki-mcpConfig file
{
"mcpServers": {
"anki-mcp": {
"command": "npx",
"args": [
"-y",
"@arielbk/anki-mcp"
]
}
}
}Config file
{
"servers": {
"anki-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@arielbk/anki-mcp"
]
}
}
}Platform CLI
gemini mcp add anki-mcp npx -y @arielbk/anki-mcpStep 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 anki-mcp
How do I install anki-mcp in Claude Code?
Run claude mcp add anki-mcp -- npx -y @arielbk/anki-mcp.
What does anki-mcp do?
It gives an assistant access to your Anki collection through AnkiConnect: searching and editing cards, running quizzes, analytics, and bulk tag or deck changes.
What do I need before running anki-mcp?
Anki installed with the AnkiConnect add-on (code 2055492159), and the app running. AnkiConnect 25.2.25.0 or newer covers every feature.