Apple Books — Claude Code MCP server: what it does, how to install
Connects your Apple Books library, reading progress, and annotations to your AI coding assistant on macOS.
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-mcpWhat Apple Books 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.
What it helps with
- 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-writesflag
Example prompts for the agent
- 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.
How to install Apple Books
Platform CLI
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-mcpReplace <…> 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>
Platform CLI
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-mcpReplace <…> 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>
Config file
{
"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>
Config file
{
"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>
Platform CLI
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-mcpReplace <…> 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>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Apple Books
How to install Apple Books in Claude Code?
Run claude mcp add apple-books-mcp -- uvx apple-books-mcp in your terminal.
What does Apple Books MCP server do?
It lets your model search your local Apple Books catalog, retrieve highlights, check reading progress, and inspect collections.
Can the server edit book collections?
Yes, if started with the --enable-writes argument. It rejects writes when Books is open, saves backups to ~/.py_apple_books/backups/, but iCloud sync may undo changes.