SuperAPI AI Directory

anki-mcp

Manage your Anki collection via AnkiConnect.

Open website

About this tool

anki-mcp is a Model Context Protocol (MCP) server for interacting with Anki flashcards. It exposes AnkiConnect operations as MCP tools through the AnkiConnect plugin, organized by logical services.

Purpose This server is designed to allow AI assistants or other MCP clients to manage Anki collections through a standard protocol, such as creating decks, adding notes, querying card information, and more.

Main Capabilities The server provides the following MCP tools grouped by service (tool names correspond directly to AnkiConnect operations):

  • Deck service (deck.*): Get the list of deck names and IDs, get deck configuration, create an empty deck, delete a deck, move cards to another deck, save deck configuration, etc.
  • Note service (note.*): Find note IDs based on a search query, get note information, get note tags, create new notes, modify note fields, delete notes, create notes in bulk, add or remove tags, update note fields and/or tags, etc.
  • Card service (card.*): Find card IDs based on a search query, get card information, convert card IDs to note IDs, check whether a card is suspended, get card modification time, suspend or unsuspend cards, set specific values for a single card (use with caution), etc.
  • Model service (model.*, i.e. note types): Get the list of model names and IDs, find model definitions by name, get model field names, get model template content, get model CSS styles, create new models, modify model templates, modify model CSS styles, add or remove model fields, etc.
  • Media service (media.*): Get the base64-encoded content of media files, get media file names by wildcard pattern, store media files (from base64, path, or URL), delete specified media files, etc.

Usage Before use, the following conditions must be met:

  1. Install the Anki desktop application.
  2. Install and configure the AnkiConnect plugin in Anki.
  3. Optional but recommended: install uv for running and installing dependencies.

After running the MCP server, the server will start and listen for MCP requests, usually interacting with AnkiConnect at http://127.0.0.1:8765 . You can use MCP Inspector to view available tools. To integrate with an MCP client (such as an AI assistant framework), configuration is required so it can find this server.

Use Cases Suitable for users who want to automate the management of Anki flashcards through the MCP protocol, for example integrating Anki operations into an AI assistant framework to accomplish tasks such as bulk note creation, card querying, and deck management.

Limitations

  • The Anki desktop application and AnkiConnect plugin must be running locally.
  • The project is still under development, and the author mentions "Finish adding all AnkiConnect tools," meaning not all AnkiConnect tools have been added yet.
  • Details such as specific installation steps, configuration examples, and dependency versions are not yet fully provided.