Content
# anki-mcp
A read-only [Model Context Protocol](https://modelcontextprotocol.io/) server for [Anki](https://apps.ankiweb.net/) via [AnkiConnect](https://ankiweb.net/shared/info/2055492159). Query your flashcard collection, track study progress, and get spaced repetition insights—all from Claude or any MCP-compatible client.
## Prerequisites
1. **Anki Desktop** — [Download](https://apps.ankiweb.net/)
2. **AnkiConnect Add-on** — Install from Anki:
- Tools → Add-ons → Get Add-ons...
- Code: `2055492159`
- Restart Anki
## Installation
```bash
bun install
```
## Usage
### Claude Desktop
Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
```json
{
"mcpServers": {
"anki": {
"command": "bun",
"args": ["run", "/path/to/anki-mcp/src/index.ts"]
}
}
}
```
### Standalone
```bash
bun run src/index.ts
```
## Tools
### Decks
| Tool | Description |
| ----------------- | -------------------------------------------------------------------- |
| `list_decks` | List all deck names |
| `get_deck_stats` | Get statistics (cards due, new, learning, review counts) |
| `get_deck_config` | Get deck configuration (new cards/day, review limit, lapse settings) |
### Cards
| Tool | Description |
| ----------------------- | ----------------------------------------------------------------------- |
| `search_cards` | Search using Anki query syntax (`deck:Default`, `tag:marked`, `is:due`) |
| `get_cards_info` | Get detailed info (fields, deck, lapses, reps, interval, ease) |
| `get_card_ease_factors` | Get ease factors (2500 = 250%) |
| `get_card_intervals` | Get current intervals (negative = seconds, positive = days) |
| `check_cards_due` | Check if cards are due for review |
| `check_cards_suspended` | Check if cards are suspended |
### Notes
| Tool | Description |
| ---------------- | -------------------------------------------- |
| `search_notes` | Search for notes using Anki query syntax |
| `get_notes_info` | Get detailed note info (fields, tags, model) |
| `list_tags` | List all tags in the collection |
### Statistics
| Tool | Description |
| --------------------------- | ----------------------------------------------- |
| `get_cards_reviewed_today` | Cards reviewed today |
| `get_review_history` | Daily review counts over time |
| `get_collection_stats_html` | Full collection statistics report (HTML) |
| `get_card_reviews` | Review records for a deck (includes time spent) |
| `get_reviews_of_cards` | Complete review history for specific cards |
| `get_retention_trend` | Retention rate over time (daily/weekly) |
| `get_deck_progress` | Deck breakdown (mature/young/unseen cards) |
| `get_forecast` | Upcoming review workload forecast |
| `get_time_stats` | Time spent studying with hour-of-day patterns |
### Models
| Tool | Description |
| ------------------ | ------------------------------- |
| `list_models` | List all note types (models) |
| `get_model_fields` | Get field names for a note type |
### Analysis
| Tool | Description |
| --------------------- | ------------------------------------------------- |
| `find_lapsed_cards` | Find cards with the most lapses (struggle cards) |
| `find_low_ease_cards` | Find cards with low ease factor (difficult cards) |
| `calculate_retention` | Calculate retention rate from review history |
| `get_study_summary` | Comprehensive study summary for coaching |
## Examples
**"What's my study streak?"**
```
→ get_study_summary
```
**"Show me cards I struggle with"**
```
→ find_lapsed_cards { "deck": "Japanese", "minLapses": 3 }
```
**"How's my retention trending?"**
```
→ get_retention_trend { "deck": "Spanish", "days": 30, "granularity": "weekly" }
```
**"What's my workload this week?"**
```
→ get_forecast { "days": 7 }
```
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
markitdown
Python tool for converting files and office documents to Markdown.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
TrendRadar
TrendRadar: Your hotspot assistant for real news in just 30 seconds.
mempalace
The highest-scoring AI memory system ever benchmarked. And it's free.
mempalace
The highest-scoring AI memory system ever benchmarked. And it's free.