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
deck
argument 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
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
- Optional
submit_reviews
: Submit answers for reviewed cards- Takes list of
reviews
withcard_id
andrating
- 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.json
On Windows:%APPDATA%/Claude/claude_desktop_config.json
Add 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.
AnkiConnect Integration
Project Details
- samefarrar/mcp-ankiconnect
- Last Updated: 4/11/2025
Categories
Recomended MCP Servers
A Model Context Protocol (MCP) server implementation that provides database capabilities for Chroma
A flexible system for managing various types of sources (papers, books, webpages, etc.) and integrating them with knowledge...
MCP-NixOS - Model Context Protocol Server for NixOS resources
A systematic reasoning MCP server implementation for Claude Desktop with beam search and thought evaluation.
Automatically generate MCP tools from your Fastify API routes.
BioMCP: Enabling agent-based biomedical R&D
MCP server integrating CEDARScript grammar functionality into tool use.
A Model Context Protocol server that provides network asset information based on query conditions. This server allows LLMs...
A minimal Model Context Protocol server/client
with Azure OpenAI and
web browser control via Playwright.
A Model Context Protocol server for interacting with Ledger CLI, a powerful double-entry accounting system. This server enables...
Interact seamlessly with GitLab repositories to manage merge requests and issues. Fetch details, add comments, and streamline your...