home / mcp / ankimcp mcp server
Provides a local MCP endpoint for Anki to enable AI-assisted study and collection management.
Configuration
View docs{
"mcpServers": {
"ankimcp-anki-mcp-server-addon": {
"url": "http://127.0.0.1:3141/"
}
}
}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.
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.
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/.
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
}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/"
}
}
}Synchronize collection with AnkiWeb or ensure the local state is up to date.
List all decks in your Anki collection.
Create a new deck in your collection.
Search notes using Anki search syntax.
Get detailed information about notes in your collection.
Add a new note to a deck.
Update fields for existing notes.
Delete notes from the collection.
Retrieve cards due for review.
Fetch the content of a card for review.
Rate a card after review (Again/Hard/Good/Easy).
List available note types (models).
Get field names for a note type.
Get CSS styling for a note type.
Update CSS styling for a note type.
Create a new note type.
Store a media file (image/audio) in the collection.
List media files that match a pattern.
Delete a media file.
Open the card browser with a search query.
Open the Add Cards dialog.
Open the note editor for a specific note.
Get info about the currently displayed card.
Show the question side of the current card.
Show the answer side of the current card.
Select a specific card in the reviewer.
Navigate to the deck browser.
Undo the last operation.
Report Anki version and system information.
Run a guided review session workflow.