Anki MCP Server
Anki MCP 服务器
连接到本地运行的 Anki 的 MCP 服务器实现,提供卡片审查和创建。
该服务器设计用于与Anki 桌面应用程序和Anki-Connect插件配合使用。
使用前请确保已安装该附加组件。
资源
anki://search/deckcurrent
返回当前牌组中的所有牌
相当于 Anki 中的
deck:current
anki://search/isdue
返回等待学习的复习卡片
Anki 中的
is:due对应词
anki://search/isnew
返回所有未见过的卡
Anki 中
is:new的对应词
Related MCP server: Anki MCP Server
工具
更新卡片
将具有给定卡片 ID 的卡片标记为已回答,并给出 1(再次)至 4(简单)之间的难度分数
输入:
answers(数组):具有cardId(数字)和ease(数字)字段的对象数组
添加卡
在默认 Anki 卡组中创建新卡片
输入:
front(字符串):卡片正面back(字符串):卡片背面
获取到期卡
返回当前需要审核的卡片数量
输入:
num(数字):卡片数量
获取新卡
返回新卡片中的 n 个卡片
输入:
num(数字):卡片数量
发展
安装依赖项:
npm install构建服务器:
npm run build对于使用自动重建的开发:
npm run watch配置
要与 Claude Desktop 一起使用,请添加服务器配置:
在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"anki-mcp-server": {
"command": "/path/to/anki-mcp-server/build/index.js"
}
}
}调试
由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们推荐使用MCP Inspector ,它以包脚本的形式提供:
npm run inspector检查器将提供一个 URL 来访问浏览器中的调试工具。
Available Tools
4 toolsadd_cardA
Create a new flashcard in Anki for the user. Must use HTML formatting only. IMPORTANT FORMATTING RULES:
Must use HTML tags for ALL formatting - NO markdown
Use for ALL line breaks
For code blocks, use with inline CSS styling
Example formatting:
Line breaks:
Code:
Lists: and tags
Bold:
Italic:
Inputs: front (required), back (required).
get_due_cardsB
Returns a given number (num) of cards due for review.
Inputs: num (required).
get_new_cardsB
Returns a given number (num) of new and unseen cards.
Inputs: num (required).
update_cardsA
After the user answers cards you've quizzed them on, use this tool to mark them answered and update their ease
Inputs: answers.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose with no overlap: add_card creates new flashcards, get_due_cards retrieves cards due for review, get_new_cards fetches unseen cards, and update_cards marks answered cards and updates their ease. The four tools cover different stages of the flashcard lifecycle without any ambiguity.
All tool names follow a consistent verb_noun pattern (add_card, get_due_cards, get_new_cards, update_cards) using snake_case throughout. The naming is predictable and readable, with clear action-object relationships that align with their functions.
With 4 tools, this server is well-scoped for its purpose of managing Anki flashcards. Each tool earns its place by covering essential operations: creation, retrieval of due/new cards, and updating after reviews. The count is neither too sparse nor bloated for the domain.
The tool set provides strong coverage of core flashcard workflows: creating cards, retrieving cards for review, and updating them after answers. A minor gap is the lack of tools for deleting or editing existing cards, but agents can still function effectively with the provided operations.
Maintenance
Related MCP Connectors
Remote MCP server for saving, searching, syncing, and managing Teak cards.
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseAqualityBmaintenanceA Model Context Protocol server that enables LLMs to interact with Anki flashcard software through AnkiConnect, allowing for creation and management of flashcards, decks, and note types.16446 npm254MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that allows LLMs to interact with Anki flashcard software, enabling functions like creating decks, adding notes, searching cards, and managing flashcard content through natural language.1MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables interaction with Anki flashcards through AnkiConnect, providing organized tools for managing decks, notes, cards, models, and media files.407MIT
- AlicenseCqualityBmaintenanceServer that enables programmatic interaction with Anki through the Model Context Protocol, allowing users to manage flashcards, decks, and review processes.344MIT