Sign In

iwork-mcp

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iwork-mcp

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

latest
npmnpm
Version
0.8.8
Version published
Weekly downloads
86
26.47%
Maintainers
1
Weekly downloads
 
Created
Source

iwork-mcp

MCP server for Apple iWork automation — 117 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.

Q4 Revenue Dashboard in Numbers

Product Brief in Pages

Presentation Deck 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 and 15.1.1 Creator Studio; 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 — tested on 15.1.1 (February 2026). Creator Studio is 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 (50 tools)

ToolDescription
numbers_list_documentsList all open documents
numbers_list_templatesList available templates (e.g. Personal Budget, Invoice)
numbers_create_documentCreate a new spreadsheet
numbers_open_documentOpen a .numbers file
numbers_save_documentSave a document
numbers_export_documentExport to PDF, Excel, or CSV
numbers_close_documentClose a document
numbers_list_sheetsList sheets in a document
numbers_add_sheetAdd a new sheet
numbers_rename_sheetRename a sheet
numbers_delete_sheetDelete a sheet
numbers_list_tablesList tables with dimensions
numbers_add_tableCreate a new table (configurable headers)
numbers_rename_tableRename a table
numbers_delete_tableDelete a table
numbers_read_tableRead all data as a 2D array
numbers_read_cellRead a single cell
numbers_read_rangeRead a specific cell range
numbers_get_table_infoGet table metadata (name, dimensions, position)
numbers_get_cell_formatRead a cell's number format and alignment
numbers_move_tableMove a table to a new position on the sheet
numbers_write_cellWrite a value to a cell
numbers_write_cellsBatch write multiple cells
numbers_write_tableBulk write a 2D array (fast)
numbers_set_formulaSet a formula on a cell
numbers_add_rowAdd rows with optional data
numbers_insert_row_atInsert rows at a specific position, shifting existing rows down
numbers_add_columnAdd a column
numbers_insert_column_atInsert columns at a specific position, shifting existing columns right
numbers_delete_rowDelete rows
numbers_delete_columnDelete columns
numbers_sort_rowsSort table by a column
numbers_set_header_rowsSet header row count (0 removes header styling)
numbers_set_header_columnsSet header column count
numbers_merge_cellsMerge a cell range
numbers_unmerge_cellsUnmerge cells
numbers_clear_cellsClear cell contents
numbers_format_cellsSet font, size, color, bold, italic, alignment, background, number format (percent, currency, etc.)
numbers_set_column_widthSet column width
numbers_set_row_heightSet row height
numbers_format_rangeApply multiple formatting rules to different cell ranges in one call
numbers_auto_formatAuto-detect and apply formatting (currency, percent, number) from string values
numbers_copy_rangeCopy values between open documents
numbers_add_imageAdd an image to a sheet from a file path
numbers_list_imagesList all images on a sheet with positions and sizes
numbers_add_chartCreate charts (bar, line, pie, area, scatter) from table data
numbers_create_sheet_with_tableCreate a full sheet with table, data, and formatting in one fast call
numbers_magic_fillAI pattern fill — provide examples, fill remaining cells automatically (Creator Studio)
numbers_super_resolutionAI image upscaling — increase resolution while preserving quality (Creator Studio)
numbers_remove_backgroundAI background removal from images (Creator Studio)

Pages (26 tools)

ToolDescription
pages_list_documentsList all open documents
pages_list_templatesList available templates (e.g. Resume, Report, Letter)
pages_create_documentCreate a new document
pages_open_documentOpen a .pages file
pages_save_documentSave a document
pages_export_documentExport to PDF, Word, EPUB, or plain text
pages_close_documentClose a document
pages_get_body_textRead all body text
pages_get_paragraphsGet paragraphs as indexed array
pages_get_document_infoGet word count, character count, page count, modified status
pages_list_imagesList all images in a document with positions and sizes
pages_add_textAppend text (preserves formatting)
pages_insert_text_atInsert text at a paragraph index
pages_delete_textDelete a paragraph
pages_replace_textFind and replace (preserves formatting)
pages_format_textSet font, size, color, bold, italic on a paragraph
pages_add_imageInsert an image
pages_add_tableInsert a table
pages_list_tablesList tables with size and header configuration
pages_read_tableRead all cell values and formulas from a table
pages_write_table_cellsWrite cell values; = strings set formulas, existing formulas recalculate
pages_resize_tableChange a table's row/column count
pages_insert_page_breakInsert a page break between paragraphs
pages_create_document_with_contentCreate a document with multiple formatted paragraphs in one fast call
pages_super_resolutionAI image upscaling — increase resolution while preserving quality (Creator Studio)
pages_remove_backgroundAI background removal from images (Creator Studio)

Keynote (41 tools)

ToolDescription
keynote_list_presentationsList all open presentations
keynote_list_themesList available themes (e.g. White, Black, Gradient)
keynote_get_themeGet the current theme of a presentation
keynote_set_themeChange the theme of an existing presentation
keynote_create_presentationCreate a new presentation
keynote_open_presentationOpen a .key file
keynote_save_presentationSave a presentation
keynote_export_presentationExport to PDF, PowerPoint, HTML, or images
keynote_close_presentationClose a presentation
keynote_list_slidesList slides with titles
keynote_get_slide_contentRead all content from a slide
keynote_list_slide_itemsList all items on a slide with types, positions, and sizes
keynote_list_master_slidesList available slide layouts
keynote_add_slideAdd a slide with optional layout
keynote_delete_slideDelete a slide
keynote_duplicate_slideDuplicate a slide
keynote_reorder_slideMove a slide to a new position
keynote_skip_slideHide/unhide a slide
keynote_set_slide_layoutChange the master slide layout of an existing slide
keynote_set_slide_titleSet slide title text
keynote_set_slide_bodySet slide body / bullet points
keynote_add_image_to_slideAdd an image to a slide
keynote_add_shapeAdd a shape with text
keynote_add_lineAdd a line between two points on a slide
keynote_position_itemMove/resize a shape, image, or text item by type and index
keynote_align_itemsAlign 2+ items along an edge or center (left, right, top, bottom, center, middle)
keynote_distribute_itemsEvenly space 3+ items horizontally or vertically
keynote_get_shape_infoRead shape properties (position, size, opacity, rotation, text formatting)
keynote_format_shapeSet opacity, rotation, and text font/size/color/alignment on a shape
keynote_add_table_to_slideAdd a table to a slide with optional data
keynote_read_slide_tableRead all data from a table on a slide
keynote_write_slide_tableWrite data to cells of an existing table on a slide
keynote_format_slide_tableFormat cells in a slide table (text color, number format)
keynote_set_presenter_notesSet presenter notes
keynote_set_transitionSet slide transition effect
keynote_start_slideshowStart playing the presentation
keynote_stop_slideshowStop the slideshow
keynote_create_presentation_with_slidesCreate a presentation with multiple fully-configured slides in one fast call
keynote_clean_up_slideAI slide cleanup — auto-adjust layout, spacing, alignment, and typography (Creator Studio)
keynote_super_resolutionAI image upscaling — increase resolution while preserving quality (Creator Studio)
keynote_remove_backgroundAI 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. I'm hopeful Apple expands automation capabilities as AI tooling becomes more integrated across the ecosystem.

  • macOS only — requires Numbers, Pages, and Keynote 14.0+ (tested on 14.5 and 15.1 Creator Studio; 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)
  • Charts are basicnumbers_add_chart creates data-bound charts (bar, line, pie, area, scatter) via an AppleScript bridge workaround, but chart customization (titles, labels, colors) is not exposed by Apple's scripting dictionary
  • 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–15.1.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.
  • Table creation in Pages fails with error -2763 — both the JXA and AppleScript creation APIs are broken on Pages 15.x (existing tables can still be read and resized). pages_add_table works around this with UI scripting: it clicks Insert > Table > Basic via System Events, then resizes the new table to the requested dimensions. This needs Accessibility permission for the host app (System Settings > Privacy & Security > Accessibility), and the table is inserted at an insertion point near the top of the visible page rather than at the end of the document.

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

Keywords

mcp

FAQs

Package last updated on 19 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts