iwork-studio is an open-source project designed to let AI safely edit Apple iWork suite files, including Numbers spreadsheets, Keynote presentations, and Pages documents. It provides an MCP server, a Python library, and an agent skill package for Claude and other MCP clients.
Purpose
The core purpose of this tool is to let AI agents operate on iWork files under controllable, verifiable, and rollback-capable conditions. It supports generating designed presentations from data, applying brand design kits, editing tables and formulas, exporting to PowerPoint or PDF, and more. At the same time, it places special emphasis on the safe handling of Arabic and RTL (right-to-left) text.
Main capabilities
- Design kits: Built in are six design kits, each containing a Latin and Arabic font pair (both provided with macOS, no additional installation required), restrained color schemes that have passed WCAG contrast checks, and font size hierarchies. You can build directly with
keynote_build_deck(..., kit="midnight"), or redesign existing files withkeynote_apply_design、numbers_apply_design. - Brand extraction:
iwork_extract_design_kitcan read fonts (Latin and Arabic) and colors from existing presentations or spreadsheets and save them as a named kit; you can also useiwork_save_design_kitto directly save colors and fonts. - Numbers data in slides: Slides in
keynote_build_deckcan carry charts or tables, and the data can come from a Numbers table, with the header row as columns and the first column as rows. Tables apply the kit's header band, fonts, zebra striping, and right-aligned numbers, and every cell is read back and verified. - Design review:
keynote_review_deckrenders the presentation through Keynote and compares each drawn line with text boxes: text extending beyond the slide or beyond the text box is an error; Keynote being forced to shrink text, overlapping text boxes, text smaller than 18pt, and slides that are too crowded are warnings.keynote_slide_imagecan export slides as images for the agent to review before confirming completion. - File operations: Supports previewing any change (
dry_run), querying metadata, getting preview thumbnails, finding files with Spotlight, checking whether a word is visibly rendered, checking the rendered font/size/color, and listing backups and undos. - Arabic support: Arabic text round-trips precisely in all three apps, including speaker notes, Pages placeholders, and Pages table cells.
How to use
Installation is done through uvx , and the installer sets up uv when needed; uv comes with Python. It is recommended to use --roots to restrict accessible folders, for example --roots ~/Documents ~/Desktop. Other clients can set the IWORK_STUDIO_ROOTS environment variable (separated by : ).
Optionally reduce the loaded toolset: set IWORK_STUDIO_TOOLSETS=keynote,design(possible values:files、numbers、keynote、pages、design, default all). The Claude Desktop extension has a Toolsets field; in Claude Code you can use claude mcp add iwork-studio -e IWORK_STUDIO_TOOLSETS=keynote,design -- uvx --from iwork-studio@latest iwork-studio-mcp .. Capabilities, read, find, undo, and kit listing are always loaded.
On first run, macOS will ask once whether to allow Claude to control Keynote / Pages / Numbers; just click "OK". This can be adjusted in System Settings → Privacy & Security → Automation.
Uninstall:uvx --from iwork-studio@latest iwork-studio-mcp uninstall.
Example uses include: ask directly in English or Arabic, such as "copy the iWork Studio example to the desktop and turn sample-sales.numbers into a board presentation"; "build a 6-page pitch deck for a solar panel startup using the midnight kit, with speaker notes, and export it to PowerPoint"; "turn sales.numbers into a board presentation: chart it by quarter, list a table of top regions, use our Acme kit"; "extract the fonts and colors from brand.key and save them as the Acme kit"; "review pitch.key and fix anything that overflows or is too small"; "make budget.numbers look professional with the banking kit—give me a preview first"; "turn sales.csv into a Numbers file, with bold headers, cyan fill, column B shown as SAR with two decimals, and add a total row"; "switch pitch.key to the Gradient theme, with the title on page 1 in white 60pt, add a dissolve transition between each page, and put logo.png on the last page"; "add a bar chart of quarterly revenue for 2025 and 2026 on page 4"; "duplicate page 3, move the copy to the front, and add speaker notes: ملاحظات المتحدث"; "fill in the Name and Date fields in offer-letter.pages, then export it as a password-protected PDF"; "in the invoice.pages table, set B3's quantity to 12 and make D9 the total of D2:D8"; "find my Keynote presentations from this week and export each one as PowerPoint"; "undo the last change to budget.numbers".
Security model
iWork apps may say "saved" for a file that was just corrupted, so the tool does not trust "saved".
- Back up first: versioned and private, stored in
~/.iwork-studio/backups/(orIWORK_STUDIO_BACKUP_DIR), never next to the file, to avoid backups filling up or syncing iCloud Desktop and Documents. Keep the last 10 versions of each file. - Do not bypass the app: if the file is already open in Numbers, Keynote, or Pages, writes are refused, because the app's next save will silently overwrite the changes.
- Re-read and compare: confirm that exactly the requested change happened, and nothing else changed. Cell edits re-read the edited cell and check every other cell; row insertions check every cell at the new location; slide operations check every other slide; sorting checks whether it is a pure reorder and refuses early when table formulas read other rows. Files with charts count every chart before and after; presentations with tables compare every table's cells. Exports are read back with a second independent tool.
- Atomic replacement: the file is replaced in one step, and a crash will not leave half a file.
- Undo takes only one call:
iwork_list_backups→iwork_restore_backup. The current version is backed up before restore, so undo is also undoable. - Preview first: every write that changes an existing document accepts
dry_run=true(except recovery and export). It runs real changes on a disposable copy and performs all checks, showing exactly what will change, without touching the original files. - Find and replace preserves formatting: In Pages, only the paragraphs containing that text are rewritten.
- New files never overwrite existing files.
- Refuse rather than destroy: the worst case is a clear "no", never a corrupted file.
Use Cases
- Need to let an AI agent safely batch-edit or generate iWork files while retaining rollback capability.
- Need to quickly generate well-designed presentations or spreadsheets from data and apply brand standards.
- Need to handle iWork documents with Arabic or RTL text.
- Need to export iWork files to PowerPoint or PDF and ensure the export results are verifiable.
- Need design review to automatically find issues such as overflow and text that is too small in slides.
Limitations
- Chart files: Tools that do not rely on the application will refuse files containing charts, because rewriting may silently break the links between charts and data. Application-driven tools (Keynote slides, themes, transitions, images; Numbers formulas and sorting) can handle them and check that every chart is still there.
- Charts in Numbers and Pages cannot be created: they cannot be reliably scripted, and the tools choose to refuse rather than risk clicking through application menus. Keynote charts can be added.
- Pages is limited to text and existing tables: it can replace, set body text, placeholders, and table cells. It cannot create new tables (Pages 15 does not support scripting), and page layout documents (such as most letter templates) have no body text. Without a Pages file format parser, the tool will not fake one.
- Formulas and row movement: in tables with formulas, when not relying on the application, only rows and columns can be appended; inserting in the middle will cause references to point to the wrong cells.
- Features Apple does not support scripting are not provided: Numbers table styles, Keynote shape fills and text alignment, deleting Keynote tables, editing theme master slides. Margins and page setup are planned.
- Platform limitations: except for the pure Python tool, the rest require a Mac with a logged-in session, driving real applications (classic iWork or Creator Studio apps).
- First-run permission and template selection dialogs block all script calls, and preflight will convert hangsinto clear prompts.
- Do not place the repository in iCloud Drive, as synchronization will create a "main 2" copy inside .git.
Other
The project uses the MIT license. It provides AGENTS.md (setup and usage rules for any agent), MCP instructions (rules sent when the server connects), a skill pack (skill-pack/SKILL.md, automatically discovered by Claude Code, or for other skill-based agents use bash skill-pack/install.sh to install), and llms.txt (a machine-readable summary). The contract is JSON input, JSON output, with typed errors and an explanation of what to tell the user.