Connect Claude conversations with AnkiConnect via MCP to make spaced repetition as easy as "Help me remember this"
Project description
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 three tools:
-
num_cards_due_today: Get the number of cards due today- Optional
deckargument to filter by specific deck - Returns count of due cards across all decks or specified deck
- Optional
-
get_due_cards: Get cards that are due for review- Optional
limitargument (default: 5) to control number of cards - Optional
deckargument to filter by specific deck - Optional
today_onlyargument (default: true) to show only today's cards - Returns cards in XML format with questions and answers
- Optional
-
submit_reviews: Submit answers for reviewed cards- Takes list of
reviewswithcard_idandrating - Ratings: "wrong", "hard", "good", "easy"
- Returns confirmation of submitted reviews
- Takes list of
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
-
Install the AnkiConnect plugin in Anki:
- Tools > Add-ons > Get Add-ons...
- Enter code:
2055492159 - Restart Anki
-
Configure Claude Desktop:
On MacOS:
~/Library/Application\ Support/Claude/claude_desktop_config.jsonOn Windows:%APPDATA%/Claude/claude_desktop_config.jsonAdd this configuration:
{ "mcpServers": { "mcp-ankiconnect": { "command": "uv", "args": ["run", "--with", "mcp-ankiconnect", "mcp-ankiconnect"] } } }
-
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_ankiconnect-0.6.0.tar.gz.
File metadata
- Download URL: mcp_ankiconnect-0.6.0.tar.gz
- Upload date:
- Size: 85.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91db5caf3fa77f05d33c89caba37094b004b7eb22947ec641b37eb87687d919b
|
|
| MD5 |
96ff6b8ed18f28bc30d43ffeefad4f6d
|
|
| BLAKE2b-256 |
5eedad270f2719c2b342f9692b19d567c8fb6b07ba70699a2d9bf95b5db21fd0
|
Provenance
The following attestation bundles were made for mcp_ankiconnect-0.6.0.tar.gz:
Publisher:
python-publish.yml on samefarrar/mcp-ankiconnect
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_ankiconnect-0.6.0.tar.gz -
Subject digest:
91db5caf3fa77f05d33c89caba37094b004b7eb22947ec641b37eb87687d919b - Sigstore transparency entry: 203612136
- Sigstore integration time:
-
Permalink:
samefarrar/mcp-ankiconnect@e8f79b9f869dbd0423eb1ba7375f5ea79a1c2fc0 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/samefarrar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e8f79b9f869dbd0423eb1ba7375f5ea79a1c2fc0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mcp_ankiconnect-0.6.0-py3-none-any.whl.
File metadata
- Download URL: mcp_ankiconnect-0.6.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
538463c38bb543390231bc6dd07c6920e6f31fa67db79a704e63b86a6104d267
|
|
| MD5 |
2de774ebeeedf9a6ff93bbec67c0dd45
|
|
| BLAKE2b-256 |
6c6133555653f630179e39767040ee7268766d958beb5c79ef2b4215b368257c
|
Provenance
The following attestation bundles were made for mcp_ankiconnect-0.6.0-py3-none-any.whl:
Publisher:
python-publish.yml on samefarrar/mcp-ankiconnect
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_ankiconnect-0.6.0-py3-none-any.whl -
Subject digest:
538463c38bb543390231bc6dd07c6920e6f31fa67db79a704e63b86a6104d267 - Sigstore transparency entry: 203612139
- Sigstore integration time:
-
Permalink:
samefarrar/mcp-ankiconnect@e8f79b9f869dbd0423eb1ba7375f5ea79a1c2fc0 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/samefarrar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e8f79b9f869dbd0423eb1ba7375f5ea79a1c2fc0 -
Trigger Event:
release
-
Statement type: