
Apple Books
io.github.vgnshiyer由 GitHub 帳號 vgnshiyer 發布v0.9.0更新於 Oct 24, 2026
Access your Apple Books library, annotations, reading progress, and highlights through Claude
概覽
一個本機 macOS MCP 伺服器,讓助理讀取你的 Apple Books 書庫、閱讀進度、畫線與註記,並可選擇性地編輯選集。
- 可以做什麼
- 依書名、作者或類型瀏覽與搜尋書籍,查看書籍詳情、閱讀進度與「在 Books 中開啟」連結,並支援分頁。依閱讀狀態篩選書籍:閱讀中、已讀完、未開始或最近閱讀。列出、搜尋與檢視註記和筆記,依顏色或日期範圍篩選畫線,並取得畫線所在的段落。讀取非 DRM EPUB 的目錄與純文字章節,包括你目前正在讀的章節。列出、檢視與搜尋選集;啟用寫入後可建立、重新命名、刪除選集以及加入或移除書籍。查看整個書庫的閱讀統計,另有「目前閱讀」資源與每週摘要等提示詞。
- 適用情境
- 當你希望助理處理自己的 Apple Books 閱讀內容時使用:總結本週讀了什麼、回顧並歸類畫線、結合上下文解釋某條畫線,或取出你上次讀到的章節。適合把閱讀放在 Apple Books 中、並希望在 Claude Desktop 或 Claude Code 裡使用該資料庫的 macOS 使用者。
- 執行需求
- macOS,且至少開啟過一次 Apple Books;需要 Python 3.10 或更新版本(uvx 或 Claude Desktop 擴充功能可提供)。可透過 uvx、pip 或 .mcpb 擴充功能安裝;Docker 映像已棄用且僅部分可用。首次執行時 macOS 需授予啟動程式「取用其他 App 的資料」權限。選用環境變數:APPLE_BOOKS_DATA_DIR、APPLE_BOOKS_MCP_ENABLE_WRITES、APPLE_BOOKS_MCP_THREADS、APPLE_BOOKS_QUERY_TIMEOUT。無需帳號或 API 金鑰。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Apple Books,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Apple Books MCP
Model Context Protocol (MCP) server for Apple Books.
[Website] [圖片] [PyPI] [License: Apache 2.0] [圖片] [Buy Me A Coffee]
At a glance
- Pick up where you left off — Claude sees the book you're reading, your progress and the chapter you're on, and pulls that chapter's text (
chapter_id="current") and your highlights when it needs them. - Find any book — by title or author, ignoring case, accents and curly quotes, with a link that opens it in Apple Books.
- Expand on any highlight — get the surrounding paragraph explained in context, with the exact anchor you marked shown in
«...». - Revisit a book — pull your highlights, cluster them by theme, and quote you back to yourself.
- Reflect on your reading — patterns across books, recurring ideas in your highlights, what you're actually drawn to.
https://github.com/user-attachments/assets/77a5a29b-bfd7-4275-a4af-8d6c51a4527e
And much more!
Available Tools
List and search tools return one page at a time: 50 annotations or 200 books by default, limit between 1 and 500, and offset for the next page. When there is more, the output says so and names the next offset.
How results work:
- Ids are integers: every row starts with one, as in
[175] Title by Author, to pass on asbook_id,annotation_idorcollection_id. A numeric string such as"175"is accepted too;true,falseand fractions are not ids. - A failure (an unknown id, a book that isn't downloaded, a bad
color) comes back as an MCP error (isError) whose message names what to do next, often another tool to call. An empty result ("No books matched …") is a normal answer, not an error. - Text taken from your books (chapter text, the passage around a highlight, a table of contents, a book's description) is wrapped in
<book_text>…</book_text>. The server's instructions tell Claude that this text is untrusted data from the book, never instructions to follow. - Highlights from books you've removed from the library are kept by Apple Books. They are shown per removed book, as "Removed book (asset 3F2A1B2C…)", after the books still in your library.
Collections
Editing collections (opt-in)
Off by default. Enable by adding --enable-writes to the server args:
With the Claude Desktop extension, turn on Allow editing collections in the extension's settings instead.
Apple provides no automation API for collections, so these write directly to the library database — behind guard rails: every write refuses while Books is open, takes an automatic WAL-safe backup first (~/.py_apple_books/backups/), validates the schema and aborts on drift, and only touches user-created collections (plus "Want to Read" membership). Deleting a collection never deletes the books in it.
⚠️ If iCloud sync for collections is enabled, direct edits may not propagate to other devices and can be reverted by a cloud re-sync.
Books
describe_book has a Readable text line saying whether the chapter tools can read the book, and if not why: yes (EPUB), a PDF, DRM-protected, not downloaded (in iCloud only, an Apple Books Store title, or never downloaded) or a missing file. It is worked out from the library's records and file metadata, without opening the book: reading a file that is only in iCloud would make macOS download it.
Open in Books links (ibooks://assetid/…) open the book in Apple Books. They appear in describe_book, describe_annotation, get_current_reading_position and the Currently Reading resource.
Reading Status
Annotations
Library Stats
Book Content
Only works for non-DRM EPUBs downloaded to this Mac (imported books, Project Gutenberg, Standard Ebooks, etc.). Apple Books Store purchases are usually FairPlay-protected and return a clear error, and iCloud-only books a "not downloaded" hint; describe_book's "Readable text" line tells in advance.
Available Resources
Attachable data objects accessible from Claude Desktop's resource picker.
Available Prompts
One-click workflows, accessible from Claude Desktop's prompt picker.
Installation
Requirements
- macOS, with Apple Books opened at least once (it creates the library the server reads).
- Python 3.10 or newer. uvx and the Claude Desktop extension provide one if needed.
- Installed with the server:
mcp>= 1.12 (< 2) andpy-apple-books>= 1.10 (< 2).
Using uv (recommended)
uvx runs apple-books-mcp without a separate install step.
The first run downloads about 14 MB of dependencies and can take up to a minute, which is close to how long Claude waits for a server to start. Running the command above once in Terminal warms uv's cache before you add the server to Claude. --version prints the apple-books-mcp, mcp and py-apple-books versions uvx resolved.
Then add the server to Claude with the JSON config or the Claude Code command below.
Claude Desktop extension (.mcpb)
Claude Desktop can also install apple-books-mcp as an extension, without editing its config: download apple-books-mcp-<version>.mcpb from the latest GitHub release, double-click it (or open Settings → Extensions → Install Extension… and pick the file), and click Install. Desktop installs uv and the locked dependencies itself. Allow editing collections in the extension's settings does the same as --enable-writes.
On organization-managed Claude (Team/Enterprise), admins can limit Desktop Extensions to an allowlist or turn them off. If the .mcpb install is refused, use the JSON config below. If user-added MCP servers are also disabled by policy, ask your admin to approve the extension.
Using pip
Needs Python 3.10 or newer (the python3 that ships with macOS is 3.9). Install into a virtual environment:
Upgrade later with ~/.venvs/apple-books-mcp/bin/pip install -U apple-books-mcp.
Using Docker (deprecated)
⚠️ The Docker image is deprecated and only partly works: a Linux container can't be granted the macOS permission, can't reach book files stored in iCloud Drive (so the tools that read book text fail), and can't tell whether Books is running (so collection writes are unsupported). Use uvx instead.
It can still serve library metadata and annotations. Mount the Apple Books container read-only and keep stdin open with -i. The image runs as an unprivileged user and reads the library from the same mount path as before:
In a Claude config, spell out your home directory: Claude doesn't expand ~.
First-run permission prompt (macOS)
The first time the server reads your library, macOS asks whether the program that started it may "access data from other apps", because Apple Books keeps its library in its own app container (~/Library/Containers/com.apple.iBooksX/). Click Allow.
[macOS permission prompt: uvx would like to access data from other apps. Don't Allow / Allow.]
macOS asks about the program Claude launches, not about apple-books-mcp itself:
uvxwith the recommended Claude Desktop config (the prompt above);- the Python interpreter with the pip config;
claudewhen the server is configured in Claude Code;- your terminal app when you run the server by hand.
The permission belongs to that program, so anything else it launches can use it too. apple-books-mcp only reads the library, plus the book files for chapter text; it changes nothing unless you pass --enable-writes.
To check, run uvx apple-books-mcp --doctor in Terminal: it reports whether the program running it may read the library and, if not, how to fix it. Run that way it checks your terminal app's permission, which macOS asks about separately from uvx or Claude.
Asked again after an update? Homebrew's uv/uvx and Homebrew or uv-managed Python builds aren't signed by a registered developer, so after brew upgrade uv (or a Python upgrade) macOS treats them as a new program and asks again. Click Allow.
Clicked "Don't Allow"? Tools then fail with "macOS denied access to the Apple Books library". (Older releases failed at startup instead, with "No sqlite files found in … Please open Apple Books at least once".) This permission has no switch in System Settings. To be asked again, run:
This clears the "data from other apps" decisions for all apps. Then quit and reopen Claude, and click Allow. Adding the program (e.g. /opt/homebrew/bin/uvx) to Full Disk Access in System Settings > Privacy & Security also works, but grants far more access.
Configuration
Claude Desktop Setup
Quit Claude Desktop (Cmd+Q) before editing ~/Library/Application Support/Claude/claude_desktop_config.json: Desktop rewrites the file while it runs, so edits made while it's open can be lost.
Using uvx (recommended)
Plain apple-books-mcp still picks up new releases: uv checks PyPI for a newer version whenever its cached copy of the package index is more than 10 minutes old, which is usually the case when Claude starts. apple-books-mcp@latest gains nothing over that and makes uv build a fresh environment on every launch (3–12 s instead of about 1 s).
Faster or offline startup
Because uvx checks PyPI at launch, the server won't start while PyPI is unreachable. To avoid that:
- Run
uv tool install apple-books-mcponce. The same uvx config then uses the installed copy and starts in about a second without contacting PyPI. Installed copies don't update themselves: runuv tool upgrade apple-books-mcpto get new releases. - Or use
"args": ["--offline", "apple-books-mcp"]to run whatever version uv has already cached (after at least one online run), without any network access.
Using pip
Point Claude at the script inside the virtual environment from Using pip, with your home directory spelled out:
Claude Code Setup
Claude Code doesn't read the Claude Desktop config. Add the server with:
and check it with /mcp.
Environment variables
Set these in the server's "env" in the Claude config (e.g. "env": {"APPLE_BOOKS_MCP_THREADS": "4"} next to "args"), or with claude mcp add -e NAME=value.
Troubleshooting
Where to look
uvx apple-books-mcp --doctorin Terminal checks the versions, finds the library, explains macOS permission problems and prints counts of what it read. It only reads, and never prints titles or text.~/Library/Logs/Claude/mcp-server-apple-books-mcp.log(named after yourmcpServerskey) has the server's own output, including Python tracebacks. For more detail, add"-v"to the args: the server then logs its version, the mcp and py-apple-books versions it runs with, and each request.~/Library/Logs/Claude/mcp.loglists failures. Its "Server started and connected successfully" line only means the process was launched, not that it works.~/Library/Logs/Claude/main.logrecords "Connected to apple-books-mcp (N tools)" when a Claude Code or Cowork session in Desktop loaded the tools.uvx apple-books-mcp --versionin Terminal shows which versions uvx resolves.
Common problems
- "Connection closed", "Server disconnected" or "Server transport closed unexpectedly": the server exited at startup. Read the last error in the traceback in
mcp-server-apple-books-mcp.log.No module named 'mcp.server.fastmcp': uv picked an apple-books-mcp release older than 0.8.1 together with mcp 2.x, which removed the API those releases were built on (on Python 3.12 and older, uvx could even fall back to 0.1.2). 0.8.1 and newer work with Python 3.10+ and stay on mcp 1.x. Runuv cache clean apple-books-mcp, check thatuvx apple-books-mcp --versionreports 0.8.1 or newer, then quit and reopen Claude.- A
No module named 'server'error in front of the real one is noise from releases before 0.8.4.
- "Not ready after 60 seconds" or "Request timed out" at startup: the first launch was still downloading and installing dependencies. Run
uvx apple-books-mcp --versiononce in Terminal, then reopen Claude. - "macOS denied access to the Apple Books library" (older releases: "No sqlite files found in …"): see First-run permission prompt.
- "No Apple Books library store found": Apple Books hasn't created its library for this macOS user yet. Open Books once, then try again.
- Stopping a response while a tool runs: since 0.9 a stopped tool call is answered immediately and the server keeps serving other sessions; the call's remaining work finishes in the background (a write that had already started still completes; one that hadn't started never runs).
- "Extension apple-books-mcp not found in installed extensions" in
main.logis harmless.
Getting Claude to retry
- Claude Desktop chats: quit Claude completely (Cmd+Q) and reopen it. A server that failed to start isn't retried otherwise.
- Claude Code and Cowork sessions in Desktop: start a new session; each new session retries the server.
- Claude Code: run
/mcpand reconnect apple-books-mcp, or restart Claude Code.
Upcoming Features
- Highlight export: a book's highlights and notes in reading order, with chapter headings
- Fewer, broader tools in 1.0, where today several overlap
- Titles for removed books, where Apple Books' caches still hold them
- PDF content access (currently EPUB-only)
Contribution
Thank you for considering contributing to this project!
Development
Clone the repository and let uv create the virtual environment and install the package with its dependencies:
To build the Claude Desktop extension locally, install the pinned packer, then build:
This writes dist/apple-books-mcp-<version>.mcpb and the registry's dist/server.json (--out DIR picks another folder). python scripts/build_mcpb.py --smoke dist/apple-books-mcp-<version>.mcpb installs the bundle the way Claude Desktop does and checks the server it starts.
Maintainers: publishing a GitHub release runs the release workflow, which checks the tag against every version field, publishes to PyPI, attaches the .mcpb to the release and publishes to the MCP Registry.
Debugging
Logs go to stderr, which Claude Desktop writes to ~/Library/Logs/Claude/mcp-server-<name>.log. Without flags the server logs only warnings and errors; -v adds startup details (versions, whether writes are enabled) and a line per request; -vv adds debug output from the MCP SDK.
With Claude Desktop
With inspector
Opening Issues
If you encounter a bug, have a feature request, or want to discuss something related to the project, please open an issue on the GitHub repository. When opening an issue, please provide:
Bug Reports: Describe the issue in detail. Include steps to reproduce the bug if possible, along with any error messages or screenshots.
Feature Requests: Clearly explain the new feature you'd like to see added to the project. Provide context on why this feature would be beneficial.
General Discussions: Feel free to start discussions on broader topics related to the project.
Contributing
1️⃣ Fork the GitHub repository https://github.com/vgnshiyer/apple-books-mcp
2️⃣ Create a new branch for your changes (git checkout -b feature/my-new-feature).
3️⃣ Make your changes and test them thoroughly.
4️⃣ Push your changes and open a Pull Request to main.
Please provide a clear title and description of your changes.
License
Apple Books MCP is licensed under the Apache 2.0 license. See the LICENSE file for details.
來源:README.md,提交 e6abd5c
工具
0版本歷史
4- v0.9.0最新Oct 1, 2026
- v0.8.4Sep 30, 2026
- v0.8.2Sep 29, 2026
- v0.8.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分