Anki

Provides programmatic access to Anki cards, supporting creation, retrieval, updates, media handling, and batch operations via MCP.
  • javascript

2

GitHub Stars

javascript

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "letuanvu08-anki-mcp": {
      "command": "/absolute/path/to/anki-mcp-server/build/index.js",
      "args": []
    }
  }
}

You set up this MCP server to bridge Anki with your AI assistants, letting you create, read, update, and manage flashcards through a standardized, programmatic interface. This enables you to automate card workflows, search across your collection, and handle media seamlessly from your applications.

How to use

You interact with the Anki MCP Server through any MCP-compatible client. Use the available tools to create new cards, update existing ones, batch add multiple cards, retrieve due or new cards, and fetch detailed information about specific cards. You can search cards by ID, keywords, tags, decks, or any Anki search syntax. When you attach images or audio, the server automatically handles different sources such as local files, URLs, or existing media in Anki.

How to install

Prerequisites include having Node.js and npm installed on your machine. You will also configure Anki and AnkiConnect to allow MCP communication.

# 1) Install dependencies
npm install

# 2) Build the server
npm run build

# 3) Run the server locally (output will be in build/index.js or equivalent)
node build/index.js

Configuration guidance

Configure your MCP client to connect to the server. A typical local configuration uses the generated build index as the runtime entry point. Here is an example configuration you can place in your MCP client setup.

{
  "mcpServers": {
    "anki-mcp-server": {
      "command": "/absolute/path/to/anki-mcp-server/build/index.js"
    }
  }
}

Additional notes

Ensure Anki is running with the AnkiConnect add-on enabled. If you encounter issues, verify that the server process has access to the Anki instance and that the Anki media workflow (including base64 uploads and storeMediaFile calls) completes successfully.

Troubleshooting and tips

If the MCP client cannot discover or connect to the server, confirm that the path in the configuration is absolute and that build/index.js exists after running the build step. Restart your MCP client after making changes. If you see connection or timeout errors, ensure Anki is running, AnkiConnect is installed, and its settings allow localhost connections.

Tools and capabilities

The server exposes a set of tools to manage your Anki collection programmatically. Common capabilities include creating and updating cards, batch adding cards, and retrieving due or new cards, as well as querying detailed card information.

Available tools

update_card

Update cards and notes, including answers, fields, and tags.

add_card

Create a new flashcard with a specified deck, model, and field content.

batch_add_card

Create multiple flashcards in a single operation for efficiency.

get_due_cards

Retrieve cards that are due for review.

get_new_cards

Retrieve newly added unseen cards.

get_card

Retrieve detailed information for a card by ID or query.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational