← Back to directory
A

Anki MCP Server Addon

Community
Seamlessly integrate Anki with AI assistants via a local MCP server.
GitHub source repository ↗
★ 72 Stars Category · Other Popular Source revision 5c3d7ee8251e
55FMRS · C
Reliability
6/20
Security and permissions
11/20
Maintenance
9/20
Documentation
16/20
Setup experience
13/20

AnkiMCP Server is a powerful Anki addon that connects Anki with AI assistants via the MCP protocol, offering a rich set of tools and security measures. It suits users who want to leverage AI to enhance learning but requires some technical configuration.

Read the FMRS scoring method →

AnkiMCP Server is an Anki addon that runs a local MCP server inside Anki, allowing AI assistants like Claude to interact with your flashcard collection through the Model Context Protocol (MCP). It supports a local HTTP server and remote tunnel, offering tools to manage cards, notes, tags, models, and media, as well as FSRS scheduling parameters and GUI interactions.

Tools

sync
Synchronize collection with AnkiWeb, with async status and full-sync conflict resolution
list_decks
List all decks in the collection
create_deck
Create a new deck
find_notes
Search for notes using Anki's search syntax
notes_info
Get detailed information about notes
add_note
Add a new note to a deck
add_notes
Batch-add notes up to max_notes_per_batch
card_management
Manage cards including reposition, change deck, bury/unbury, suspend/unsuspend, flag, due date, and forget
tag_management
Manage tags including add, remove, replace, get, clear unused, and batch operations
filtered_deck
Manage filtered decks: create/update, rebuild, empty, delete
update_note_fields
Update fields of existing notes
update_notes
Batch-update fields of multiple notes with partial success
delete_notes
Delete notes from the collection
get_due_cards
Get next due card for review, optionally skip images/audio
cards_stats
Bulk per-card scheduling stats for a deck (including subdecks)
present_card
Get card content for review
rate_card
Rate a card after review (Again/Hard/Good/Easy)
model_names
List available note types
model_field_names
Get field names and descriptions for a note type
model_styling
Get CSS styling for a note type
update_model_styling
Update CSS styling for a note type
model_templates
Read Front/Back HTML templates for each card type in a note type
update_model_templates
Update Front/Back template HTML
model_fields
Manage fields on a note type: add, rename, reposition, and remove (destructive)
create_model
Create a new note type
store_media_file
Store a media file via base64, file path, or URL, with path traversal and SSRF prevention
get_media_files_names
List media files matching a pattern
delete_media_file
Move a media file to Anki's trash
get_fsrs_params
Get FSRS scheduler parameters for deck presets
set_fsrs_params
Update FSRS parameters (weights, desired retention, max interval)
get_card_memory_state
Get FSRS memory state (stability, difficulty, retrievability) for cards
optimize_fsrs_params
Run FSRS parameter optimization using Anki's built-in optimizer
gui_browse
Open the card browser with a search query
gui_add_cards
Open the Add Cards dialog
gui_edit_note
Open the note editor for a specific note
gui_current_card
Get info about the currently displayed card
gui_show_question
Show the question side of current card
gui_show_answer
Show the answer side of current card
gui_select_card
Select a specific card in the reviewer
gui_deck_browser
Navigate to deck browser
gui_undo
Undo the last operation

Setup

  1. Open Anki and go to Tools → Add-ons → Get Add-ons..., enter code 124672614, and restart.
  2. Alternatively, download anki_mcp_server.ankiaddon from GitHub Releases and install by double-clicking.
  3. For Claude Desktop, add an MCP server config in your config file (e.g., ~/Library/Application Support/Claude/claude_desktop_config.json on macOS) using npx mcp-remote to connect to http://127.0.0.1:3141.
  4. For Claude Code, run: claude mcp add anki --transport http http://127.0.0.1:3141/.
claude_desktop_config.json
{
  "mcpServers": {
    "anki": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://127.0.0.1:3141"
      ]
    }
  }
}

Fit and risk

Best for

  • Users who use Anki for spaced repetition and want to leverage AI to automate study workflows
  • Advanced users who need to manage cards, notes, and tags in bulk
  • Developers who want to integrate Anki data into AI workflows

Not for

  • Casual users who don't need AI interaction and only want basic Anki features
  • Users uncomfortable with technical configuration who want plug-and-play
  • Users needing official support or enterprise-grade security guarantees

Required permissions

  • Read and modify Anki collection data (cards, notes, decks, tags)
  • Perform sync operations, communicating with AnkiWeb
  • Access and modify media files (import, delete)
  • Perform UI operations in Anki interface (e.g., open dialogs, browse)

Risks and side effects

  • Exposing via tunnel may increase unauthorized access risk, but built-in DNS-rebinding protection and optional API key mitigate it
  • Destructive tools (like field deletion) are hidden by default, but users can enable them, potentially causing data loss
  • Media file import has path traversal and SSRF risks, which are built-in validated, but loose configuration could lead to security issues
  • Automatic sync may unexpectedly overwrite or modify collection; regular backups recommended

Troubleshooting

  1. First run downloads pydantic_core; if it fails, check network connection and retry
  2. If HTTP server doesn't start, check Anki version >= 25.07 and ensure http_enabled is true in config
  3. If client connection fails, confirm HTTP port is not in use and Host/Origin are in allowlist (when using tunnel)
  4. Check log file (if log_to_file enabled) or use Copy Diagnostics button to gather info for troubleshooting

Use cases

AI-guided review sessions with interactive, quick, or voice modes
Batch create and edit cards, notes, and tags
Analyze card statistics and FSRS scheduling parameters
Control Anki interface via GUI tools like browse, add, and edit cards
Access your collection from anywhere via remote tunnel

Supported clients

Claude DesktopFull support
Claude CodeFull support
OpencodeFull support