MCP server for Anki via AnkiConnect
Configuration
View docs{
"mcpServers": {
"nailuogg-anki-mcp-server": {
"command": "npx",
"args": [
"--yes",
"anki-mcp-server"
],
"env": {
"EXAMPLE_ENV": "YOUR_VALUE"
}
}
}
}You can run an MCP server that lets LLMs talk to Anki through AnkiConnect. This makes it practical to manage decks, notes, and note types from an autonomous agent or your own tools, without switching apps manually.
You connect your MCP client to the Anki MCP Server to perform deck and note operations. Common workflows include listing decks, creating decks, adding notes (Basic or Cloze), querying notes, updating notes, and deleting notes. You can also inspect available note types and their structures. If you run an AnkiConnect instance on a different port, you can adjust the port when starting the server.
To use it with your MCP client, add the Anki MCP Server as a configured endpoint. The server runs as a local process started by a command such as npx --yes anki-mcp-server (optionally followed by --port to specify a non-default AnkiConnect port). Once started, your client can invoke the supported tools to manage decks, notes, and note types within Anki.
Prerequisites you need before installing: Anki installed on your system and the AnkiConnect add-on installed in Anki.
Install via Desktop Extension (.mcpb). The easiest way to use this server is to package it as a Desktop Extension and install it in Claude Desktop.
Steps to install locally and prepare for use:
1) Build the distributable bundle locally.
2) Import the generated .mcpb bundle into Claude Desktop via Settings → Extensions → Install.
Configuration and startup details are shown below, including how to run the server with a custom AnkiConnect port if needed.
Usage with Claude Desktop and Cline: you add the server to your client’s MCP settings to enable communication with Anki. You can keep using the default port or specify a custom port if AnkiConnect is listening elsewhere.
Development and testing notes: the server is designed to work over stdio, and you can inspect MCP messages and server activity with an inspector tool during development.
Example usage scenarios include creating a new deck, adding a basic card, or adding a cloze deletion card to verify end-to-end functionality.
The server exposes a set of tools to interact with Anki via MCP. You can list decks, create decks, create notes, perform batch note creation, search notes, retrieve note info, update notes, delete notes, list note types, create note types, and get detailed note type schemas.
List all available Anki decks to discover what you can work with.
Create a new Anki deck by name to organize your notes.
Create a new note (Basic or Cloze) in a specified deck.
Create multiple notes in one operation to accelerate card population.
Search notes using Anki query syntax to locate existing cards.
Retrieve detailed information about a specific note.
Update fields of an existing note.
Remove a note from a deck.
List all available note types in the Anki collection.
Create a new note type (model) for future notes.
Get detailed structure information for a specific note type.