Anki MCP Server
アンキ-MCP
Anki用のMCPサーバー。このサーバーは、Model Context Protocol(MCP)を介してAnkiとのやり取りを可能にします。これにより、ユーザーはフラッシュカード、デッキ、復習プロセスをプログラムで管理できます。
前提条件
Node.js と npm がインストールされています。
AnkiConnect プラグインが Anki にインストールされ、実行されています。
Related MCP server: Anki MCP Server
セットアップと実行
Anki Connectはローカルでのみ動作するため、ローカルで実行することを強くお勧めします。
ローカルで実行するには:
リポジトリをクローンします。
git clone https://github.com/nietus/anki-mcp依存関係をインストールします:
npm installプロジェクトをビルドします。package.json
package.jsonのprepareスクリプトは、インストール時に自動的にビルドを実行します。手動でビルドする必要がある場合は、以下の手順に従ってください。npm run buildこのコマンドは TypeScript コードをコンパイルし、クライアント スクリプトを実行可能にします。
Windowsのカーソル設定と統合
"anki": { "command": "cmd", "args": [ "/c", "node", "c:/Users/-/Downloads/anki-mcp/build/client.js" ] }
利用可能なツール
ツールをデバッグするには、
npm run inspectorサーバーは、Anki と対話するための次のツールを提供します。
update_cards:説明: ユーザーがクイズのカードに回答した後、このツールを使用して回答済みとしてマークし、難易度を更新します。
入力: それぞれ
cardId(数値) とease(数値、1 ~ 4) を持つ回答の配列。
add_card:説明: Ankiで新しいフラッシュカードを作成します。注記の内容はHTMLを使用します。
改行:
<br>コード:
<pre style="background-color: transparent; padding: 10px; border-radius: 5px;">リスト:
<ol>と<li>太字:
<strong>斜体:
<em>
入力:
fields: (オブジェクト) キーがフィールド名 (例: "Hanzi"、"Pinyin") で、値が HTML コンテンツであるオブジェクト。modelName: (文字列) 使用する Anki ノートタイプ (モデル) の名前。deckName: (オプションの文字列) カードを追加するデッキの名前。デフォルトは現在のデッキまたは「Default」です。tags: (オプションの文字列配列) メモに追加するタグのリスト。
get_due_cards:説明: レビューが必要なカードの指定数を返します。
入力:
num(数値)。
get_new_cards:説明: 指定された数の新しい未表示のカードを返します。
入力:
num(数値)。
get-deck-names:説明: すべての Anki デッキ名のリストを取得します。
入力: なし。
find-cards:説明: Ankiの検索クエリを使用してカードを検索します。フィールドを含む詳細なカード情報を返します。
入力:
query(文字列、例:'deck:Default -tag:test'、または'"deck:My Deck" tag:important')。空のフィールドをフィルタリングするには、'-FieldName:_*'(例:'-Hanzi:_*')を使用します。
update-note-fields:説明: 指定された Anki ノートの特定のフィールドを更新します。
入力:
noteId(数値)、fields(オブジェクト、例:{"Front": "New Q", "Back": "New A"})。
create_deck:説明: 新しい Anki デッキを作成します。
入力:
deckName(文字列)。
bulk_update_notes:説明: 複数の Anki ノートの特定のフィールドを更新します。
入力:
notesの配列。各ノートにはnoteId(数値) とfields(オブジェクト) があります。
get_model_names:説明: 使用可能なすべての Anki ノート タイプ/モデル名を一覧表示します。
入力: なし。
get_model_details:説明: 指定されたメモ タイプのフィールド、カード テンプレート、および CSS スタイルを取得します。
入力:
modelName(文字列)。
get_deck_model_info:説明: 指定されたデッキ内で使用されているノートタイプ(モデル)に関する情報を取得します。使用されているモデルが1つだけか複数か、あるいはデッキが空か存在しないかを判断するのに役立ちます。
入力:
deckName(文字列)。出力:
deckName、status(例: "single_model_found"、"multiple_models_found"、"no_notes_found"、"deck_not_found")、および条件付きでmodelName(文字列) またはmodelNames(文字列の配列) を持つオブジェクト。
add_note_type_field:説明: メモ タイプに新しいフィールドを追加します。
入力:
modelName(文字列)、fieldName(文字列)。
remove_note_type_field:説明: ノート タイプから既存のフィールドを削除します。
入力:
modelName(文字列)、fieldName(文字列)。
rename_note_type_field:説明: ノート タイプのフィールドの名前を変更します。
入力:
modelName(文字列)、oldFieldName(文字列)、newFieldName(文字列)。
reposition_note_type_field:説明: ノート タイプ内のフィールドの順序 (インデックス) を変更します。
入力:
modelName(文字列)、fieldName(文字列)、index(数値)。
update_note_type_templates:説明: ノート タイプのカードの HTML テンプレート (前面と背面など) を更新します。
入力:
modelName(文字列)、templates(オブジェクト、例:{"Card 1": {"Front": "html", "Back": "html"}})。
update_note_type_styling:説明: ノートタイプの CSS スタイルを更新します。
入力:
modelName(文字列)、css(文字列)。
create_model:説明: 新しい Anki ノート タイプ (モデル) を作成します。
入力:
modelName(文字列)、fieldNames(文字列の配列)、cardTemplates(オブジェクトの配列、それぞれName、Front、BackHTML 文字列を持つ)、css(オプションの文字列)、isCloze(オプションのブール値、デフォルトは false)、modelType(オプションの文字列、デフォルトは 'Standard')。
add_bulk:説明: 複数のフラッシュカードを1回の操作でAnkiに追加します。ノートの内容はHTMLを使用します。このツールは、複数のノート(カード)を一度に追加するためのものです。
入力:
notesの配列。各ノート オブジェクトには次の内容が含まれます。fields: (オブジェクト) キーがフィールド名で、値が HTML コンテンツであるオブジェクト。modelName: (文字列) このノートに使用する Anki ノート タイプ (モデル) の名前。deckName: (オプションの文字列) このノートのデッキ名。デフォルトは「Default」です。tags: (オプションの文字列配列) このメモのタグのリスト。
詳細については、Anki 統合 | Smithery をご覧ください。
Available Tools
3 toolsanki_add_noteC
Add a flashcard to an Anki deck
| Name | Required | Description | Default |
|---|---|---|---|
| back | Yes | Back of the flashcard | |
| deckName | Yes | The target deck name | |
| front | Yes | Front of the flashcard |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('Add') which implies a write/mutation operation, but doesn't disclose any behavioral traits like whether it requires specific permissions, what happens if the deck doesn't exist, error conditions, or how the system responds to successful addition. The description is minimal and lacks operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with a single, clear sentence that communicates the core purpose without any wasted words. It's appropriately sized for a straightforward tool and gets directly to the point with no unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what happens after adding the flashcard, potential error conditions, or how to verify success. Given the tool's complexity as a write operation and the lack of structured behavioral information, more context about the operation's behavior and outcomes would be valuable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no parameter information beyond what's already in the schema, which has 100% coverage with clear descriptions for all three parameters. The baseline score of 3 reflects adequate schema documentation, but the description doesn't provide additional context about parameter relationships, constraints, or usage patterns.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Add') and resource ('flashcard to an Anki deck'), making the purpose immediately understandable. It distinguishes from sibling 'anki_add_notes' by specifying singular 'flashcard' vs. plural 'notes', but doesn't explicitly differentiate from 'anki_create_deck' which creates decks rather than flashcards.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose this over 'anki_add_notes' (for single vs. multiple cards) or 'anki_create_deck' (for creating decks before adding cards). No prerequisites or contextual usage information is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
anki_add_notesC
Add multiple flashcards to an Anki deck
| Name | Required | Description | Default |
|---|---|---|---|
| cards | Yes | ||
| deckName | Yes | The target deck name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Add multiple flashcards') but doesn't cover critical aspects like whether this is a write operation (implied but not confirmed), error handling (e.g., if the deck doesn't exist), or response format. This leaves significant gaps for an agent to understand the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence that efficiently conveys the core purpose without unnecessary words. It's front-loaded and appropriately sized for the tool's complexity, with no wasted information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations, no output schema, and incomplete parameter documentation (50% coverage), the description is insufficient. It doesn't address key contextual elements like mutation effects, error scenarios, or return values, making it inadequate for safe and effective tool invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description mentions 'multiple flashcards' and 'Anki deck', which loosely maps to the 'cards' array and 'deckName' parameters. However, with 50% schema description coverage (only 'deckName' has a description), the description doesn't add meaningful details about parameter formats, constraints, or the structure of card objects (front/back fields). It partially compensates but not fully.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Add multiple flashcards') and resource ('to an Anki deck'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from the sibling tool 'anki_add_note' (singular vs. plural), which could cause confusion about when to use each.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'anki_add_note' (for single cards) or 'anki_create_deck' (for deck creation). There's no mention of prerequisites, such as whether the deck must already exist, or any contextual limitations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
anki_create_deckC
Create a new Anki deck
| Name | Required | Description | Default |
|---|---|---|---|
| deckName | Yes | The name of the deck to create |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits such as error handling (e.g., what happens if the deck already exists), permission requirements, side effects, or response format, which are critical for a creation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, direct sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core purpose without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a creation tool with no annotations and no output schema, the description is insufficient. It lacks details on behavior, error cases, and output, leaving gaps that could hinder an agent's ability to use the tool effectively in complex scenarios.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with the parameter 'deckName' clearly documented in the schema. The description doesn't add any meaning beyond the schema, such as naming conventions or constraints, but the schema provides adequate baseline information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Create') and resource ('new Anki deck'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'anki_add_note' or 'anki_add_notes', which are about adding content rather than creating deck structure.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., whether the deck must not already exist), constraints, or relationships to sibling tools, leaving the agent to infer usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.0.0- First observed
anki_add_note - First observed
anki_add_notes - First observed
anki_create_deck
TDQS
Scored across 3 tools
The tools have overlapping purposes, as 'anki_add_note' and 'anki_add_notes' both handle adding flashcards, which could cause confusion for an agent deciding between single vs. batch operations. However, the descriptions clarify the distinction (single vs. multiple), mitigating some ambiguity. The 'anki_create_deck' tool is clearly distinct, focusing on deck management rather than note addition.
All tool names follow a consistent 'anki_' prefix and snake_case pattern (e.g., anki_add_note, anki_add_notes, anki_create_deck), with clear verb_noun structures. This predictability makes it easy for agents to understand and navigate the tool set without confusion from mixed conventions.
With only 3 tools, the server feels thin for managing Anki flashcards, a domain that typically involves operations like updating, deleting, reviewing, or searching notes and decks. The count is too low for the apparent scope, lacking essential CRUD lifecycle coverage beyond basic creation, which may limit agent functionality.
The tool set is severely incomplete for Anki management, covering only note addition and deck creation. Obvious gaps include updating or deleting notes/decks, listing or searching existing content, and handling reviews or scheduling—core aspects of flashcard workflows. This will likely cause agent failures when trying to perform common tasks beyond initial setup.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Model Context Protocol server for Studex tools, notifications, and profile integrations
Related MCP Servers
- AlicenseAqualityDmaintenanceA server implementation that connects to a locally running Anki, enabling card review and creation through the Model Context Protocol.4184MIT
- AlicenseAqualityAmaintenanceA Model Context Protocol server that enables LLMs to interact with Anki flashcard software through AnkiConnect, allowing for creation and management of flashcards, decks, and note types.16243 npm253MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that allows LLMs to interact with Anki flashcard software, enabling functions like creating decks, adding notes, searching cards, and managing flashcard content through natural language.243 npm1MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables interaction with Anki flashcards through AnkiConnect, providing organized tools for managing decks, notes, cards, models, and media files.407MIT