
iWork Studio
io.github.Arkanjiv2.4.1Updated Oct 4, 2026
Create, edit, design and export Apple Numbers, Keynote and Pages files. Verified and Arabic-safe.
Overview
Lets an assistant create, edit, design, review and export Apple Numbers, Keynote and Pages files on a Mac.
- What it does
- Provides 64 tools across Numbers, Keynote and Pages: reading cells, slides and text; creating files from data, CSV or templates; editing cells, formulas, slides, notes and placeholders; applying design kits and brand fonts and colours; reviewing rendered decks for overflow and small text; and exporting to PDF, Excel, PowerPoint, Word, EPUB and images. Writes are backed up, re-read and compared, then swapped in atomically, and can be undone. Some routes work headlessly in pure Python, while others drive the real iWork apps.
- When to use it
- Useful when an assistant needs to produce or restyle real iWork documents on a Mac, such as building a Keynote deck from an outline or a Numbers table, formatting a spreadsheet, filling a Pages template, or exporting decks to PowerPoint. Not suitable for non-Mac environments or for Pages documents needing new tables or page-layout bodies.
- Requirements
- Runs locally on macOS via uvx from the iwork-studio PyPI package; the installer sets up uv and its own Python. App-driven features need a logged-in GUI session with Keynote, Pages and Numbers installed, plus a one-time macOS Automation permission grant. IWORK_STUDIO_ROOTS optionally limits which folders may be touched.
Installation
In SourceWeft
- Open iWork Studio in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
[CI] [Version] [License: MIT] [iWork] [MCP server] [Arabic safe] [Undo]
Give your AI the keys to Apple iWork.
Create, edit, format, theme and export Numbers, Keynote and Pages files from Claude or any AI agent.
Every write is backed up, checked and swapped in atomically, and any change can be undone with one call.
Install · What it can do · Safety · All 64 tools · For AI agents · Changelog
[iWork Studio in action: an AI agent edits a Numbers cell and keeps its formula, updates every Keynote slide without touching the formatting, and writes an Arabic letter in Pages]
Install
That's it. The installer sets up uv if needed, and uv brings its own Python.
- Fence it (recommended):
… | sh -s -- --roots ~/Documents ~/Desktoplimits it to those folders. Other clients: setIWORK_STUDIO_ROOTS(:-separated). - First run: macOS asks once whether Claude may control Keynote / Pages / Numbers. Click OK. (Missed it? System Settings → Privacy & Security → Automation.)
- Check it: ask "what can iwork-studio do on this Mac?".
- Remove:
uvx --from git+https://github.com/Arkanji/iwork-studio iwork-studio-mcp uninstall
AI agent setting this up for someone? Pick the row for their app, run it, then call
iwork_capabilities. Rules for using the tools are inAGENTS.md.
Just ask, in English or Arabic
"Build a 6-slide pitch deck on programmable gift cards in the midnight kit, with speaker notes, and export it to PowerPoint."
"Turn sales.numbers into a board deck: chart the quarters, a table of the top regions, in our Resal kit."
"Take the fonts and colours from brand.key and save them as our Resal kit."
"Review pitch.key and fix anything that overflows or is too small to read."
"Make budget.numbers look professional with the banking kit — and show me a preview first."
"Turn sales.csv into a Numbers file, make the header bold on a teal fill, show column B as SAR with two decimals, and add a total row."
"In pitch.key, switch to the Gradient theme, make the title on slide 1 white at 60 pt, add a dissolve between every slide, and put logo.png on the last slide."
"Add a bar chart of revenue by quarter for 2025 and 2026 to slide 4."
"Duplicate slide 3, move the copy to the front and add presenter notes: ملاحظات المتحدث"
"Fill the Name and Date fields in offer-letter.pages, then export it as a password-protected PDF."
"In the invoice.pages table, set the quantity in B3 to 12 and make D9 the total of D2:D8."
"Find my Keynote decks from this week and export each one to PowerPoint."
"Undo the last change to budget.numbers."
What it can do
⚡ = works anywhere, no app needed (pure Python). Everything else drives the real app on a Mac with a logged-in session, classic iWork or the Creator Studio apps.
Every file type: preview any change before it's made (dry_run), look up metadata, pull the preview thumbnail, find files with Spotlight, check that a word is visibly rendered, check the rendered font/size/colour, list backups and undo.
What it won't do
On purpose, so it never breaks a file:
- Files with charts are refused by the tools that work without the app: their rewrite can silently break a chart's link to its data. The app-driven tools (Keynote slides, theming, transitions, images; Numbers formulas and sort) work on them and check every chart is still there.
- Charts in Numbers and Pages can't be created: Apple doesn't make them scriptable. Keynote charts can be added.
- Pages is limited to text and existing tables: replace, set body, placeholders and table cells. New tables can't be created (Pages 15 doesn't script it), and page-layout documents, like most letter templates, have no body text. There is no Pages file format parser anywhere, so it doesn't fake one.
- Formulas and row shifts: in a table that has formulas, rows and columns can only be appended without the app. Inserting in the middle would leave references pointing at the wrong cells.
- Not scriptable by Apple, so not offered: Numbers table styles, Keynote shape fill and text alignment, deleting a Keynote table, editing a theme's master slides. Page margins and page setup are planned.
Designed, not just edited
Six design kits turn a plain deck or table into something you'd present: a font pair (Latin + Arabic, all bundled with macOS — nothing to install), a restrained palette checked for WCAG contrast, and a type scale.
Build with one (keynote_build_deck(..., kit="midnight")), restyle anything (keynote_apply_design, numbers_apply_design), or bring your brand as colours and fonts — contrast is checked. Agents also get a design guide: one idea per slide, titles that state the takeaway, right-aligned numbers, restrained colour.
Your brand, once. Point iwork_extract_design_kit at a deck or table that already has your look: it reads the fonts (Latin and Arabic) and colours, and saves them as a named kit you can use anywhere a kit goes. Or save your colours and fonts directly with iwork_save_design_kit.
Numbers on slides. A slide in keynote_build_deck can carry a chart or a table, from data or straight from a Numbers table: the header row gives the columns, the first column the rows. Tables get the kit's header band, fonts, banding and right-aligned numbers, and every cell is read back.
It checks its own work. keynote_review_deck renders the deck through Keynote and compares every drawn line with its text box: text off the slide or running past its box is an error; text Keynote had to shrink to fit, overlapping boxes, text under 18 pt and crowded slides are warnings. keynote_slide_image hands a slide back as an image, so an agent can look before it says "done".
The safety model
An iWork app will happily say "saved" about a file it just broke. Nothing here trusts "saved".
- Backup first, versioned, next to the file in
<file>.backups/. - Re-read and compared: exactly the requested change happened, and nothing else did. A cell edit checks every other cell. A row insert checks every cell at its new position. A slide op checks every other slide. A sort checks it's a pure reorder. On files with charts, every chart is counted before and after; on decks with tables, every table's cells are compared. An export is read back with a second, independent tool.
- Atomic swap: the file is replaced in one step, so a crash can't leave half a file.
- The app's "ok" is never trusted. App-driven writes are re-read from disk, and a write that "succeeded" but didn't land is rolled back.
- Undo is one call:
iwork_list_backups→iwork_restore_backup. The restore backs up the current version first, so undo can be undone too. - Preview first: every write takes
dry_run=true. It runs the real change on a throwaway copy, with every check, and shows exactly what would change. Your file isn't touched. - New files never overwrite an existing one.
- Refuse, don't mangle. The worst case is a clear "no", never a broken file.
Arabic & RTL
- Arabic text round-trips exactly in all three apps, including presenter notes, Pages placeholders and Pages table cells.
- Paragraph direction is checked in Pages. A replace that flips a right-to-left paragraph to left-to-right is rolled back. Pages writes new paragraphs left-to-right, even Arabic ones, and scripting can't change that, so those are flagged: set the direction in Pages (Format › Text).
- Values are kept as typed: Arabic-Indic digits (
١٢٣),"$1,234.56"and=…text stay text. Pass a real number when you want a number. - When checking a rendered PDF, assert one Arabic word. PDF text layers reorder multi-word RTL text.
All 64 tools
Writes are marked destructive and reads read-only, so clients can ask before writing. Every write that changes an existing file takes dry_run=true for a preview. Every tool has a title, every parameter a description, and every tool says when to use it instead of its siblings.
Any file (17)
Numbers (17)
Keynote (23)
Pages (7)
Keynote slide, theme, transition and image tools refuse a deck that's open in Keynote (they never close a window that may hold unsaved work). To hide them all: IWORK_STUDIO_DISABLE_SLIDE_OPS=1.
Prompts. Clients that show MCP prompts get four ready-made workflows: Pitch deck from an outline, Report deck from a Numbers table, Restyle with my brand and Make this table look designed. Each writes to the design rules, builds in one call, previews before restyling, and runs the design review before it calls the job done.
For AI agents
AGENTS.md: setup and usage rules for any agent (Codex, Cursor, Copilot, Gemini; Claude Code reads it viaCLAUDE.md).- MCP instructions: the server sends its rules on connect, so the model has them even without this repo.
- Skill:
skill-pack/SKILL.md, auto-discovered by Claude Code in this repo, orbash skill-pack/install.shfor other skill-based agents. It includes CLI scripts with JSON output for agents without MCP. llms.txt: a short machine-readable summary.
The contract: JSON in, JSON out. Errors are typed and say what to tell the user: ChartRefusalError, DocumentOpenError, PagesOutOfScopeError, AquaSessionError (no Mac GUI here) and so on. Don't retry a refused write with a trick.
Python
Traps we mapped so your agent doesn't hit them
save in <path>is denied by the iWork sandbox. In-placesaveandexportwork. →sandbox-trap.md- Keynote's slide
title/bodyproperties throw-1700. Use the text item'sobject text. →keynote-1700-defect.md - Chart files corrupt quietly when the file-level libraries rewrite them, so those routes refuse them. When the app makes the edit it keeps its own charts linked, so app-driven routes allow them and count every chart before and after.
- Byte-equal saves don't exist in iWork's format. The real bar is semantic: it reopens, and the full model matches.
- First-run permission and template-chooser dialogs block every script call. A preflight turns the hang into one clear prompt. →
tcc-preflight.md - "Creator Studio" apps have different names. A hardcoded
Application("Numbers")drives the wrong app; names are resolved per call. →apps.py - stdout is the MCP wire. Import-time warnings from libraries would corrupt it, so they go to stderr.
- Keynote's JavaScript insert and move are broken; AppleScript
make new slideandmove slide … to before slide …work. - Keynote master slides can't be reached from JavaScript (
-1700); layouts go through AppleScript. - numbers-parser doesn't save in-place style edits. Styles are registered first, then applied.
- numbers-parser stored 12 as 12.000000000000002. Decimals are now encoded exactly.
- numbers-parser doesn't update formula references when rows move, so mid-table inserts in formula tables are refused.
- Keynote colours are 0–65535 per channel, not 0–255 or 0–1.
- Pages page-layout documents have no body text (
bodyText()is null), and most letter and flyer templates are page layout. Placeholders are filled and checked across every text box instead. - Pages tables are invisible to JavaScript scripting but readable and writable from AppleScript; creating tables is broken in Pages 15, so only existing tables are offered.
- The Pages sandbox refuses AppleScript
openfor files outside it; JavaScriptopenis allowed, so documents are opened that way and then found by their exact path. - numbers-parser can break formulas on re-save (an upstream report). Every no-app write compares every formula, so a broken one is caught and nothing changes.
- Numbers doesn't recalculate formulas when it opens a file changed without it: a total keeps its old result. Edits made without the app say so, and
numbers_recalculatehas Numbers recompute every formula. - A rounding library used by numbers-parser wipes every warning filter in the process on each save. It's wrapped so it stays quiet without touching anyone else's settings.
- Don't keep the repo in iCloud Drive. Sync creates "main 2" copies inside
.git. - Keynote creates tables only one way:
tell slide n to make new tableworks, whilemake new table at end of tables of slide nand deleting a table fail with-10000. A failed table add is undone by restoring the backup.
More, each with its status: jxa-traps.md (including traps borrowed from reichenbach/iwork_mcp).
How it's built
Contributing
iWork changes between releases. If something breaks, check the capabilities and traps, run the live suite, and pin what changed. New write routes must follow the safety model and come with tests that prove the rollback. Clone outside iCloud-synced folders.
License
MIT, traps included. Take them.
Source: README.md at commit 17a08d3
Tools
0Version history
1- v2.4.1LatestOct 4, 2026

