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 分