Mousetaile
About
Anki MCP server Browse Mousetaile MCP Server for Claude, Cursor, VS Code, and other AI agents.
Details
- Author
- listfold
- Categories
- Productivity, Other, Knowledge Base, AI
Jump to
Setup
Install Mousetaile in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/listfold/mousetail
Follow the installation instructions in the repository README, then restart your MCP client.
Mousetail's goal is to be the simplest and most reliable way of connecting Anki to an LLM. It does not require any addons, just have anki installed and an LLM you'd like to connect to your decks.
For detailed instructions on integrating with Claude Code, Claude Desktop, and other LLM tools:
- Minimal- supports core anki operations: create, read, update and delete
- Stable- works directly with anki's stable pylib api, no addons or deps
- Simple- no configuration required, automatically discovers your Anki collections
Selectively commit what you learn in conversation with an LLM to memory
"Create a deck based on our conversation so I don't forget critical details"
"Create a card - what is a coeffcient?, create a card - id the first coefficient in this polynomial"
"Check my french vocab deck for correctness and correct any mistakes, typos or errors"
Mousetail supports synchronizing your Anki collection with AnkiWeb or a self-hosted sync server. This allows you to keep your collection in sync across devices.
Sync with AnkiWeb (saves credentials for future syncs):
> "Save my AnkiWeb credentials: username is myuser@example.com and password is mypassword" > "Sync my collection with AnkiWeb"
Mousetail stores credentials securely in your system's credential manager:
- macOS:Keychain
- Windows:Credential Manager
- Linux:Secret Service (GNOME Keyring, KWallet, etc.)
- save_sync_credentials- Save username/password securely
- load_sync_credentials- Load saved credentials
- delete_sync_credentials- Remove saved credentials
- AnkiWeb sync(default) - Leave endpoint empty
- Self-hosted servers- Provide custom endpoint URL (e.g.,https://sync.example.com)
- Media sync- Enabled by default, includes images and audio files
- Collection-only sync- Setsync_media: falseto skip media
> "Save my sync credentials for AnkiWeb - username: user@example.com, password: mypass123" > "Sync my collection"
> "Save my sync credentials - username: john, password: secret, endpoint: https://sync.myserver.com" > "Sync my collection"
One-time sync without saving credentials:
> "Sync my collection with AnkiWeb using username user@example.com and password mypass123"
> "Sync my collection but don't sync media files"
You can set a default sync endpoint inconfig.json:
{ "sync": { "endpoint": "https://sync.example.com" } }
Leaveendpointasnullto use AnkiWeb by default.
- Close Anki first:Sync will fail if the Anki application is running
- Media sync:Media sync is slower and uses more bandwidth but ensures images/audio are synced
- Conflicts:If conflicts occur, try syncing from Anki desktop first to resolve them
- Security:Credentials are never stored in plain text - they're kept in your system's secure credential storage
- Set up anAnki sync server
- Configure credentials on the server (using environment variables likeSYNC_USER1=user:password)
- Save your credentials in Mousetail with the server endpoint
- Sync normally
For detailed sync server setup, see theofficial Anki documentation.
The MCP server finds Anki collections at their standard locations:
- macOS:~/Library/Application Support/Anki2/[Profile]/collection.anki2
- Linux:~/.local/share/Anki2/[Profile]/collection.anki2
- Windows:%APPDATA%\Anki2\[Profile]\collection.anki2
You don't need to configure paths - the server automatically discovers available collections, this can be customized using configuration.
The server can be customized through aconfig.jsonfile. See theUsage Guidefor configuration options.
To develop and test Mousetail locally with Claude Code:
git clone https://github.com/listfold/mousetail.git cd mousetail
Configure Claude Code:The project includes a.mcp.jsonfile that configures the MCP server for local development:
{ "mcpServers": { "mousetail": { "type": "stdio", "command": "uv", "args": ["run", "python", "-m", "mousetail.mcp.stdio_server"], "env": { "PYTHONUNBUFFERED": "1" } } } }
Restart Claude Code:After the configuration is in place, restart Claude Code to load the MCP server.
- Use/contextin Claude Code to see available MCP tools
- The mousetail server should appear with all available tools (list_collections, create_note, sync_collection, etc.)
- Close the Anki desktop application before testing
- Test credential management:save_sync_credentials,load_sync_credentials,delete_sync_credentials
- Test sync:sync_collectionwith your AnkiWeb credentials or self-hosted server
Mousetail was written because all the existing MCP Anki tools depend on theAnkiConnectaddon.
AnkiConnect is a HTTP server for Anki, it was originally created to support connecting browser extensions likeyomichanto Anki. For MCP development, it is not necessary and introduces issues:
- introduces complexity e.g. a dedicated HTTP server for Anki occupies a port
- introduces risk e.g. if the AnkiConnect API changes or has a bug the MCP tool will break
- introduces an extra step e.g. all current MCP tools require installing the AnkiConnect addon
Mousetail has a much simpler approach. It integrates directly with Anki'spylib. This is a stable API that's part of Anki's core, it therefore is not subject to arbitrary or frequent change, and does not require any 3rd-party addons.
Because it prioritizes simplicity, mousetail will remain more stable than the alternatives. The tradeoff is that Mousetail will never integrate with the Anki UI. It is also reasonable to assume that Mousetail will only ever work with colocated (same system) LLM tools and Anki decks.
The project uses Sphinx with the Furo theme to generate documentation from Python docstrings.
uv run python -m sphinx -b html docs docs/_build/html
View the documentation:Opendocs/_build/html/index.htmlin your browser.
The documentation is automatically built and deployed to GitHub Pages on every push to the main branch.
MIT License - see LICENSE file for details.
Manage Anki flashcards and decks via the AnkiConnect plugin.
Connect Claude with AnkiConnect to create and review flashcards using natural language.
Connects to Anki via AnkiConnect to retrieve leech-tagged flashcards for use in Claude Desktop.
Enables AI assistants to interact with Anki flashcard decks via the AnkiConnect plugin.
Interactive flashcards, quizzes, and cloze cards with FSRS spaced repetition, rendered inline in Claude Desktop as an MCP App.
The media memory layer for AI agents and their humans. Track books, movies, music, shows, and anime.
A MCP server that enables AI assistants to interact with Anki, the spaced repetition flashcard application.
Open-source shared AI memory and team knowledge layer with 44 MCP tools for notes, memories, URLs, emails, projects, graph search, semantic search, and Git sync.
Create spaced repetition flashcards in Rember to remember anything you learn in your chats
Manage Anki flashcards and decks using the Anki-Connect plugin.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





