Skip to main content

mcp-ankiconnect MCP server

Connect Claude conversations with AnkiConnect via MCP to make spaced repetition as easy as "Let's go through today's flashcards" or "Make flashcards for this"

Components

Tools

The server implements the following tools:

  • num_cards_due_today: Get the number of cards due today

    • Optional deck argument to filter by specific deck
    • Returns count of due cards across all decks or specified deck
  • get_due_cards: Get cards that are due for review

    • Optional limit argument (default: 5) to control number of cards
    • Optional deck argument to filter by specific deck
    • Optional today_only argument (default: true) to show only today's cards
    • Returns cards in XML format with questions and answers
  • submit_reviews: Submit answers for reviewed cards

    • Takes list of reviews with card_id and rating
    • Ratings: "wrong", "hard", "good", "easy"
    • Returns confirmation of submitted reviews
  • search_notes: Find notes by AnkiConnect query. Returns IDs + a short Front preview by default (cheap); pass return_card_content=true to receive cleaned field content inline.

  • inspect_cards: View per-card state for given card IDs or note IDs. Sparse-fieldset selection via the properties list: any of identity, state, scheduling, timestamps, history, fields, or all (default: ["identity", "state", "scheduling"]). The legacy include_history=true flag is still accepted as an alias.

  • update_note_fields: Modify the text content of one note's fields. Uses the same MathJax/code conversions as add_note.

  • update_note_tags: Add and/or remove tags on one or more notes.

  • set_suspended: Suspend or unsuspend one or more cards.

  • change_deck: Move cards (by card ID) into a different deck.

  • reschedule_cards: Set due date, forget, or relearn one or more cards.

Configuration

Prerequisites

  • Anki must be running with AnkiConnect plugin installed (plugin id 2055492159) AnkiConnect can be slow on Macs due to the AppSleep feature, so disable it for Anki. To do so run the following in your terminal.
    defaults write net.ankiweb.dtop NSAppSleepDisabled -bool true
    defaults write net.ichi2.anki NSAppSleepDisabled -bool true
    defaults write org.qt-project.Qt.QtWebEngineCore NSAppSleepDisabled -bool true
    

Installation

Quickstart

  1. Install the AnkiConnect plugin in Anki:

    • Tools > Add-ons > Get Add-ons...
    • Enter code: 2055492159
    • Restart Anki
  2. Configure Claude Desktop:

    On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

    Add this configuration:

    {
      "mcpServers": {
        "mcp-ankiconnect": {
          "command": "uv",
          "args": ["run", "--with", "mcp-ankiconnect", "mcp-ankiconnect"]
        }
      }
    }
    
  3. Restart Anki and Claude desktop

Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector. First, clone the repository and install the dependencies:

git clone https://github.com/samefarrar/mcp-ankiconnect.git
cd mcp-ankiconnect
uv sync

You can launch the MCP Inspector via the mcp CLI:

uv run mcp dev mcp_ankiconnect/server.py

Upon launching, the Inspector will display a URL you can access in your browser to begin debugging.

Metadata

Release files for mcp-ankiconnect 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-ankiconnect 0.7.0
File Size Uploaded
mcp_ankiconnect-0.7.0.tar.gz 93.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-ankiconnect 0.7.0
File Interpreter ABI Platform
mcp_ankiconnect-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 121.0 kB

Release files / mcp_ankiconnect-0.7.0.tar.gz

Download URL mcp_ankiconnect-0.7.0.tar.gz
Size 93.9 kB
Tags Source
SHA-256 checksum
How to use checksums
57eeec30fc9c8f943100954227e05f26cf7629305178120e3f0932b3c31eaa08
BLAKE2b-256 checksum
How to use checksums
eca02e9b2e3a35b1119ba9ad3bfae044171ffb6b7005221060f4040cc2185da9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 28, 2026.

Transparency log

Release files / mcp_ankiconnect-0.7.0-py3-none-any.whl

Download URL mcp_ankiconnect-0.7.0-py3-none-any.whl
Size 27.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6bc3fe5802c80262930e6dc3a7b943feba0dc8e585bbc8d0ba33cf83500b78f0
BLAKE2b-256 checksum
How to use checksums
360f6a66bfbec47a9f72cb27d97fc88decb8e6a7c6a0ca37e63b4c5a2c193e60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page