# Apple Books

Connects your Apple Books library, reading progress, and annotations to your AI coding assistant on macOS.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 63
- Author: vgnshiyer
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/vgnshiyer/apple-books-mcp
- Updated: 2026-10-16
- HTML: https://affpapa.org/en/nevibecode/mcp/apple-books

## What it does

The server inspects the local Apple Books database on macOS. It exposes tools to look up titles or authors, inspect reading progress, and pull annotations with surrounding paragraphs. Extracted excerpts are wrapped in `<book_text>` tags, which prevents the language model from treating book passages as prompt instructions.

Modifying collections is disabled out of the box. Changing or creating collections requires the `--enable-writes` flag. The server refuses write operations while Apple Books is running and stores automatic backups under `~/.py_apple_books/backups/`. Active iCloud sync can overwrite direct collection modifications during background synchronisation.

Chapter extraction functions exclusively on downloaded EPUB files. The tool checks file metadata beforehand, so DRM-locked titles or assets stored only in iCloud cannot be read.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `APPLE_BOOKS_MCP_ENABLE_WRITES`, `APPLE_BOOKS_DATA_DIR`, `APPLE_BOOKS_MCP_THREADS`, `APPLE_BOOKS_QUERY_TIMEOUT` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env APPLE_BOOKS_MCP_ENABLE_WRITES=<APPLE_BOOKS_MCP_ENABLE_WRITES> --env APPLE_BOOKS_DATA_DIR=<APPLE_BOOKS_DATA_DIR> --env APPLE_BOOKS_MCP_THREADS=<APPLE_BOOKS_MCP_THREADS> --env APPLE_BOOKS_QUERY_TIMEOUT=<APPLE_BOOKS_QUERY_TIMEOUT> --transport stdio apple-books -- uvx apple-books-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from apple-books-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add apple-books --env APPLE_BOOKS_MCP_ENABLE_WRITES=<APPLE_BOOKS_MCP_ENABLE_WRITES> --env APPLE_BOOKS_DATA_DIR=<APPLE_BOOKS_DATA_DIR> --env APPLE_BOOKS_MCP_THREADS=<APPLE_BOOKS_MCP_THREADS> --env APPLE_BOOKS_QUERY_TIMEOUT=<APPLE_BOOKS_QUERY_TIMEOUT> -- uvx apple-books-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from apple-books-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "apple-books": {
            "command": "uvx",
            "args": [
                "apple-books-mcp"
            ],
            "env": {
                "APPLE_BOOKS_MCP_ENABLE_WRITES": "<APPLE_BOOKS_MCP_ENABLE_WRITES>",
                "APPLE_BOOKS_DATA_DIR": "<APPLE_BOOKS_DATA_DIR>",
                "APPLE_BOOKS_MCP_THREADS": "<APPLE_BOOKS_MCP_THREADS>",
                "APPLE_BOOKS_QUERY_TIMEOUT": "<APPLE_BOOKS_QUERY_TIMEOUT>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from apple-books-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "apple-books": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "apple-books-mcp"
            ],
            "env": {
                "APPLE_BOOKS_MCP_ENABLE_WRITES": "<APPLE_BOOKS_MCP_ENABLE_WRITES>",
                "APPLE_BOOKS_DATA_DIR": "<APPLE_BOOKS_DATA_DIR>",
                "APPLE_BOOKS_MCP_THREADS": "<APPLE_BOOKS_MCP_THREADS>",
                "APPLE_BOOKS_QUERY_TIMEOUT": "<APPLE_BOOKS_QUERY_TIMEOUT>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from apple-books-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e APPLE_BOOKS_MCP_ENABLE_WRITES=<APPLE_BOOKS_MCP_ENABLE_WRITES> -e APPLE_BOOKS_DATA_DIR=<APPLE_BOOKS_DATA_DIR> -e APPLE_BOOKS_MCP_THREADS=<APPLE_BOOKS_MCP_THREADS> -e APPLE_BOOKS_QUERY_TIMEOUT=<APPLE_BOOKS_QUERY_TIMEOUT> apple-books uvx apple-books-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from apple-books-mcp <command>

## When to use it
- pull highlights and user notes for a specific book
- retrieve lists of in-progress or completed books
- inspect reading progress across the local library
- manage custom collections using the `--enable-writes` flag

## Example prompts
- Show the books I am currently reading in Apple Books.
- Pull all my annotations from book ID 175.
- List the books I recently finished reading.

## Similar
- [Reactive Resume](https://affpapa.org/en/nevibecode/mcp/reactive-resume.md) — MCP server · ★ 44874
- [screenpipe](https://affpapa.org/en/nevibecode/mcp/screenpipe.md) — MCP server · ★ 22053
- [Inbox Zero](https://affpapa.org/en/nevibecode/mcp/inbox-zero.md) — MCP server · ★ 12791
- [kaneo](https://affpapa.org/en/nevibecode/mcp/kaneo.md) — MCP server · ★ 9602
- [Mindwtr](https://affpapa.org/en/nevibecode/mcp/mindwtr.md) — MCP server · ★ 2318
- [Azure DevOps (ADO)](https://affpapa.org/en/nevibecode/mcp/azure-devops-ado.md) — MCP server · ★ 2067

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
