Anki MCP Server
local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Enables interaction with Anki flashcard software through AnkiConnect, providing tools for managing decks, creating various types of flashcards (Basic and Cloze), searching notes, and manipulating note types.
Anki MCP Server
A Model Context Protocol (MCP) server that enables LLMs to interact with Anki flashcard software through AnkiConnect.
Features
Tools
list_decks
- List all available Anki deckscreate_deck
- Create a new Anki deckcreate_note
- Create a new note (Basic or Cloze)batch_create_notes
- Create multiple notes at oncesearch_notes
- Search for notes using Anki query syntaxget_note_info
- Get detailed information about a noteupdate_note
- Update an existing notedelete_note
- Delete a notelist_note_types
- List all available note typescreate_note_type
- Create a new note type
Prerequisites
- Anki installed on your system
- AnkiConnect add-on installed in Anki
For detailed installation instructions, see llms-install.md.
Development
Setup
- Install dependencies:
- Build the server:
- For development with auto-rebuild:
Testing
Run the test suite:
This executes tests for:
- Server initialization
- AnkiConnect communication
- Note operations (create/read/update/delete)
- Deck management
- Error handling
Debugging
Since MCP servers communicate over stdio, we recommend using the MCP Inspector:
This provides a browser-based interface for:
- Monitoring MCP messages
- Testing tool invocations
- Viewing server logs
- Debugging communication issues
Example Usage
- Create a new deck:
- Add a basic card:
- Add a cloze deletion card:
Contributing
- Fork the repository
- Create your feature branch
- Run tests:
npm test
- Submit a pull request
Credits
Icon courtesy of macOS Icons
License
MIT License - see LICENSE file for details
You must be authenticated.
A Model Context Protocol server that enables LLMs to interact with Anki flashcard software through AnkiConnect, allowing for creation and management of flashcards, decks, and note types.