这是一个连接到本地运行的Anki的MCP服务器实现,提供卡片复习和创建功能。
此服务器旨在与Anki桌面应用和Anki-Connect插件一起使用。
在使用前,请确保已安装该插件。
deck:currentis:dueis:newupdate_cards
answers (数组):包含cardId (数字) 和 ease (数字) 字段的对象数组add_card
front (字符串):卡片正面back (字符串):卡片背面get_due_cards
num (数字):卡片数量get_new_cards
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服务器通过标准I/O进行通信,调试可能会比较困难。我们推荐使用MCP Inspector,它作为一个包脚本可用:
npm run inspector
Inspector将提供一个URL,以便您可以在浏览器中访问调试工具。