- Home
- MCP servers
- MCP Ankiconnect Server
MCP Ankiconnect Server
- python
12
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"samefarrar-mcp-ankiconnect": {
"command": "uv",
"args": [
"run",
"--with",
"mcp-ankiconnect",
"mcp-ankiconnect"
]
}
}
}You can connect Claude conversations with AnkiConnect through MCP to streamline creating and reviewing flashcards. This server exposes simple tools to check what’s due, fetch cards for review, and submit your reviews, all from your chat or automation workflow.
How to use
You will interact with three MCP tools to manage your Anki flashcards from Claude or any MCP client. Use the following tools to plan your review session, fetch cards due for today, and submit your answers after you review them.
How to install
Prerequisites you need before running this MCP server are clearly defined and must be in place first.
# Ensure Anki is running with AnkiConnect installed (plugin id 2055492159)
# Disable AppSleep to keep AnkiConnect responsive on macOS
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
Configure Claude Desktop to load the MCP server. On macOS, the config path is at ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows, it is at %APPDATA%/Claude/claude_desktop_config.json.
{
"mcpServers": {
"mcp-ankiconnect": {
"command": "uv",
"args": ["run", "--with", "mcp-ankiconnect", "mcp-ankiconnect"]
}
}
}
Restart Anki and Claude Desktop after adding this configuration.
Additional setup and debugging
If you need to debug MCP servers, you can use the MCP Inspector for a hands‑on debugging experience. Start by cloning the project, installing dependencies, and then syncing the MCP runtime. The final run command uses the MCP runtime to start the server and expose debugging utilities.
# Example debugging flow
git clone https://github.com/samefarrar/mcp-ankiconnect.git
cd mcp-ankiconnect
uv sync
# Start the server with the inspector enabled
uv run mcp dev mcp_ankiconnect/server.py
Upon launching, the Inspector will provide a URL you can open in your browser to start debugging.
## Notes and troubleshooting
MCP servers run over stdio, so you may encounter debugging challenges. Use the MCP Inspector for a clearer view of runtime behavior and to catch configuration issues early.
## Available tools
### num\_cards\_due\_today
Returns the number of Anki cards due today, with an optional deck filter to limit the count to a specific deck or show all decks.
### get\_due\_cards
Fetches cards due for review with optional limit, deck filter, and today\_only flag; returns cards in XML format with questions and answers.
### submit\_reviews
Submits a list of reviews for cards you’ve studied, each containing a card\_id and a rating of wrong, hard, good, or easy; returns a confirmation of submitted reviews.