anki
A Model Context Protocol (MCP) server that connects Claude to Anki. This integration allows you to create and manage flashcards in Anki using natural language commands with Claude. Simply ask Claude to create flashcards, and they will be automatically added to your Anki decks.
claude mcp add --transport stdio dhkim0124-anki-mcp-server python path/anki_server.py
How to use
This MCP server acts as a bridge between Claude and the Anki application, enabling you to create and manage Anki flashcards using natural language. Once the server is running and Anki with the AnkiConnect add-on is available, Claude can interpret your requests and translate them into actions that create or modify cards in Anki decks. Typical use cases include generating basic question-answer cards, language-learning cards with word meanings and examples, tagging cards automatically, and adding cards to multiple decks. To use it, start Anki and ensure AnkiConnect is installed, then run the Python MCP server as configured (for example via Claude Desktop's integration). In Claude Desktop you register the MCP server by specifying the Python command and the path to your anki_server.py script, along with any environment variables your setup requires. Once registered, you can issue natural language prompts like “Add an easy Japanese vocabulary card to my Japanese deck” or “Create a card for the English word 'perseverance' with its meaning and example sentences,” and Claude will route these requests through the MCP server to Anki.
How to install
Prerequisites:
- Python 3.8 or higher
- Anki 2.1.x or higher with AnkiConnect add-on installed
- Claude Desktop (or environment with access to Claude API)
Installation steps:
- Install Anki and AnkiConnect:
- Install Anki from https://apps.ankiweb.net/
- In Anki, go to Tools > Add-ons > Get Add-ons, enter code 2055492159, and restart Anki
- Clone the MCP server repository (or prepare your project folder):
- git clone https://github.com/dhkim0124/anki-mcp-server.git
- cd anki-mcp-server
- Set up a Python virtual environment (optional but recommended):
- python -m venv venv
- source venv/bin/activate # on Windows use venv\Scripts\activate
- Install required Python packages:
- pip install -r requirements.txt
- Configure Claude Desktop to register the MCP server (see Configuration section in README) and ensure Anki is running with AnkiConnect enabled.
- Run the MCP server script (example):
- python path/anki_server.py Replace path/anki_server.py with the actual path to your server script.
Notes:
- Ensure Anki is running in the background while using the MCP server.
- If you modify configuration files, restart the MCP server to apply changes.
Additional notes
Tips and common issues:
- Verify AnkiConnect status by visiting http://localhost:8765 and confirming the v6 response in your browser or via a test request.
- If commands do not appear to be processed, check server logs for errors and confirm Claude Desktop is properly configured to reach the MCP server.
- Environment variables (env) can be added to the mcp_config if your deployment requires API keys or custom settings; keep sensitive values secure.
- When registering with Claude Desktop, use the absolute path to anki_server.py and ensure the Python interpreter used by Claude has access to the virtual environment and dependencies.
- If you need to test specific card types, prepare sample natural language prompts that reflect the card structure you want (e.g., language-learning cards with word, meaning, and example sentences).
Related MCP Servers
web-eval-agent
An MCP server that autonomously evaluates web applications.
mcp-neo4j
Neo4j Labs Model Context Protocol servers
Gitingest
mcp server for gitingest
zotero
Model Context Protocol (MCP) server for the Zotero API, in Python
fhir
FHIR MCP Server – helping you expose any FHIR Server or API as a MCP Server.
unitree-go2
The Unitree Go2 MCP Server is a server built on the MCP that enables users to control the Unitree Go2 robot using natural language commands interpreted by a LLM.