Skip to main content
Glama

Anki MCP サーバー

ローカルで実行されている Anki に接続し、カードのレビューと作成を提供する MCP サーバー実装。

このサーバーは、Anki デスクトップ アプリおよびAnki-Connectアドオンで動作するように設計されています。

使用する前にアドオンがインストールされていることを確認してください。

リソース

  • アンキ://search/deckcurrent

    • 現在のデッキからすべてのカードを返します

    • Ankiのdeck:currentに相当するもの

  • アンキ://search/isdue

    • 復習と学習を待っているカードを返します

    • Ankiのis:dueに相当するもの

  • アンキ://search/isnew

    • 未表示のカードをすべて返す

    • Ankiのis:newに相当するもの

Related MCP server: Anki MCP Server

ツール

  • アップデートカード

    • 指定されたカード ID のカードを回答済みとしてマークし、1 (再回答) から 4 (簡単) までの容易さスコアを付与します。

    • 入力:

      • answers (配列): cardId (数値)とease (数値)フィールドを持つオブジェクトの配列

  • カードを追加

    • デフォルトの Anki デッキに新しいカードを作成します

    • 入力:

      • front (文字列): カードの表面

      • back (文字列): カードの裏面

  • 期限切れカードを取得する

    • 現在レビューが必要なカードのn枚数を返します

    • 入力:

      • num (数字): カードの枚数

  • 新しいカードを取得する

    • 新しいカードからn枚のカードを返す

    • 入力:

      • 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サーバーはstdio経由で通信するため、デバッグが困難になる場合があります。パッケージスクリプトとして提供されているMCP Inspectorの使用をお勧めします。

npm run inspector

インスペクターは、ブラウザでデバッグ ツールにアクセスするための URL を提供します。

Available Tools

4 tools
add_cardA

Create a new flashcard in Anki for the user. Must use HTML formatting only. IMPORTANT FORMATTING RULES:

  1. Must use HTML tags for ALL formatting - NO markdown

  2. Use for ALL line breaks

  3. For code blocks, use with inline CSS styling

  4. Example formatting:

    • Line breaks:

    • Code:

    • Lists: and tags

    • Bold:

    • Italic:

Inputs: front (required), back (required).

get_due_cardsB

Returns a given number (num) of cards due for review.

Inputs: num (required).

get_new_cardsB

Returns a given number (num) of new and unseen cards.

Inputs: num (required).

update_cardsA

After the user answers cards you've quizzed them on, use this tool to mark them answered and update their ease

Inputs: answers.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: add_card creates new flashcards, get_due_cards retrieves cards due for review, get_new_cards fetches unseen cards, and update_cards marks answered cards and updates their ease. The four tools cover different stages of the flashcard lifecycle without any ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (add_card, get_due_cards, get_new_cards, update_cards) using snake_case throughout. The naming is predictable and readable, with clear action-object relationships that align with their functions.

    Tool Count5/5

    With 4 tools, this server is well-scoped for its purpose of managing Anki flashcards. Each tool earns its place by covering essential operations: creation, retrieval of due/new cards, and updating after reviews. The count is neither too sparse nor bloated for the domain.

    Completeness4/5

    The tool set provides strong coverage of core flashcard workflows: creating cards, retrieving cards for review, and updating them after answers. A minor gap is the lack of tools for deleting or editing existing cards, but agents can still function effectively with the provided operations.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    Appeared in Searches