The Anki MCP Server enables interaction with Anki flashcard software, allowing you to:
List decks: View all available decks
Create decks: Establish new decks by name
Manage notes:
Create individual notes (Basic or Cloze)
Batch create multiple notes
Search notes using Anki query syntax
View detailed note information
Update existing notes (modify tags and fields)
Delete notes
Handle note types:
List available note types
Create custom note types with fields, templates, and CSS
Get detailed structure information
Access resources via endpoints like
anki://decks/allandanki://note-types/all
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 typeget_note_type_info- Get detailed structure of a note type
Resources
anki://decks/all- Complete list of available decksanki://note-types/all- List of all available note typesanki://note-types/all-with-schemas- Detailed structure information for all note typesanki://note-types/{modelName}- Detailed structure information for a specific note type
Related MCP server: Anki MCP Server
Prerequisites
Anki installed on your system
AnkiConnect add-on installed in Anki
Configuration
Usage with Claude Desktop
Add the server to your claude_desktop_config.json:
Configuration for Cline
Add the server to your Cline MCP settings file inside VSCode's settings cline_mcp_settings.json
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 testSubmit a pull request
Credits
Icon courtesy of macOS Icons
License
MIT License - see LICENSE file for details