NA

nailuogg/anki-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

252 stars 38 forks 质量 77 趋势 38

nailuogg/anki-mcp-server 是从 https://github.com/nailuogg/anki-mcp-server. 导入的 MCP 服务器候选

概览

nailuogg/anki-mcp-server 是从 https://github.com/nailuogg/anki-mcp-server. 导入的 MCP 服务器候选

概述(AI 翻译)

一个模型上下文协议(MCP)服务器,使LLM能够通过AnkiConnect与Anki抽认卡软件交互。

特色

工具

  • anki_check_connection - 检查 AnkiConnect 是否可访问
  • anki_list_decks - 列出所有可用的 Anki 卡组,可选带卡组 ID
  • anki_create_deck - 创建一个新的Anki卡组
  • anki_list_tags - 列出当前收藏中使用的所有标签
  • anki_add_note_tags - 为一个或多个音符添加标签
  • anki_remove_note_tags - 移除一个或多个音符的标签
  • anki_create_note - 创建一个新笔记
  • anki_batch_create_notes - 同时创建多个音符
  • anki_search_notes - 使用Anki查询语法搜索笔记
  • anki_get_note_info - 获取关于笔记的详细信息
  • anki_update_note - 更新现有笔记字段和/或标签
  • anki_delete_note - 删除一个或多个音符
  • anki_list_note_types - 列出所有可用的音符类型
  • anki_create_note_type - 创建新的音符类型
  • anki_get_note_type_info - 获取音符类型的详细结构
  • anki_sync - 触发 AnkiWeb 同步;需要 {"confirm": true},因为完全同步可以合并或覆盖本地和远程集合。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Anki MCP Server

A Model Context Protocol (MCP) server that enables LLMs to interact with Anki flashcard software through AnkiConnect.

Features

Tools

  • anki_check_connection - Check whether AnkiConnect is reachable
  • anki_list_decks - List all available Anki decks, optionally with deck IDs
  • anki_create_deck - Create a new Anki deck
  • anki_list_tags - List all tags currently used in the collection
  • anki_add_note_tags - Add tags to one or more notes
  • anki_remove_note_tags - Remove tags from one or more notes
  • anki_create_note - Create a new note
  • anki_batch_create_notes - Create multiple notes at once
  • anki_search_notes - Search for notes using Anki query syntax
  • anki_get_note_info - Get detailed information about a note
  • anki_update_note - Update an existing note’s fields and/or tags
  • anki_delete_note - Delete one or multiple notes
  • anki_list_note_types - List all available note types
  • anki_create_note_type - Create a new note type
  • anki_get_note_type_info - Get detailed structure of a note type
  • anki_sync - Trigger AnkiWeb sync; requires {"confirm": true} because a full sync can merge or overwrite local and remote collections. Success means Anki accepted the request, not that AnkiWeb received the data; a blocking dialog in Anki can silently keep the sync queued

Legacy unprefixed tool names such as create_note and list_decks remain callable for existing clients, but new agent integrations should use the anki_* names.

Resources

  • anki://decks/all - Complete list of available decks with deck IDs
  • anki://tags/all - Complete list of tags
  • anki://note-types/all - List of all available note types
  • anki://note-types/all-with-schemas - Detailed structure information for all note types
  • anki://note-types/{modelName} - Detailed structure information for a specific note type

Prerequisites

  1. Anki installed on your system
  2. AnkiConnect add-on installed in Anki
  3. Node.js 20.11 or newer

Configuration

Install via Desktop Extension (.mcpb)

This repository supports Anthropic Desktop Extensions (MCPB). The easiest way to use this server in Claude Desktop is by installing the packaged .mcpb bundle.

  1. Generate the .mcpb file locally using the provided script:
npm run mcpb
  1. Open Claude Desktop Settings → Extensions and drag the generated .mcpb file in, then click Install.

This validates manifest.json and outputs a .mcpb archive you can install as above. Learn more about Desktop Extensions in Anthropic’s announcement: Desktop Extensions: One-click MCP server installation for Claude Desktop.

Usage with Claude Desktop

Add the server to your claude_desktop_config.json:

{
  "mcpServers": {
    "anki": {
      "command": "npx",
在 GitHub 查看完整 README

安装

npx --yes anki-mcp-server
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "anki": { "command": "npx", "args": ["--yes", "anki-mcp-server"] } } }