Extract highlights, annotations, notes, and reading progress from USB-connected e-readers (Kobo, Kindle, Boox). Use when the user asks about their reading highlights, book annotations, reading progress, or wants to search across their e-reader notes.
When the user asks about their reading highlights, annotations, notes, or reading progress from an e-reader, follow these steps.
Look for tools named list_books, get_annotations, search_annotations, get_reading_progress, get_book_details, get_handwritten_notes, or export_handwritten_notes in your available tools. If they exist, skip to Step 4: Use the tools.
Run:
pip install annotation-extractor
If pip is not available, try uv pip install annotation-extractor or .
pipx install annotation-extractorTell the user to add the MCP server to their agent. Detect which agent you are and give the appropriate command:
| Agent | Command to give the user |
|---|---|
| Claude Code | claude mcp add annotations -- annotation-extractor |
| Claude Desktop | Add to claude_desktop_config.json: {"mcpServers": {"annotations": {"command": "annotation-extractor"}}} |
| Cursor | Add to MCP config: {"mcpServers": {"annotations": {"command": "annotation-extractor"}}} |
| Gemini CLI | Add to ~/.gemini/settings.json: {"mcpServers": {"annotations": {"command": "annotation-extractor"}}} |
| Codex | codex --mcp-config mcp.json with mcp.json: {"mcpServers": {"annotations": {"command": "annotation-extractor"}}} |
If you can run the setup command yourself (e.g. in Claude Code), do so. Otherwise, show the user the exact command and ask them to run it, then restart the session.
Important: After MCP setup, the tools won't be available until the session is restarted. If you just set up the MCP server, tell the user to restart and try again. In the meantime, use the direct access method below to answer their question now.
If the MCP tools are available, use them in this order:
list_books to discover available books and annotation countsget_annotations with book_title (partial match) to get highlights and notessearch_annotations with a query to search across all highlightsget_reading_progress for reading activity overviewget_book_details for full metadata (ISBN, publisher, series)get_handwritten_notes to discover Kindle Scribe / Boox handwritten artifactsexport_handwritten_notes to copy handwritten files to a local output folderAll tools accept optional backend_name ("kobo", "kindle", "boox") and db_path. When omitted, connected devices are auto-detected.
If you cannot set up MCP or need to answer the user's question right now, use these methods:
pip install annotation-extractor
python -c "
from annotation_extractor.backends.kobo import KoboBackend
b = KoboBackend()
for book in b.list_books():
print(f'{book.title} by {book.author} - {book.annotation_count} annotations')
"
Replace KoboBackend with KindleBackend (from annotation_extractor.backends.kindle) or BooxBackend (from annotation_extractor.backends.boox) as needed.
To get annotations for a specific book:
python -c "
from annotation_extractor.backends.kobo import KoboBackend
b = KoboBackend()
for a in b.get_annotations(book_title='BOOK_TITLE_HERE'):
print(f'[{a.chapter}] {a.highlighted_text}')
if a.note: print(f' Note: {a.note}')
"
If Python package installation is not possible, query the Kobo database directly. The database is at .kobo/KoboReader.sqlite on the mounted device:
/Volumes/<DeviceName>/.kobo/KoboReader.sqlite/media/<user>/<device>/.kobo/KoboReader.sqlite<DriveLetter>:\.kobo\KoboReader.sqliteList books with annotations:
sqlite3 -readonly /path/to/KoboReader.sqlite "
SELECT c.Title, c.Attribution, COUNT(b.BookmarkID) as annotations
FROM content c
INNER JOIN Bookmark b ON b.VolumeID = c.ContentID
WHERE c.ContentType = 6
GROUP BY c.ContentID
ORDER BY c.DateLastRead DESC;
"
Get highlights for a book:
sqlite3 -readonly /path/to/KoboReader.sqlite "
SELECT b.Text, b.Annotation, b.DateCreated
FROM Bookmark b
INNER JOIN content c ON b.VolumeID = c.ContentID AND c.ContentType = 6
WHERE c.Title LIKE '%BookTitle%'
ORDER BY b.ChapterProgress;
"
Kindle stores clippings at documents/My Clippings.txt on the mounted device. Entries are separated by ========== with format: title line, metadata line, blank line, highlighted text.
Boox exports one .txt file per book into a directory (boox-export/, Export/, note/, or Notes/ on the device). Files are named BookTitle-annotation-YYYY-MM-DD_HH_MM_SS.txt.
If auto-detection doesn't find your device, point to the data source directly:
| Variable | Description |
|---|---|
KOBO_DB_PATH | Path to KoboReader.sqlite |
KINDLE_CLIPPINGS_PATH | Path to My Clippings.txt |
BOOX_EXPORT_PATH | Path to Boox annotation export directory |
KINDLE_SCRIBE_PATH | Path to Kindle mount root or .notebooks directory |
KINDLE_SCRIBE_CONVERTER | Command for Kindle Scribe rendering (default: calibre-debug) |
BOOX_NOTE_RENDERER | Command for Boox backup rendering (default: onyx_render.py) |
Book: title, author, source, content_id, isbn, publisher, subtitle, description, language, series, series_number, annotation_count, last_read, percent_complete, time_spent_minutes, read_status
Annotation: book_title, author, highlighted_text, source, note, chapter, chapter_progress, date_created, date_modified, bookmark_type
ReadingProgress: title, author, percent_read, time_spent_minutes, last_read, read_status, source
backend_name parameter to specify which e-reader to query, or db_path to point to a specific data source.