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.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@anki-mcpshow me the due cards in my Spanish deck"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
This server cannot be deployed
Maintenance
Related MCP Connectors
- FlipnemOAuthcom.flipnem
Build and study spaced-repetition flashcards with your agent.
Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.
Free: turn your AI chats into spaced-repetition vocabulary. 13 tools, reads and writes.
Read, write, and conversationally review open-source flashcards through split read/write MCP tools.
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.10 npm-
- AlicenseNot gradedqualityCmaintenanceEnables 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.4 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