Anki MCP Server

MCP server for Anki — programmatic management of flashcards, decks, and review processes through Model Context Protocol with audio generation support.

Get this MCP server

MCP server for Anki — programmatic management of flashcards, decks, and review processes through Model Context Protocol with audio generation support.

Installation

NPX

npx -y github:nietus/anki-mcp

From Source

git clone https://github.com/nietus/anki-mcp
npm install
npm run build

Claude Desktop Bundle

npm install
npm run build
npm run pack:mcpb

Configuration

Cursor (Windows)

"anki": {
  "command": "cmd",
  "args": [
    "/c",
    "node",
    "c:/Users/YOUR_USERNAME/Downloads/anki-mcp/build/client.js"
  ]
}

Cursor (macOS/Linux)

"anki": {
  "command": "bash",
  "args": [
    "-c",
    "node /Users/YOUR_USERNAME/Downloads/anki-mcp/build/client.js"
  ]
}

Available Tools

Tool Description
update_cards Mark cards as answered and update their ease factor after answering questions
add_card Create a new flashcard in Anki with HTML content
add_card_with_audio Create a new flashcard with automatically generated audio via Azure TTS
update_card_with_audio Update an existing card — generate audio from a field and add to the audio field
get_due_cards Get a specified number of cards due for review
get_new_cards Get a specified number of new, not yet reviewed cards
get_deck_names Get a list of all Anki deck names
find_cards Find cards using raw Anki search query with detailed information
update_note_fields Update specific fields of an existing Anki note
create_deck Create a new Anki deck
bulk_update_notes Bulk update fields of multiple notes in a single operation
get_model_names List all available note types/models in Anki
get_model_details Get fields, card templates, and CSS styles for a specified note type
get_deck_model_info Get information about note types used in a specified deck
add_note_type_field Add a new field to a note type

Features

  • Programmatic creation and updating of flashcards
  • Management of Anki decks and note types
  • Audio generation for flashcards via Azure TTS
  • Bulk operations for efficient card management
  • Advanced search and filtering of cards
  • HTML formatting support in cards
  • Multilingual audio generation
  • AnkiConnect plugin integration

Environment Variables

Optional

  • AZURE_API_KEY — Azure API key for text-to-speech audio generation
  • ANKI_MEDIA_DIR — path to Anki media directory (collection.media folder) for storing audio files

Notes

Requires Node.js, npm, and the AnkiConnect plugin installed and running in Anki. Local execution is strongly recommended, as AnkiConnect only works locally. Tested on Windows only. Supports 21+ languages for TTS audio generation, including English, Spanish, French, German, Italian, Japanese, Korean, Portuguese, Russian, Chinese, Arabic, and others.

Comments (0)

Sign In Sign in to leave a comment.