numbers-cli
Enables AI agents to create, read, view, and edit Apple Numbers spreadsheets through the Model Context Protocol, leveraging both a parser engine and the Numbers application for formula evaluation and export.
README
numbers-cli
An OfficeCli-style command line and Model Context Protocol server for Apple
Numbers spreadsheets. It lets you (or an AI agent) create, read, view, and edit
.numbers files, delegating the things only Numbers can do - evaluating
formulas, rendering, native export - to the Numbers application.
Why this exists
OfficeCli gives one-line control over
Word, Excel, and PowerPoint. Those are documented zip-and-xml formats. Apple
Numbers is not: a .numbers file is a bundle of Snappy-compressed protocol
buffer streams (the "IWA" format) with no public specification. This tool takes
the same layered approach as OfficeCli, built on the two engines that exist for
Numbers.
Two engines
- Parser engine -
numbers-parserreads and writes.numbersdirectly. Fast, no application, cross platform. It cannot evaluate formulas and has some format limits. - Application engine - the Numbers application driven through
osascript. It evaluates formulas, renders pages, and exports. macOS only, needs Numbers installed and Automation permission.
The router chooses per operation and, for formula edits, runs the write in the parser then hands the formula cells to Numbers so they evaluate.
Install
Homebrew (recommended, macOS)
brew tap indiebrain/numbers
brew install numbers-cli
The command nmbr is then on your path. The formula installs the core command
line; the Model Context Protocol server is an optional extra (see below).
pip / pipx (from source)
pipx install 'git+https://github.com/indiebrain/numbers-cli' # core command line
pipx install 'numbers-cli[mcp] @ git+https://github.com/indiebrain/numbers-cli' # also enable the MCP server
Claude Code skill
A Claude Code skill ships with the tool. Install
it into your skills directory so Claude Code can drive nmbr for you:
nmbr skill install # copies the skill into ~/.claude/skills/apple-numbers
nmbr skill install --dir DIR # or into a directory you choose
nmbr skill path # print where the bundled skill lives
Restart Claude Code afterward to load it. The skill is installed at command time
(not during brew install, which runs in a sandbox that cannot write to your home
directory).
The MCP server is optional
The Model Context Protocol server pulls in a large dependency tree (pydantic,
starlette, uvicorn, and friends), so it is an optional extra rather than a core
dependency. Install it only if you want nmbr mcp:
pip install 'numbers-cli[mcp]'
Without it, every other command works; nmbr mcp prints a clear message telling
you to install the extra.
Quick start
nmbr create budget.numbers --sheets Budget
nmbr set budget.numbers "/sheet['Budget']/table[1]/cell[A1]" "Rent"
nmbr set budget.numbers "/sheet['Budget']/table[1]/cell[B1]" 1200
nmbr --human view budget.numbers "/sheet[1]/table[1]" --as csv
nmbr --human query budget.numbers "Rent"
Every command prints one JSON object ({"ok": true, "data": ...} or a structured
error); pass --human for readable output.
Layers
- L1 view -
viewrenders a document, sheet, or table as text, csv, markdown, outline, json, html, pdf, or png. - L2 dom -
get,set,add,remove,queryover a stable path address space such as/sheet[1]/table[1]/cell[B2]. - L3 raw -
rawinspects the underlying protocol buffer objects (read only).
Plus batch (an operation list applied in one pass), merge (fill
{{placeholders}} from data), and dump (serialise to a replayable op-list).
Honest limits
numbers-parsercannot write a live formula (it stores=A1+A2as text), so formula edits route to the Numbers application, or fail with a clearENGINE_UNAVAILABLEerror when it is unavailable.- It cannot delete a sheet or table; those are refused with a rebuild hint. Rows and columns delete normally.
- The application engine (formulas, recalc, export, pdf/png) is macOS only and needs Numbers plus Automation permission; the parser engine works anywhere.
- Password-protected files cannot be opened.
License
GNU Lesser General Public License v3.0 or later (LGPL-3.0-or-later). See COPYING.LESSER (the LGPLv3 additional permissions) and COPYING (the GPLv3 base license).
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。