anki-mcp
Enables AI assistants to create and manage Anki cards through AnkiConnect, including decks, card creation, search, updates, deletion, and mobile sync.
README
anki-mcp
A thin Model Context Protocol (MCP) adapter that lets AI assistants (Claude Code, Hermes Agent, etc.) create and manage Anki cards directly — via AnkiConnect.
No custom AI app. The AI stays the intelligence layer; this server is just a bridge to Anki.
Claude Code / Hermes / ChatGPT
│ MCP (stdio)
▼
anki-mcp server
│ AnkiConnect HTTP (localhost:8765)
▼
Anki Desktop + AnkiConnect add-on
│ sync
▼
AnkiWeb ──► Anki mobile (iOS/Android)
Features
| Tool | Description |
|---|---|
list_decks |
List all decks with card counts |
create_deck |
Create a deck if it doesn't exist |
create_card |
Basic front/back card |
create_cloze |
Cloze deletion card ({{c1::...}}) |
create_cards |
Batch-create many cards at once |
search_cards |
Full-text search (Anki query syntax) |
update_card |
Update a card's front/back by note ID |
delete_card |
Delete a card by note ID |
Setup
1. Install Anki Desktop
Download and install from https://apps.ankiweb.net/. Start it once and sync with your AnkiWeb account so mobile sync works.
2. Install the AnkiConnect add-on
AnkiConnect exposes Anki over a local HTTP API on localhost:8765.
Option A — Anki add-on browser (easiest):
- In Anki: Tools → Add-ons → Get Add-ons…
- Enter the code
2055492159and install.
Option B — manual (Git):
cd "$APPDATA/Anki2/addons21" # Windows
# or: ~/.local/share/Anki2/addons21 (Linux)
# or: ~/Library/Application Support/Anki2/addons21 (macOS)
git clone --depth 1 https://github.com/FooSoft/anki-connect.git 2055492159
cd 2055492159
cp plugin/*.py plugin/*.json plugin/*.md .
rm -rf plugin tests .git 2>/dev/null
- Restart Anki. Verify it's up:
curl -s http://127.0.0.1:8765 -X POST -d '{"action":"version","version":6}'
# → {"result": 6, "error": null}
3. Run the MCP server
pip install mcp
python server.py
The server speaks MCP over stdio. Anki Desktop must be running (with AnkiConnect loaded) for tools to work.
Configure in a client
Hermes Agent
Add to ~/.hermes/config.yaml (or %USERPROFILE%\AppData\Local\hermes\config.yaml on Windows):
mcp_servers:
anki:
command: python
args:
- /absolute/path/to/server.py
timeout: 60
connect_timeout: 30
Then reload MCP in-session (/reload-mcp) or restart. Tools appear as mcp_anki_*.
Claude Code
claude mcp add anki -- python /absolute/path/to/server.py
Usage
Once wired up, just tell the AI what you want:
"Add a card to my System Design deck: front = 'Why does consistent hashing use virtual nodes?', back = 'To distribute keys more uniformly.'"
"Make Anki cards from the important concepts we just discussed."
Card-generation rules (put these in your AI instructions)
- One concept per card.
- Prefer questions that require recall.
- Avoid huge answers.
- Don't create cards for trivial facts.
- Use cloze cards where appropriate.
- Add source/topic tags.
Sync to mobile
MCP-created cards live in Anki Desktop until you sync. Trigger a sync:
- Manually: Anki → Sync (or press
Y), or - Via AnkiConnect:
curl -s http://127.0.0.1:8765 -X POST -d '{"action":"sync","version":6}'
Then sync the Anki mobile app to pull the new cards.
Requirements
- Python 3.10+
mcppackage (pip install mcp)- Anki Desktop (running)
- AnkiConnect add-on
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.