Anki MCP

io.github.Ryhus由 GitHub 账号 Ryhus 发布v0.1.1更新于 Nov 7, 2026

Manage local Anki notes, cards, decks, note types, media, and deck packages via AnkiConnect.

已验证STDIO仅桌面效率与工作流文件与存储

概览

AI 生成的概览

通过本地 AnkiConnect 插件,让助手搜索、创建和编辑 Anki 笔记与卡片、管理牌组,并处理媒体和 .apkg 牌组包。

可以做什么
  • 搜索、创建和编辑笔记,可在创建前先展示草稿
  • 管理牌组、卡片和笔记类型
  • 查看卡片正面与背面的 HTML 和 CSS,不做修改
  • 预览牌组导出,可选择不含复习记录
  • 从白名单本地文件夹导入和导出 .apkg 牌组包
  • 从本地文件夹、公开 HTTPS 链接或 base64 来源添加媒体
适用场景
适合用 Anki Desktop 学习、并希望助手按标签或文字查找笔记、起草待审阅的新卡片、查看卡片模板,或以牌组包形式导入导出牌组的场景。
运行要求
通过 npx 在本地运行,客户端 PATH 中需有 Node.js 24 或更新版本及 npm。Anki Desktop 必须保持打开并安装 AnkiConnect 插件。必须设置 ANKI_URL,指向本地 AnkiConnect 基础地址且不带 /api/v1。可选设置:ANKI_API_MODE(v1 或 legacy)、ANKI_MEDIA_IMPORT_DIRS、ANKI_PACKAGE_IMPORT_DIR、ANKI_PACKAGE_EXPORT_DIR、ANKI_REQUEST_TIMEOUT_MS。客户端需支持启动 stdio MCP 服务器。
安装前请注意
工具可创建、编辑和删除笔记、卡片与牌组;批准破坏性操作前请先查看预览,且并非所有工具都提供预览。服务器不做备份,也不会自动重试写入,出错后应先检查 Anki 再重复操作。牌组包与媒体导入目录必须是已存在的可信绝对路径,因为这会授予文件访问权限。使用 @latest 会在启动时拉取当前版本。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Anki MCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Anki MCP

Use Anki Desktop from your AI chat app. Search, create, and edit notes; manage decks and cards; preview card HTML/CSS; and work with media and .apkg deck packages.

Your MCP client is the app you chat with, not Anki Desktop. It needs to support launching local MCP servers (also called stdio servers). It starts Anki MCP so your assistant can use the Anki tools.

Quick start

  1. Install Node.js 24 or newer with npm.
  2. In Anki Desktop, install AnkiConnect via Tools → Add-ons → Get Add-ons with code 2055492159. Restart Anki and keep it open.
  3. Add the server configuration below in your MCP client's settings. No clone or global install is needed.
json
{  "mcpServers": {    "anki": {      "command": "npx",      "args": ["--yes", "--prefer-online", "--package=@ryhus/anki-mcp@latest", "anki-mcp"],      "env": {        "ANKI_URL": "http://127.0.0.1:8765",        "ANKI_API_MODE": "v1"      }    }  }}

If your client has a form, put only npx in Command, enter the four Arguments separately, and add the two Environment variables shown above. ANKI_URL is the AnkiConnect address, not a remote MCP URL.

Reload the client and ask: “List my Anki decks without changing anything.”

@latest checks for the current release when the server starts; it does not update a running server. To control updates yourself, replace @latest with an exact published version, for example @0.1.0.

Try it

  • “Find German notes tagged a1 that mention Haus.”
  • “Draft three vocabulary notes for my German deck. Show me the drafts before creating them.”
  • “Show me the front and back HTML of this card without changing it.”
  • “Preview an export of my German deck without review history.”

Settings

  • ANKI_API_MODE=v1 enables the full tool set with a compatible AnkiConnect build. For an older add-on, use legacy for the supported subset.
  • To enable local .apkg import or export, set ANKI_PACKAGE_IMPORT_DIR or ANKI_PACKAGE_EXPORT_DIR to an existing, trusted absolute folder. Each is enabled separately and requires local AnkiConnect v1.
  • To import media from disk, allowlist its source folder with ANKI_MEDIA_IMPORT_DIRS. Public HTTPS and base64 sources do not need this setting.

Review previews before approving destructive changes. Not every tool offers a preview. The server does not make backups or automatically retry writes; after an error, check Anki before repeating the action.

Troubleshooting

  • The client cannot find npx: make sure both Node and npm are on the client's PATH. On Windows, use npx.cmd if your client needs the shim.
  • Anki is unreachable: check that Anki is open and AnkiConnect is enabled. Use the base address in ANKI_URL without /api/v1.
  • The package is not found: check that the requested version has been published and that your client can reach the npm registry.

MIT License.

来源:README.md,提交 d79093b

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.1最新Nov 7, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分