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 "Install 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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/luiz-santos-it/anki-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server