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
Install via Desktop Extension (.mcpb)
This repository supports Anthropic Desktop Extensions (MCPB). The easiest way to use this server in Claude Desktop is by installing the packaged .mcpb bundle.
Generate the
.mcpbfile locally using the provided script:
Open Claude Desktop Settings → Extensions and drag the generated
.mcpbfile in, then click Install.
This validates manifest.json and outputs a .mcpb archive you can install as above. Learn more about Desktop Extensions in Anthropic's announcement: Desktop Extensions: One-click MCP server installation for Claude Desktop.
Usage with Claude Desktop
Add the server to your claude_desktop_config.json:
Using Custom AnkiConnect Port
If your AnkiConnect is running on a different port, you can specify it using the --port parameter:
Configuration for Cline
Add the server to your Cline MCP settings file inside VSCode's settings cline_mcp_settings.json
Using Custom AnkiConnect Port
For Cline, you can also specify a custom port:
Development
Packaging a Desktop Extension (.mcpb)
Create a distributable Desktop Extension bundle for Claude Desktop:
This will build the project and generate a .mcpb archive from the current repository, validating manifest.json. Test by dragging it into Claude Desktop's Extensions settings. Reference: Desktop Extensions: One-click MCP server installation for Claude Desktop.
Publishing to MCP Registry
This server is automatically published to the MCP Registry when a new version is released. The publishing process includes:
Automated CI/CD: GitHub Actions automatically publishes to both NPM and MCP Registry on successful releases
Schema Validation: The
server.jsonfile is validated against the MCP schema before publishingVersion Synchronization: Versions are kept in sync between
package.json,manifest.json, andserver.jsonComprehensive Testing: Multi-version Node.js testing, linting, and validation before publishing
Beta Support: Automated beta releases for testing new features
Manual Validation
You can validate the MCP server configuration locally:
This will download the latest MCP schema and validate your server.json file.
Manual Publishing
If you need to publish manually, you can use the MCP Publisher CLI:
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
Star History
Credits
Icon courtesy of macOS Icons
License
MIT License - see LICENSE file for details