Skip to content

MCP server for Apple iWork automation — 89 tools for Numbers, Pages, and Keynote. Template discovery, Creator Studio AI tools, compound batch operations. One line install.

Notifications You must be signed in to change notification settings

reichenbach/iwork_mcp

Repository files navigation

iwork-mcp

MCP server for Apple iWork automation — 89 tools for Numbers, Pages, and Keynote.

One line to install. Works with Claude Desktop, Claude Code, Codex, and any MCP client.

What it does

Ask Claude to build spreadsheets, write documents, and create presentations — it controls the real iWork apps on your Mac through Apple's JavaScript for Automation (JXA) scripting bridge.

Monthly Budget in Numbers

Professional Resume in Pages

Q4 Business Review in Keynote

Numbers — Browse built-in templates (budget, invoice, schedule, etc.) or create from scratch, read/write cells and ranges, set formulas (including cross-sheet references like SUMIFS), sort rows, merge cells, format cells (fonts, colors, backgrounds, alignment, number formats like percent and currency), manage sheets and tables, set column widths and row heights, bulk-create sheets with data and formatting in one call, export to PDF/Excel/CSV.

Pages — Browse built-in templates (resume, report, letter, flyer, newsletter, etc.) or create from scratch, create documents with formatted content in one call, read and insert text at any position, find and replace (preserves formatting), format paragraphs (font, size, color), insert images and tables, export to PDF/Word/EPUB.

Keynote — Browse available themes or create with a specific theme, create presentations with multiple fully-configured slides in one call (layouts, titles, body, notes, transitions), add/delete/duplicate/reorder/skip slides, choose slide layouts from master slides, read slide content, set titles and bullet points, add images and shapes, start/stop slideshows, export to PDF/PowerPoint/HTML.

More examples

2026 Calendar in Numbers

Apple Financial Report in Numbers

Apple Q1 FY2026 Earnings — Executive Summary

Apple Q1 FY2026 Earnings — Revenue by Product

Apple Q1 FY2026 Earnings — Geographic Revenue

Apple Q1 FY2026 Earnings — Profitability

Install

Claude Desktop

npx iwork-mcp install

Then restart Claude Desktop (Cmd+Q and reopen). Done.

Claude Code

claude mcp add iwork -- npx -y iwork-mcp

Codex

codex mcp add iwork -- npx -y iwork-mcp

Requirements

  • macOS 13 Ventura or later (tested on macOS 14 Sonoma)
  • Numbers, Pages, and Keynote 14.0+ (tested on 14.5; free from the App Store)
  • Node.js 18+ (brew install node if you have Homebrew)
  • On first use, macOS will ask to grant Automation permission — click OK

iWork 15.1+ (Creator Studio): Fully supported. The new Creator Studio versions (January 2026) are auto-detected and used when available. Creator Studio subscribers get 8 additional AI tools (Magic Fill, Clean Up Slide, Super Resolution, Remove Background). See Creator Studio known issues below for export/save-as limitations.

Examples

Build a monthly budget spreadsheet in Numbers with income, expenses, and a net savings row. Color positive differences green and negative red.

Create a professional resume in Pages for a software engineer with experience at three companies, education, and skills sections.

Make a Keynote presentation for a Q4 business review with 6 slides — highlights, revenue, product milestones, and roadmap. Add presenter notes on every slide.

Open my budget spreadsheet at ~/Documents/budget.numbers and add a new row for February.

Create a 2026 calendar in Numbers with a sheet for each month, colored headers, and weekend highlighting.

Tools

Numbers (43 tools)

Tool Description
numbers_list_documents List all open documents
numbers_list_templates List available templates (e.g. Personal Budget, Invoice)
numbers_create_document Create a new spreadsheet
numbers_open_document Open a .numbers file
numbers_save_document Save a document
numbers_export_document Export to PDF, Excel, or CSV
numbers_close_document Close a document
numbers_list_sheets List sheets in a document
numbers_add_sheet Add a new sheet
numbers_rename_sheet Rename a sheet
numbers_delete_sheet Delete a sheet
numbers_list_tables List tables with dimensions
numbers_add_table Create a new table (configurable headers)
numbers_rename_table Rename a table
numbers_delete_table Delete a table
numbers_read_table Read all data as a 2D array
numbers_read_cell Read a single cell
numbers_read_range Read a specific cell range
numbers_get_table_info Get table metadata
numbers_write_cell Write a value to a cell
numbers_write_cells Batch write multiple cells
numbers_write_table Bulk write a 2D array (fast)
numbers_set_formula Set a formula on a cell
numbers_add_row Add rows with optional data
numbers_insert_row_at Insert rows at a specific position, shifting existing rows down
numbers_add_column Add a column
numbers_insert_column_at Insert columns at a specific position, shifting existing columns right
numbers_delete_row Delete rows
numbers_delete_column Delete columns
numbers_sort_rows Sort table by a column
numbers_set_header_rows Set header row count (0 removes header styling)
numbers_set_header_columns Set header column count
numbers_merge_cells Merge a cell range
numbers_unmerge_cells Unmerge cells
numbers_clear_cells Clear cell contents
numbers_format_cells Set font, size, color, bold, italic, alignment, background, number format (percent, currency, etc.)
numbers_set_column_width Set column width
numbers_set_row_height Set row height
numbers_format_range Apply multiple formatting rules to different cell ranges in one call
numbers_create_sheet_with_table Create a full sheet with table, data, and formatting in one fast call
numbers_magic_fill AI pattern fill — provide examples, fill remaining cells automatically (Creator Studio)
numbers_super_resolution AI image upscaling — increase resolution while preserving quality (Creator Studio)
numbers_remove_background AI background removal from images (Creator Studio)

Pages (19 tools)

Tool Description
pages_list_documents List all open documents
pages_list_templates List available templates (e.g. Resume, Report, Letter)
pages_create_document Create a new document
pages_open_document Open a .pages file
pages_save_document Save a document
pages_export_document Export to PDF, Word, EPUB, or plain text
pages_close_document Close a document
pages_get_body_text Read all body text
pages_get_paragraphs Get paragraphs as indexed array
pages_add_text Append text (preserves formatting)
pages_insert_text_at Insert text at a paragraph index
pages_delete_text Delete a paragraph
pages_replace_text Find and replace (preserves formatting)
pages_format_text Set font, size, color, bold, italic on a paragraph
pages_add_image Insert an image
pages_add_table Insert a table
pages_create_document_with_content Create a document with multiple formatted paragraphs in one fast call
pages_super_resolution AI image upscaling — increase resolution while preserving quality (Creator Studio)
pages_remove_background AI background removal from images (Creator Studio)

Keynote (27 tools)

Tool Description
keynote_list_presentations List all open presentations
keynote_list_themes List available themes (e.g. White, Black, Gradient)
keynote_create_presentation Create a new presentation
keynote_open_presentation Open a .key file
keynote_save_presentation Save a presentation
keynote_export_presentation Export to PDF, PowerPoint, HTML, or images
keynote_close_presentation Close a presentation
keynote_list_slides List slides with titles
keynote_get_slide_content Read all content from a slide
keynote_list_master_slides List available slide layouts
keynote_add_slide Add a slide with optional layout
keynote_delete_slide Delete a slide
keynote_duplicate_slide Duplicate a slide
keynote_reorder_slide Move a slide to a new position
keynote_skip_slide Hide/unhide a slide
keynote_set_slide_title Set slide title text
keynote_set_slide_body Set slide body / bullet points
keynote_add_image_to_slide Add an image to a slide
keynote_add_shape Add a shape with text
keynote_set_presenter_notes Set presenter notes
keynote_set_transition Set slide transition effect
keynote_start_slideshow Start playing the presentation
keynote_stop_slideshow Stop the slideshow
keynote_create_presentation_with_slides Create a presentation with multiple fully-configured slides in one fast call
keynote_clean_up_slide AI slide cleanup — auto-adjust layout, spacing, alignment, and typography (Creator Studio)
keynote_super_resolution AI image upscaling — increase resolution while preserving quality (Creator Studio)
keynote_remove_background AI background removal from images (Creator Studio)

How it works

The server runs JXA (JavaScript for Automation) scripts via osascript to control iWork apps. Each tool call is a single osascript invocation — parameters go in as JSON via argv[0], results come back as JSON via stdout.

Claude Desktop / Claude Code / Codex
  ↓ MCP protocol over stdio
iwork-mcp server (Node.js)
  ↓ child_process.execFile
/usr/bin/osascript -l JavaScript
  ↓ JXA scripting bridge
Numbers.app / Pages.app / Keynote.app

Development

git clone https://github.com/reichenbach/iwork_mcp.git
cd iwork-mcp
npm install
npm run build

Testing

npm test              # Unit tests — tool registration + error parsing (~300ms, no apps needed)
npm run test:integration  # Integration tests — Numbers/Pages/Keynote CRUD (~6s, requires iWork apps)
npm run test:all      # Both tiers combined

Tests use node:test with in-memory MCP transport (no subprocess). Integration tests skip automatically if the corresponding app isn't installed.

Local development with Claude Desktop

To test locally with Claude Desktop, point to your local build:

{
  "mcpServers": {
    "iwork": {
      "command": "node",
      "args": ["/absolute/path/to/iwork-mcp/dist/index.js"]
    }
  }
}

Limitations

iWork's scripting dictionary defines what's automatable — some features (charts, track changes, comments) simply aren't exposed by Apple. iwork-mcp covers everything the API allows. We're hopeful Apple expands automation capabilities as AI tooling becomes more integrated across the ecosystem.

  • macOS only — requires Numbers, Pages, and Keynote 14.0+ (free from the App Store)
  • Apps are visible — iWork apps launch and show windows; there's no headless mode
  • ~430ms per call — osascript startup overhead per tool invocation (use compound tools like create_sheet_with_table, create_document_with_content, and create_presentation_with_slides for speed)
  • No charts — Apple's scripting dictionary can create empty chart objects but has no API to bind data to them; add charts manually in Numbers (select data → Insert → Chart)
  • Formulas are write-only — Apple's scripting dictionary returns computed values, not formula text
  • No comments or track changes — not exposed in the scripting dictionary
  • Pages formatting — paragraph formatting uses bodyText.paragraphs which supports font, size, and color; bold/italic require PostScript font names (e.g. HelveticaNeue-Bold); there is no direct bold/italic toggle
  • First-use permission prompt — macOS will ask to grant Automation access once

Creator Studio known issues

iWork 15.1 Creator Studio has scripting bugs that iwork-mcp works around automatically:

  • app.export() fails with error (6) for all non-PDF formats — "document could not be exported". PDF export works via a Quick Look workaround (qlmanage). Non-PDF export formats (Excel, CSV, Word, EPUB, PowerPoint, HTML, images) are broken on Creator Studio with no known workaround.
  • doc.save() hangs and shows a popup dialog that never returns (both with and without a path argument). Save-as works via a file copy workaround (copies the auto-saved iCloud file, then closes and reopens from the new path). Plain save (no path) is handled by iCloud auto-save automatically.
  • Auto-save renames documents by appending file extensions (e.g. "Untitled" becomes "Untitled.numbers"), which breaks documents.byName() lookups. iwork-mcp injects name resolution that tries both the original and extended names, with automatic retry on transient failures during auto-save.

All workarounds are applied automatically when Creator Studio is detected. If you need non-PDF export, use the classic iWork 14.x versions from the Mac App Store.

License

MIT

About

MCP server for Apple iWork automation — 89 tools for Numbers, Pages, and Keynote. Template discovery, Creator Studio AI tools, compound batch operations. One line install.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •