An MCP server that enables AI assistants like Claude to interact with Anki flashcard decks through the Model Context Protocol (MCP).
- Create and manage Anki decks
- Create basic flashcards with front/back content
- Create cloze deletion cards
- Update existing cards and cloze deletions
- Add and manage tags
- View deck contents and card information
- Full integration with AnkiConnect
- Anki installed and running
- AnkiConnect plugin installed in Anki
- Node.js 16 or higher
- Clone this repository:
git clone https://github.com/yourusername/clanki.git
cd clanki- Install dependencies:
npm install- Build the project:
npm run build-
Make sure Anki is running and the AnkiConnect plugin is installed and enabled
-
Configure Claude for Desktop to use the server by editing
claude_desktop_config.json:
{
"mcpServers": {
"clanki": {
"command": "node",
"args": ["/absolute/path/to/clanki/build/index.js"]
}
}
}Replace /absolute/path/to/clanki with the actual path to your clanki installation.
Tools exist for searching across the collection as well as creating three types of notes: basic; interview question; and programming language function.
To modify or extend the server:
- Make changes to
src/index.ts - Rebuild with
npm run build - Debug with
npx @modelcontextprotocol/inspector node build/index.js
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Built with the Model Context Protocol SDK
- Integrates with Anki via AnkiConnect
