An MCP (Model Control Protocol) server for interacting with the Anki flashcard application through the AnkiConnect API.
Anki-MCP provides a bridge between your LLM's and Anki. This project implements the Anki-Connect API (https://git.sr.ht/~foosoft/anki-connect) as an MCP server.
- Anki installed on your system
- AnkiConnect plugin installed in Anki
- Node.js (v14 or later recommended)
- Clone this repository
- Install dependencies with
npm install - Configure your MCP settings (below) to include the Anki-MCP server
Depending your MCP host, add the following to your mcp_settings.json file:
"anki-connect": {
"command": "node",
"args": [
"/path/to/anki-mcp/index.js"
],
"disabled": false,
"autoApprove": []
}Replace /path/to/anki-mcp/index.js with the actual path to your installation.
Important: Anki must be running with the AnkiConnect plugin active for this MCP server to work.
Once configured, you can use the Anki-MCP server to:
- Create and update flashcards
- Manage decks
- Query card information
- Execute all Anki operations available from AnkiConnect plugin
The server provides tools for all operations supported by AnkiConnect, including:
- Card actions (getEaseFactors, suspend, unsuspend, etc.)
- Deck actions (deckNames, createDeck, changeDeck, etc.)
- Note actions (addNote, updateNote, findNotes, etc.)
- Media actions (storeMediaFile, retrieveMediaFile, etc.)
- And many more
- AnkiConnect (https://git.sr.ht/~foosoft/anki-connect) for providing the API that makes this possible
- The Anki team for their incredible flashcard application