home / mcp / anki mcp server

Anki MCP Server

Provides an MCP server that connects to Anki via AnkiConnect to fetch leech-tagged cards and annotate them for Claude Desktop analysis.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "captain-blue210-anki-mcp-server": {
      "command": "node",
      "args": [
        "path/to/anki-mcp-server/dist/index.js"
      ],
      "env": {
        "ANKI_MOCK_MODE": "false",
        "ANKI_CONNECT_URL": "http://localhost:8765",
        "ANKI_CONNECT_VERSION": "6"
      }
    }
  }
}

You run a Model Context Protocol (MCP) server that connects to Anki via AnkiConnect to fetch leech-tagged cards and attach date-stamped review tags. This enables Claude Desktop to analyze and interact with your Anki data in a structured, repeatable way, while keeping your card data centralized and easy to audit.

How to use

Open Claude Desktop and ensure your Anki setup is ready with AnkiConnect installed. Configure Claude Desktop to point at your local MCP server so Claude can request leech-tagged cards and apply review tags. Use natural language prompts to request analyses, trends, or study improvements based on the leech-card data your server retrieves.

How to install

Prerequisites you need before installing the MCP server:

  • Node.js and npm are installed on your machine
  • Anki is installed and running with AnkiConnect enabled
  • You have network access to AnkiConnect (default http://localhost:8765)
# 1) Clone the MCP server repository
# Replace with the actual repository path if different
git clone https://github.com/captain-blue210/anki-mcp-server.git
cd anki-mcp-server

# 2) Install dependencies
npm install

# 3) Build the project
npm run build

Configure Clarke Desktop MCP connection

Set up Claude Desktop to use the Anki MCP server by adding an MCP entry that points to the local server. The following example shows how to reference the local Node.js runtime and the built MCP index.

{
  "mcpServers": {
    "anki": {
      "command": "node",
      "args": ["path/to/anki-mcp-server/dist/index.js"]
    }
  }
}

Available tools

get_leech_cards

Retrieves cards tagged as leeches from Anki, returning either comprehensive card data or IDs based on the detailed flag.

tag_reviewed_cards

Adds a date-stamped reviewed tag to specified cards to track which cards Claude has assisted with reviewing.