Install
$ agentstack add mcp-shivros-ankimcp ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
AnkiMCP
[](https://github.com/matt-fff/ankimcp/actions/workflows/ci.yml) [](https://github.com/matt-fff/ankimcp/actions/workflows/test-matrix.yml) [](https://www.python.org/downloads/) [](https://github.com/psf/black) [](https://github.com/astral-sh/ruff)
Integrate your Anki decks with your choice of AI through the Model Context Protocol (MCP).
AnkiMCP is an Anki addon that exposes your Anki collection data (decks, notes, cards, and review statistics) via an MCP server, allowing AI assistants to help you study, create cards, and analyze your learning progress.
Features
- List all available decks with card counts
- Search notes using Anki's powerful search syntax
- Get detailed information about specific notes and cards
- View review statistics for decks or your entire collection
- Access card scheduling information and review history
- Create, update, and delete notes and decks
- Comprehensive permission system to control AI access
- Protect sensitive decks and notes from modification
Installation
As an Anki Addon
- Download the addon from AnkiWeb or clone this repository
- Copy the
src/ankimcpfolder to your Anki addons directory (or run
./install_addon.sh to copy files and vendor the mcp dependency)
- Restart Anki
- The MCP server will start automatically when you open your profile
Packaging for AnkiWeb
Use the helper script to generate a distributable .ankiaddon archive that matches the AnkiWeb sharing requirements:
python package_for_ankiweb.py --version 1.0.0
The resulting file is written to the dist/ directory (e.g. dist/ankimcp-1.0.0-YYYYmmdd-HHMMSS.ankiaddon). The script reads metadata from src/ankimcp/manifest.json, vendors the mcp runtime dependency into vendor/, and filters out common build artifacts so the archive is ready to upload to AnkiWeb. Use --skip-deps if you are packaging an already vendored source tree.
Development Setup
# Clone the repository
git clone https://github.com/yourusername/ankimcp.git
cd ankimcp
# Install dependencies with Rye
rye sync
# Run the test server (with mock data)
rye run python -m ankimcp
Usage
Once installed, the MCP server runs automatically when Anki is open. You can then connect to it from any MCP-compatible AI assistant.
Available MCP Tools
list_decks- List all available Anki decksget_deck_info- Get detailed information about a specific decksearch_notes- Search for notes using Anki's search syntaxget_note- Get detailed information about a specific noteget_cards_for_note- Get all cards associated with a noteget_review_stats- Get review statistics for a deck or overalllist_note_types- List all note types with their fields and templatescreate_deck- Create a new deckcreate_note_type- Create a new note type (card template)create_note- Create a new note in a deckupdate_note- Update an existing note's fields or tagsupdate_deck- Update a deck's name or descriptiondelete_note- Delete a note and all its cardsdelete_deck- Delete a deck and all its cardsget_permissions- View current permission settings
Permissions
AnkiMCP includes a comprehensive permission system to control AI access to your collection. You can:
- Set global read/write/delete permissions
- Use allowlists or denylists for deck access
- Protect specific decks from modification
- Restrict access based on note tags
- Control which note types can be created
See [PERMISSIONS.md](PERMISSIONS.md) for detailed configuration options.
Configuration
Edit the addon configuration in Anki (Tools → Add-ons → AnkiMCP → Config):
{
"host": "localhost",
"port": 4473,
"permissions": {
"global": {
"read": true,
"write": true,
"delete": false
},
"mode": "denylist",
"deck_permissions": {
"denylist": ["Personal::*"]
},
"protected_decks": ["Default"]
}
}
Testing & Acceptance
- Run
rye run testto exercise the automated suite. - COD-73 acceptance: packaged add-on bundles the
mcpruntime dependency (viapackage_for_ankiweb.pyorinstall_addon.sh) and the automated tests pass.
More Information
Visit https://ankimcp.com for more details and documentation.
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: shivros
- Source: shivros/ankimcp
- License: MIT
- Homepage: https://ankimcp.com
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.