mcp-ankiconnect
Documentation
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 trueInstallation
Quickstart
1. Install the AnkiConnect plugin in 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 syncYou can launch the MCP Inspector via the mcp CLI:
uv run mcp dev mcp_ankiconnect/server.pyUpon launching, the Inspector will display a URL you can access in your browser to begin debugging.
Frequently asked questions
What is mcp-ankiconnect?
mcp-ankiconnect is a Model Context Protocol (MCP) server listed in the TrackMCP directory.
How do I install mcp-ankiconnect?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-ankiconnect open source?
Yes — it is hosted on GitHub at https://github.com/samefarrar/mcp-ankiconnect and has 12 stars.
Related MCP tools
5. Update .env file in the root directory with your mem0 API key: for the Model Context Protocol. Enhance AI assistants with powerful integrations.
Model Context Protocol integration for Python. Enhance AI assistants with powerful Python-based capabilities and integration support.
This repository contains Model Context Protocol (MCP) servers that enable MCP clients (like Claude Desktop or the cline.
🙌 OpenHands: Code Less, Make More for the Model Context Protocol. Enhance AI assistants with powerful integrations. Python-based implementation.
Universal memory layer for AI Agents; Announcing OpenMemory MCP - local and secure memory management. Python-based implementation.
基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择ChatGPT/Claude/DeepSeek/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP