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
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 test
- Submit a pull request
Star History
Credits
Icon courtesy of macOS Icons
License
MIT License - see LICENSE file for details
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
LLM が AnkiConnect を介して Anki フラッシュカード ソフトウェアと対話できるようにし、フラッシュカード、デッキ、およびノート タイプの作成と管理を可能にするモデル コンテキスト プロトコル サーバー。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA server implementation that connects to a locally running Anki, enabling card review and creation through the Model Context Protocol.Last updated 8 months ago4159MIT License
- -securityAlicense-qualityA Model Context Protocol server that allows LLMs to interact with Anki flashcard software, enabling functions like creating decks, adding notes, searching cards, and managing flashcard content through natural language.Last updated 5 months ago451MIT License
- -securityAlicense-qualityA Model Context Protocol server that bridges Claude AI with Anki flashcard app, allowing users to create and manage flashcards using natural language commands.Last updated 4 months ago3MIT License
- -securityAlicense-qualityA Model Context Protocol server that enables language models to interact with Anki flashcard decks programmatically, with specialized features for Japanese language learning including vocabulary import, sample sentence generation, and spaced repetition review.Last updated 4 months ago3MIT License