- Home
- MCP servers
- AnkiMCP
AnkiMCP
- python
2
GitHub Stars
python
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You expose your Anki collection to AI assistants via a local MCP server that runs inside Anki. This enables AI-powered study sessions, card creation, and collection management by connecting your client to a nearby endpoint at localhost:3141.
How to use
Connect an MCP client to your local AnkiMCP Server to begin interactive AI-assisted study and management. The server runs in the background and communicates over HTTP, so your client can issue commands to sync decks, manage notes, fetch due cards, present cards for review, and apply styling to note types. You simply point your MCP client to the local URL and start using the features you need.
How to install
Prerequisites: ensure Anki is installed and you have access to a running Python environment (Python 3.13 is supported). You do not need to install anything extra for the MCP server if you are using the addon version inside Anki.
Install the AnkiMCP Server addon from AnkiWeb or via GitHub Releases. After installation, restart Anki to complete setup. The server will start automatically when Anki opens.
Connect the Claude Desktop MCP client (or any compatible MCP client) to the local server by configuring the client to point to the local URL: http://127.0.0.1:3141/.
Configuration
You can adjust how the local MCP server runs and its networking details from Anki’s Add-ons configuration for AnkiMCP Server. Change the HTTP mode, port, host, and startup behavior to fit your setup.
{
"mode": "http",
"http_port": 3141,
"http_host": "127.0.0.1",
"auto_connect_on_startup": true
}
Connect with Claude Desktop
Add the Anki MCP server to Claude Desktop by editing the Claude configuration file and including the local server URL under mcpServers. This enables Claude to access your Anki collection during sessions.
{
"mcpServers": {
"anki": {
"url": "http://127.0.0.1:3141/"
}
}
}
Available tools
sync
Synchronize collection with AnkiWeb or ensure the local state is up to date.
list_decks
List all decks in your Anki collection.
create_deck
Create a new deck in your collection.
find_notes
Search notes using Anki search syntax.
notes_info
Get detailed information about notes in your collection.
add_note
Add a new note to a deck.
update_note_fields
Update fields for existing notes.
delete_notes
Delete notes from the collection.
get_due_cards
Retrieve cards due for review.
present_card
Fetch the content of a card for review.
rate_card
Rate a card after review (Again/Hard/Good/Easy).
model_names
List available note types (models).
model_field_names
Get field names for a note type.
model_styling
Get CSS styling for a note type.
update_model_styling
Update CSS styling for a note type.
create_model
Create a new note type.
store_media_file
Store a media file (image/audio) in the collection.
get_media_files_names
List media files that match a pattern.
delete_media_file
Delete a media file.
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 the current card.
gui_show_answer
Show the answer side of the current card.
gui_select_card
Select a specific card in the reviewer.
gui_deck_browser
Navigate to the deck browser.
gui_undo
Undo the last operation.
system_info
Report Anki version and system information.
review_session
Run a guided review session workflow.