anki-mcp
Provides tools for interacting with Anki, including creating/searching/updating notes, managing decks, reviewing due cards, submitting answers, rescheduling/suspending/forgetting cards, and retrieving retention statistics.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
anki-mcp
MCP server that exposes Anki as tools for Claude and other LLM clients. Powered by AnkiConnect.
Create notes, search your collection, review due cards, manage decks, track retention — all from your LLM client.
Prerequisites
Anki must be running on the local machine.
AnkiConnect add-on must be installed: Anki → Tools → Add-ons → Get Add-ons → code
2055492159.Default port:
8765. Do not change it.
Node.js 18+.
Related MCP server: Anki MCP Server
Quick start
npm install
npm run build # tsc → dist/
npm start # stdio transportDevelopment (no build step):
npm run dev # tsx src/index.tsClaude Desktop integration
Add to claude_desktop_config.json:
{
"mcpServers": {
"anki": {
"command": "node",
"args": ["/absolute/path/to/anki_mcp/dist/index.js"]
}
}
}Available tools
Tool | Description |
| Create Basic or Cloze notes. Supports batch. |
| Search with Anki browser syntax. Returns up to |
| Edit note fields in place by note ID. Preserves all card scheduling data. |
| Add tags to notes by note ID. Supports |
| Remove tags from notes by note ID. |
| Delete notes by ID (also deletes associated cards). |
| Move notes to another deck (resolves note IDs → card IDs internally). |
| Create deck or subdeck ( |
| List all decks with due/new/learn counts. |
| Get cards due for review in a deck (default limit 20, max 100). Returns |
| Record answer for a card: 1=Again, 2=Hard, 3=Good, 4=Easy. |
| Postpone cards by N days. days=0 = due today. |
| Suspend (hide) or unsuspend cards. Never scheduled but not deleted. |
| Reset cards to new state. Wipes scheduling; preserves note content and tags. |
| Retention stats, overdue count, mature/young cards for a deck or all decks. |
| Trigger AnkiWeb sync. |
AnkiConnect conventions
ID types: Note IDs and card IDs are different namespaces. Never pass note IDs where card IDs are expected.
Deck names: Use
::for hierarchy. Double-quotes in deck names must be escaped (\").Search syntax: Anki browser syntax —
is:due,is:new,prop:due<0(overdue),deck:"Name",tag:foo,nid:123.Error handling: All AnkiConnect failures throw
AnkiConnectError(action, message). MCP SDK surfaces these to the client as tool errors.
Architecture
src/
ankiconnect.ts — HTTP client, branded ID types, AnkiConnectError
tools/
notes.ts — create / search / update / delete / move notes + tag management
decks.ts — create / list / delete decks
study.ts — get due cards / submit answer / reschedule / suspend / forget
insights.ts — retention stats
index.ts — McpServer wiring (registerTool), stdio transportPerformance notes
search_notes: always pass a narrow query + explicitlimitto avoid large payloads.get_insightson large collections callscardsInfoin 500-card chunks sequentially; expect ~1s per 500 cards.get_insightswithout a deck argument fans outcardReviewsto every deck — adds one request per deck.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Turn text, files, URLs, or photos into Anki flashcard decks from your AI assistant.
Build and study spaced-repetition flashcards with your agent.
Spaced-repetition flashcards in Markdown: create cards, manage decks and study with FSRS.
Lexpad is a vocabulary notebook with spaced repetition, in 81 languages. Connect it to ChatGPT or Claude and ask the assistant to save a word from your chat, show the words due today or quiz you. Each answer counts as practice and moves the word through its Leitner boxes. Sign-in is OAuth 2.1 with PKCE on a Lexpad page. 20 tools; the ones that overwrite or delete are marked, so the client asks first. Connecting is free. On Lexpad's Free plan the assistant writes 10 cards a day; on Pro it is unlimited, up to 1,000 a day. Guide and example prompts: https://lexpad.app/features/assistants
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Anki desktop flashcard app through the AnkiConnect plugin. Provides tools to manipulate notes and make arbitrary RPC requests to manage flashcards and decks.16 npm-
- AlicenseNot gradedqualityDmaintenanceEnables interaction with the Anki desktop flashcard application through the Anki-Connect plugin. Supports managing decks, cards, notes, and models, allowing AI assistants to create and query flashcards through natural language.10 npm1ISC
- AlicenseAqualityDmaintenanceEnables AI assistants to manage Anki flashcard collections by creating, searching, and updating cards through a standardized interface. It supports media handling, batch operations, and review scheduling via the AnkiConnect add-on.62MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to interact with Anki via AnkiConnect for creating, searching, and managing flashcards, decks, and note types.1MIT