Clanki
Clanki - Claude 的 Anki 集成
MCP 服务器使 Claude 等 AI 助手能够通过模型上下文协议 (MCP) 与 Anki 抽认卡组进行交互。
特征
创建和管理 Anki 卡组
创建包含正面/背面内容的基本抽认卡
创建完形填空卡
更新现有卡片并完成填空
添加和管理标签
查看卡组内容和卡牌信息
与 AnkiConnect 完全集成
Related MCP server: Anki MCP Server
先决条件
Anki安装并运行
在 Anki 中安装AnkiConnect插件
Node.js 16 或更高版本
安装
克隆此存储库:
git clone https://github.com/yourusername/clanki.git
cd clanki安装依赖项:
npm install构建项目:
npm run build设置
确保 Anki 正在运行并且 AnkiConnect 插件已安装并启用
通过编辑
claude_desktop_config.json配置 Claude for Desktop 以使用服务器:
{
"mcpServers": {
"clanki": {
"command": "node",
"args": ["/absolute/path/to/clanki/build/index.js"]
}
}
}将/absolute/path/to/clanki替换为 clanki 安装的实际路径。
可用工具
创建甲板
创建一个新的 Anki 卡组
参数:
name:新卡组的名称
创建卡片
在指定的卡组中创建新的基本抽认卡
参数:
deckName:要添加卡片的牌组的名称front:卡片正面的内容back:卡片背面的内容tags:(可选)卡片的标签数组
创建完形填空卡片
在指定的牌组中创建新的完形填空删除卡
参数:
deckName:要添加卡片的牌组的名称text:使用 {{c1::text}} 语法包含完形填空的文本backExtra:(可选)卡片背面显示的额外信息tags:(可选)卡片的标签数组
更新卡
更新现有的基本抽认卡
参数:
noteId:要更新的注释的 IDfront:(可选)新的正面内容back:(可选)新的背面内容tags:(可选)卡片的新标签
更新完形填空卡片
更新现有的完形填空删除卡
参数:
noteId:要更新的注释的 IDtext:(可选)带有完形填空删除的新文本backExtra:(可选)背面的新附加信息tags:(可选)卡片的新标签
发展
要修改或扩展服务器:
修改
src/index.ts使用
npm run build重建使用
npx @modelcontextprotocol/inspector node build/index.js进行调试
Available Tools
9 toolscreate-cardB
Create a new note in a specified deck. Supports HTML formatting in text fields. You can attach multiple images and audio files from URLs - they will be automatically downloaded and embedded in the note.
Inputs: back (required), front (required), deckName (required), tags, +4 more.
create-cards-bulkA
Create multiple basic notes in a single call. Use this instead of calling create-card repeatedly — it sends one request to Anki regardless of how many notes are in the batch. Does not support images or audio: use create-card for notes that need media.
Inputs: cards (required), deckName (required).
create-cloze-cardB
Create a new cloze note in a specified deck. Use {{c1::text}} syntax for cloze deletions (e.g., {{c1::Paris}} is the capital of France). Supports HTML formatting and can attach multiple images and audio files from URLs - they will be automatically downloaded and embedded.
Inputs: text (required), deckName (required), tags, backAudio, +4 more.
create-cloze-cards-bulkA
Create multiple cloze notes in a single call. Use this instead of calling create-cloze-card repeatedly — it sends one request to Anki regardless of how many notes are in the batch. Does not support images or audio: use create-cloze-card for notes that need media.
Inputs: cards (required), deckName (required).
create-deckA
Create a new Anki deck
Inputs: name (required).
delete-cardA
PERMANENTLY deletes notes. This cannot be undone and there is no trash to recover them from — the notes and every card generated from them are gone. Only delete notes the user has asked you to delete. Use find-cards first to obtain the note IDs and to confirm you have the right notes; there is no delete-by-query, and IDs must be listed explicitly. Deleting one cloze note removes every card generated from it.
Inputs: confirm (required), noteIds (required).
find-cardsA
Search for notes using Anki's search syntax and return their note IDs, note type, tags, and a short excerpt of each field. Use this to get the noteId needed by update-card, update-cloze-card or delete-card. Field content is truncated and the number of results is capped, so narrow the query if the note you want is not listed. Examples: 'deck:Spanish', 'tag:vocab', 'front:hello', 'deck:Spanish tag:verbs'.
Inputs: query (required).
update-cardC
Update an existing note
Inputs: noteId (required), back, tags, front.
update-cloze-cardC
Update an existing cloze note
Inputs: noteId (required), tags, text, backExtra.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct action and note type: deck creation, card creation/update for basic and cloze types, bulk variants, search, and deletion. The bulk tools are explicitly separated from single-card tools, and find-cards is clearly the retrieval path. No two tools appear to do the same thing.
All tool names follow a consistent hyphenated lowercase verb-noun pattern: create-deck, create-card, update-card, create-cloze-card, update-cloze-card, create-cards-bulk, create-cloze-cards-bulk, find-cards, delete-card. The pattern is uniform and predictable.
With 9 tools, the server is well-scoped for Anki card management. It covers core lifecycle operations (create, update, find, delete) with separate handling for basic vs. cloze notes and bulk operations, without excessive redundancy.
The card lifecycle is well covered: create (single/bulk, basic/cloze), update, find, delete. Deck management is limited to creation only, with no update or delete deck tools, but this is a minor gap since decks are simple containers and find-cards can search by deck name.
Maintenance
Related MCP Connectors
Cloud-hosted MCP server for durable AI memory
MCP server for AI dialogue using various LLM models via AceDataCloud
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
An MCP server that integrates with Discord to provide AI-powered features.
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP server that integrates Claude with Anki flashcards, allowing users to review due cards and create new flashcards directly through conversation.1422 PyPI13MIT
- AlicenseNot gradedqualityAmaintenanceAn MCP server that enables AI assistants to interact with the Anki flashcard application for studying, deck management, and note creation. It supports natural language interaction for reviewing cards, searching content, and managing media files across local and remote environments.993 npm582MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants to seamlessly manage Anki flashcards, decks, and templates through the AnkiConnect API. It supports intelligent querying, batch note creation, and detailed study progress analysis using natural language.4MIT
- FlicenseAqualityDmaintenanceAn MCP server that enables Claude Code to create, manage, and search Anki flashcards directly from the terminal. It supports batch card creation, deck statistics retrieval, and synchronization with AnkiWeb for cross-platform review.8-