An Anki MCP server
Project description
Anki MCP Server
A Model Context Protocol (MCP) server for integrating AI assistants with Anki, the popular spaced repetition flashcard software.
Features
This MCP server enables AI assistants to interact with Anki through the following tools:
Tools
-
add-notes: Add one or more notes to Anki
- Create new flashcards with specified deck, model, and field values
- Returns success/failure status for each note
-
update-notes: Update one or more existing notes in Anki
- Modify field values and/or tags for existing notes
- Requires note IDs for the notes to be updated
-
find-notes: Find notes matching a query in Anki
- Search for existing notes using Anki's search syntax
-
check-connection: Check connection to Anki
- Verifies that AnkiConnect is running and accessible
-
list-decks: List all available decks in Anki
- Returns a list of all deck names in your Anki collection
-
get-cards-reviewed: Get the number of cards reviewed by day
- Retrieves review statistics showing cards studied per day
-
list-models: List all available note models in Anki
- Returns a list of all note types (models) available in your collection
-
get-model-fields: Get all field names and descriptions for a specific Anki note model
- Shows the structure of a specific note type, including field names and descriptions
Requirements
- Anki must be installed and running
- AnkiConnect add-on must be installed in Anki
Configuration
Claude Desktop
To add this MCP server to Claude Desktop:
On MacOS: Edit ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: Edit %APPDATA%/Claude/claude_desktop_config.json
Development/Unpublished Servers Configuration
"mcpServers": {
"anki": {
"command": "uv",
"args": [
"--directory",
"/Users/path/to/anki-mcp",
"run",
"anki"
]
}
}
Published Servers Configuration
"mcpServers": {
"anki": {
"command": "uvx",
"args": [
"anki"
]
}
}
Development
Building and Publishing
To prepare the package for distribution:
- Sync dependencies and update lockfile:
uv sync
- Build package distributions:
uv build
This will create source and wheel distributions in the dist/ directory.
- Publish to PyPI:
uv publish
Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token:
--tokenorUV_PUBLISH_TOKEN - Or username/password:
--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm with this command:
npx @modelcontextprotocol/inspector uv --directory /path/to/anki-mcp run anki
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anki_mcp-0.1.0.tar.gz.
File metadata
- Download URL: anki_mcp-0.1.0.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8da73e85b5bca1db4cd3819bc259bf6409ce86791cb0db715900b820909e86ab
|
|
| MD5 |
2d6ecd08d49d252cf0a986695c9a02ae
|
|
| BLAKE2b-256 |
b6ce787e7b16288263f5a32cc19092e0a135a1848be729b7fdaef6ed84aa1988
|
File details
Details for the file anki_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: anki_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60e6323f6893d2b06e4dc6431f8d00268a1a6364f6d109909224efce90c6b04c
|
|
| MD5 |
446a43aea5e845a58aa4d178183be50c
|
|
| BLAKE2b-256 |
80462d87a2b17e894ab49e70510a06154a0650c35ab29143c715943a40ccd568
|