home / mcp / clanki mcp server
An MCP server for connecting Claude Desktop with Anki Flashcards.
Configuration
View docs{
"mcpServers": {
"jasperket-clanki": {
"command": "node",
"args": [
"/absolute/path/to/clanki/build/index.js"
]
}
}
}Clanki MCP Server lets you control Anki flashcard decks through the Model Context Protocol. You can create decks and cards, update existing notes, manage tags, and view deck contents, all from your AI assistant via MCP. This makes it easy to build study workflows, generate new cards on the fly, and keep your Anki collection synced with intelligent prompts.
You use Clanki by talking to an MCP client that connects to the local Clanki server. The server exposes a set of actions you can invoke to manipulate Anki decks and cards. Typical workflows include creating a new deck, adding basic or cloze cards, updating existing notes, and tagging cards for organization. You can also inspect deck contents to verify what you have in Anki.
Prerequisites you must have before running Clanki:
Install and run Clanki locally with the following steps. Copy and paste each command into your terminal in order.
git clone https://github.com/jasperket/clanki.git
cd clanki
npm install
npm run buildConfigure your MCP client (Claude Desktop) to connect to the local server. Create or edit the client configuration to point to the Clanki MCP instance using a stdio connection. The example below assumes the server will be started locally and accessible via a built index script.
{
"mcpServers": {
"clanki": {
"command": "node",
"args": ["/absolute/path/to/clanki/build/index.js"]
}
}
}Replace /absolute/path/to/clanki with the actual path to your Clanki installation. After this, start the server if it does not auto-start with the client, and ensure AnkiConnect remains enabled in Anki.
The Clanki MCP server exposes a set of actions you can invoke from your MCP client. Each action corresponds to a deck or card operation inside Anki.
Creates a new Anki deck with a specified name.
Adds a new basic flashcard to a given deck using front and back content and optional tags.
Creates a cloze deletion card in a specified deck using cloze syntax like {{c1::text}} and optional back content.
Updates an existing basic flashcard by note ID, with optional new front, back, and tags.
Updates an existing cloze deletion card by note ID, with optional new text, backExtra, and tags.
Views the contents of a deck and shows card information such as IDs, fronts, backs, and tags.
Manages tags on cards, including adding or removing tags for organization.