Anki MCP Server
The Anki MCP Server enables programmatic interaction with Anki for managing flashcards, decks, and review processes. You can:
Add flashcards: Create single or bulk flashcards with HTML content and optional tags, specifying deck and note type
Update flashcards: Modify fields, mark cards as answered, or update their ease
Retrieve cards: Get due or new cards, search using raw Anki queries
Manage decks: Create new decks and get lists of available deck names
Manage note types: Create, modify or retrieve details of note types, including fields, templates, and CSS styling
Perform bulk operations: Add or update multiple cards/notes in a single operation
Debug: Use the inspector tool to troubleshoot server operations
Provides tools for managing Anki flashcards and decks, including creating and updating cards, managing note types, searching for cards, retrieving due and new cards, and handling card reviews programmatically through the AnkiConnect plugin.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Anki MCP Servercreate a flashcard for the capital of France"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
anki-mcp
MCP server for Anki. This server allows interaction with Anki through the Model Context Protocol (MCP). It enables users to manage flashcards, decks, and review processes programmatically.

Prerequisites
Node.js and npm installed.
AnkiConnect plugin installed and running in Anki.
For audio features: Azure API key (set in
.envfile asAZURE_API_KEY) and Anki Media Directory (set asANKI_MEDIA_DIR).
Related MCP server: Anki MCP Server
Setup and Execution
Highly recommended to run locally, since AnkiConnect only works locally.
Was only tested on windows.
Running locally via npx
If you only wish to use the tool and not develop the tool,
you may launch an MCP STDIO server locally using npx:
npx -y github:nietus/anki-mcpThis can be used in Desktop MCP clients such as Msty Studio or others.
Running locally via source code
Alternatively, you can run locally via source code using these instructions:
Clone the repository:
git clone https://github.com/nietus/anki-mcpInstall dependencies:
npm installBuild the project
npm run buildSetup for Audio Features (If you want to use audio tools):
Create a .env file in the root directory with your Azure API key and Anki media directory:
AZURE_API_KEY=your_azure_api_key_here ANKI_MEDIA_DIR=path/to/your/anki/media/directoryFor Anki media directory, use the path to your Anki collection.media folder. This is where audio files will be stored. If you have trouble, paste it directly into the code.
Windows example:
C:\Users\username\AppData\Roaming\Anki2\User 1\collection.mediamacOS example:
/Users/username/Library/Application Support/Anki2/User 1/collection.mediaLinux example:
/home/username/.local/share/Anki2/User 1/collection.media
Note: The ANKI_MEDIA_DIR is required for audio generation to work properly as Anki needs to find the audio files in its media collection.
Integrate with Cursor settings (for local execution):
To run your local build of anki-mcp with Cursor, you need to tell Cursor how to start the server. Below are example configurations which you can access on cursor settings. Replace YOUR_USERNAME and adjust the path if you cloned anki-mcp to a different location than Downloads.
Windows:
"anki": { "command": "cmd", "args": [ "/c", "node", "c:/Users/YOUR_USERNAME/Downloads/anki-mcp/build/client.js" ] }Integrate with Claude Desktop using an
.mcpbbundle:The recommended way to use this server with Claude Desktop is to install it as an MCP extension bundle (
.mcpbfile).Build and package the extension:
npm install npm run build npm run pack:mcpbThis will produce a file at
dist/anki-mcp.mcpb.Install the bundle in Claude Desktop:
Open Claude Desktop.
Go to Settings → Extensions.
Drag and drop the
dist/anki-mcp.mcpbfile into the Extensions panel.
Claude will handle launching the server automatically when needed.
Configure environment variables:
When prompted during installation, provide your
AZURE_API_KEYandANKI_MEDIA_DIR(the path to your Ankicollection.mediafolder). These are required for audio features and media file handling.
That’s it! No manual configuration is needed—Claude Desktop will manage the server for you once the
.mcpbbundle is installed. macOS / Linux:
"anki": {
"command": "bash",
"args": [
"-c",
"node /Users/YOUR_USERNAME/Downloads/anki-mcp/build/client.js"
]
}Create a Claude Desktop extension bundle (.mcpb)
If you want one-click installation inside Claude Desktop, you can package this server as an MCP bundle:
Install dependencies and build the project:
npm install npm run buildGenerate the
.mcpbbundle (requires the@anthropic-ai/mcpbCLI, which expects Node.js 18+):npm run pack:mcpb
The script stages the compiled server (build/), copies runtime dependencies, and produces dist/anki-mcp.mcpb. Drag that file into Claude Desktop's Settings → Extensions panel to install. When prompted, provide the Azure Speech API key and Anki media directory so audio tools can save files in your collection.media folder.
Available Tools
To debug the tools, use
npm run inspectorThe server provides the following tools for interacting with Anki:
update_cards:Description: After the user answers cards you've quizzed them on, use this tool to mark them answered and update their ease.
Input: An array of answers, each with
cardId(number) andease(number, 1-4).
add_card:Description: Create a NEW flashcard in Anki. Use ONLY for creating new cards, NOT for updating existing ones (will throw an error if the card already exists). For updating existing cards, use
update_note_fieldswith the noteId instead. Note content uses HTML.Line breaks:
<br>Code:
<pre style="background-color: transparent; padding: 10px; border-radius: 5px;">Lists:
<ol>and<li>Bold:
<strong>Italic:
<em>
Input:
fields: (object) An object where keys are field names (e.g., "Hanzi", "Pinyin") and values are their HTML content.modelName: (string) The name of the Anki note type (model) to use.deckName: (optional string) The name of the deck to add the card to. Defaults to the current deck or 'Default'.tags: (optional array of strings) A list of tags to add to the note.
add_card_with_audio:Description: Create a NEW flashcard in Anki with automatically generated audio from Azure TTS. Use ONLY for creating new cards, NOT for updating existing ones (will throw an error if the card already exists). For updating audio on existing cards, use
update_card_with_audiowith the noteId instead.Input:
fields,modelName,deckName,tags: Same asadd_card.sourceField: (string) Field name containing the text to generate audio from.audioField: (string) Field name where the generated audio will be stored.language: (optional string) Language code for TTS (e.g., 'en', 'es', 'fr'). Defaults to 'en'.
Supported languages: en, es, fr, de, it, ja, ko, pt, ru, zh, ar, nl, hi, tr, pl, sv, fi, da, no, cs, hu, el, he, th, vi, id, ms, ro.
update_card_with_audio:Description: Update an EXISTING card by generating audio from a specified field and adding it to an audio field. Use ONLY for cards that already exist (you must have the noteId). For creating new cards with audio, use
add_card_with_audioinstead.Input:
noteId: (number) The ID of the Anki note to update.sourceField: (string) Field name containing the text to generate audio from.audioField: (string) Field name where the generated audio will be stored.language: (optional string) Language code for TTS. Defaults to 'en'.
get_due_cards:Description: Returns a given number of cards due for review.
Input:
num(number).
get_new_cards:Description: Returns a given number of new and unseen cards.
Input:
num(number).
get_deck_names:Description: Get a list of all Anki deck names.
Input: None.
find_cards:Description: Find cards using a raw Anki search query. Returns detailed card information including fields.
Input:
query(string, e.g.,'deck:Default -tag:test', or'"deck:My Deck" tag:important'). To filter for empty fields, use'-FieldName:_*'(e.g.,'-Hanzi:_*').
update_note_fields:Description: Update specific fields of an EXISTING Anki note. Use ONLY when you already have the noteId of an existing card. For creating new cards, use
add_cardinstead.Input:
noteId(number),fields(object, e.g.,{"Front": "New Q", "Back": "New A"}).
create_deck:Description: Create a new Anki deck.
Input:
deckName(string).
bulk_update_notes:Description: RECOMMENDED FOR MULTIPLE CARDS: Update specific fields for multiple EXISTING Anki notes in a single operation. Much more efficient than updating cards one by one. Use ONLY when you have noteIds for cards that already exist. For creating new cards in bulk, use
add_bulkinstead. Always complete all updates in a single operation whenever possible.Input: An array of
notes, where each note hasnoteId(number) andfields(object).
get_model_names:Description: Lists all available Anki note type/model names.
Input: None.
get_model_details:Description: Retrieves the fields, card templates, and CSS styling for a specified note type.
Input:
modelName(string).
get_deck_model_info:Description: Retrieves information about the note types (models) used within a specified deck. Helps determine if a single model is used, multiple, or if the deck is empty or non-existent.
Input:
deckName(string).Output: An object with
deckName,status(e.g., "single_model_found", "multiple_models_found", "no_notes_found", "deck_not_found"), and conditionallymodelName(string) ormodelNames(array of strings).
add_note_type_field:Description: Adds a new field to a note type.
Input:
modelName(string),fieldName(string).
remove_note_type_field:Description: Removes an existing field from a note type.
Input:
modelName(string),fieldName(string).
rename_note_type_field:Description: Renames a field in a note type.
Input:
modelName(string),oldFieldName(string),newFieldName(string).
reposition_note_type_field:Description: Changes the order (index) of a field in a note type.
Input:
modelName(string),fieldName(string),index(number).
update_note_type_templates:Description: Updates the HTML templates (e.g., front and back) for the cards of a note type.
Input:
modelName(string),templates(object, e.g.,{"Card 1": {"Front": "html", "Back": "html"}}).
update_note_type_styling:Description: Updates the CSS styling for a note type.
Input:
modelName(string),css(string).
create_model:Description: Creates a new Anki note type (model).
Input:
modelName(string),fieldNames(array of strings),cardTemplates(array of objects, each withName,Front,BackHTML strings),css(optional string),isCloze(optional boolean, defaults to false),modelType(optional string, defaults to 'Standard').
add_bulk:Description: RECOMMENDED FOR MULTIPLE CARDS: Adds multiple NEW flashcards to Anki in a single operation. Much more efficient than adding cards one by one. Use ONLY for creating new cards, NOT for updating existing ones (will throw errors for any cards that already exist). For updating existing cards, use
bulk_update_noteswith noteIds instead. Always complete all additions in a single operation whenever possible. Must use HTML formatting for card content.Input: An array of
notes, where each note object has:fields: (object) An object where keys are field names and values are their HTML content.modelName: (string) The name of the Anki note type (model) to use for this note.deckName: (optional string) The name of the deck for this note. Defaults to 'Default'.tags: (optional array of strings) A list of tags for this note.
undo:Description: Undo the most recent action in Anki's collection — a card review, a field edit, a suspend, etc. Only undoes one action at a time; call repeatedly to undo further back.
Input: None.
More information can be found here Anki Integration | 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 the full burden of behavioral disclosure. It states the action ('Add') but doesn't cover critical aspects like whether this is a mutation (likely yes), error handling (e.g., if the deck doesn't exist), permissions needed, or response format. This leaves significant gaps for safe and effective tool invocation.
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 zero wasted words, making it highly efficient and front-loaded. It immediately conveys the core purpose without unnecessary elaboration, earning full marks for conciseness.
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 tool's complexity as a mutation operation with no annotations and no output schema, the description is insufficient. It doesn't address behavioral traits, error conditions, or return values, leaving the agent with incomplete information for reliable use in a broader context.
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 input schema has 100% description coverage, clearly documenting all three required parameters (deckName, front, back). The description adds no additional meaning beyond the schema, such as formatting examples or constraints, so it meets the baseline for adequate but not enhanced parameter guidance.
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. However, it doesn't explicitly differentiate from sibling tools like 'anki_add_notes' (plural) or 'anki_create_deck', which would require more specificity about scope or use cases.
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_notes' or 'anki_create_deck'. It lacks context about prerequisites, such as whether the deck must exist, or exclusions, leaving the agent to infer usage from tool names alone.
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?
No annotations are provided, so the description carries full burden. It states the tool adds cards, implying a write operation, but lacks critical behavioral details: whether it requires authentication, how it handles duplicates or errors, if it's idempotent, or what the response format is. This is a significant gap for a mutation 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, efficient sentence with zero waste. It's front-loaded and appropriately sized for the tool's complexity, making it easy to parse quickly.
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 tool's complexity (a write operation with 2 parameters, no annotations, and no output schema), the description is incomplete. It lacks behavioral context, error handling details, and guidance on usage versus siblings, leaving the agent with insufficient information for reliable 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?
Schema description coverage is 50% (only 'deckName' has a description). The description adds minimal value beyond the schema, as 'Add multiple flashcards' hints at the 'cards' array but doesn't explain its structure or semantics. With partial schema coverage, the description doesn't adequately compensate for undocumented parameters.
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'), distinguishing it from the sibling 'anki_add_note' (singular vs. multiple). However, it doesn't specify what constitutes a 'flashcard' beyond the schema's front/back structure, leaving some ambiguity.
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 explicit guidance on when to use this tool versus alternatives is provided. The description implies bulk addition, but it doesn't clarify prerequisites (e.g., deck must exist), when to use 'anki_add_note' for single cards, or how it relates to 'anki_create_deck'.
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 the full burden of behavioral disclosure. It states 'Create a new Anki deck', implying a write operation, but lacks details on permissions, error handling, or what happens if the deck already exists. This is a significant gap for a mutation tool without annotations.
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 with no wasted words. It is front-loaded and efficiently conveys 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?
Given that this is a mutation tool with no annotations and no output schema, the description is incomplete. It fails to address behavioral aspects like side effects, return values, or error conditions, which are crucial for an agent to use the tool effectively.
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 schema description coverage is 100%, with the single parameter 'deckName' fully documented in the schema. The description does not add any additional meaning beyond what the schema provides, such as format constraints or examples, so it meets the baseline for high schema coverage.
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 notes rather than creating decks, so it misses explicit sibling distinction.
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. There are no mentions of prerequisites, context, or exclusions, leaving the agent to infer usage based on the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.316153251MIT
- 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.1531MIT
- 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
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nietus/anki-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server