
scorzeth/anki-mcp-server 是从 https://github.com/scorzeth/anki-mcp-server. 导入的 MCP 服务器候选。
概览
scorzeth/anki-mcp-server 是从 https://github.com/scorzeth/anki-mcp-server. 导入的 MCP 服务器候选。
概述(AI 翻译)
一个连接本地运行的 Anki 的 MCP 服务器实现,提供卡片审查和创建功能。
该服务器设计用于配合 Anki 桌面应用和 Anki-Connect 插件使用。
使用前一定要确保你已经安装了这个插件。
资源
- anki://search/deckcurrent
- 返回当前牌组中的所有牌
- 相当于 Anki 中的
deck:current - anki://search/isdue
- 正在复习和学习的返还牌,等待学习
- 相当于 Anki 中的
is:due - anki://search/isnew
- 返回所有未见过的牌
- 相当于 Anki 中的
is:new
工具
-
update_cards
-
标记给出的牌牌编号为答案,并给出1(再次)至4(简单)之间的易度分数
-
输入:
-
answers(数组):具有cardId(数字)和ease(数字)字段的对象数组 -
add_card
-
在默认Anki卡组中创建一张新卡片
-
输入:
-
front(弦):牌面 -
back(字符串):卡牌背面 -
get_due_cards
-
退回 n 张当前待审的牌数
-
输入:
-
num(数字):牌数 -
get_new_cards
-
从新牌返回n张牌
-
输入:
-
num(数字):牌数
本页由 AI 翻译,技术细节请以原文为准。
README
Anki MCP Server
An MCP server implementation that connects to a locally running Anki, providing card review and creation.
This server is designed to work with the Anki desktop app and the Anki-Connect add-on.
Make sure you have the add-on installed before using.
Resources
- anki://search/deckcurrent
- Returns all cards from current deck
- Equivalent of
deck:currentin Anki
- anki://search/isdue
- Returns cards in review and learning waiting to be studied
- Equivalent of
is:duein Anki
- anki://search/isnew
- Returns all unseen cards
- Equivalent of
is:newin Anki
Tools
-
update_cards
- Marks cards with given card IDs as answered and gives them an ease score between 1 (Again) and 4 (Easy)
- Inputs:
answers(array): Array of objects withcardId(number) andease(number) fields
-
add_card
- Creates a new card in the Default Anki deck
- Inputs:
front(string): Front of cardback(string): Back of card
-
get_due_cards
- Returns n number of cards currently due for review
- Inputs:
num(number): Number of cards
-
get_new_cards
- Returns n number of cards from new
- Inputs:
num(number): Number of cards
Development
Install dependencies:
npm install
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
Configuration
To use with Claude Desktop, add the server config:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"anki-mcp-server": {
"command": "/path/to/anki-mcp-server/build/index.js"
}
}
}
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"anki-mcp-server": {
"command": "/path/to/anki-mcp-server/build/index.js"
}
}
}