Open Workbook

Open Workbook

Local-first MCP runtime for fast, reversible, template-aware Excel automation, enabling agents to manipulate live Excel workbooks with safety features like snapshots and rollbacks.

Category
访问服务器

README

Open Workbook

Open Workbook is a local-first MCP runtime for fast, reversible, template-aware Excel automation. It connects MCP clients such as OpenCode to live desktop Excel workbooks through an Office.js add-in and a local TypeScript backend, so teams can use OpenRouter or any MCP-capable agent without being locked into one frontier model vendor.

Why

Daily spreadsheet work usually does not need the largest model available, but it does need reliable workbook handling. Open Workbook focuses on the parts generic agents often break:

  • preserving templates, headers, formulas, filters, tables, print layout, and styling
  • batching reads and writes through Office.js instead of slow per-cell automation
  • creating backups and rollback paths before changing workbooks
  • keeping workbook data local unless a user explicitly sends it elsewhere
  • exposing clear capability status for unsupported or host-limited Excel operations

Current Status

The project is publishable for local development, MCP integration, and sideloaded desktop Excel testing on macOS and Windows. It is not a Microsoft AppSource add-in and does not attempt to install itself into Excel without user or admin trust approval.

Stable areas include runtime connection, workbook/sheet/range operations, reversible batches, snapshots, rollback, templates, style fidelity, formula patterns, tables, filters, sorting, named ranges, regions, validation, repair, cleaning, PivotTables, charts, permissions, packaging, and OpenCode config generation. Some advanced Office.js-limited paths return explicit capability-unavailable results instead of pretending to work.

Architecture

MCP client / agent
       |
       v
apps/mcp-server  -- stdio MCP server
       |
       v
apps/backend     -- local WebSocket broker, plans, backups, snapshots
       |
       v
apps/excel-addin -- Office.js taskpane loaded by desktop Excel
       |
       v
Excel workbook

Shared packages:

  • packages/protocol: tool catalog, JSON-RPC contracts, resources, prompts, errors, and workbook types
  • packages/excel-core: range parsing, planning, backups, snapshots, templates, permissions, fingerprints, and diffs
  • packages/office-js-engine: Office.js execution interface and defaults
  • packages/cli: owb CLI for running MCP, serving the add-in, generating manifests, sideloading, and diagnostics

Requirements

  • Node.js >=20.11
  • pnpm through Corepack
  • Desktop Microsoft Excel on macOS or Windows
  • An MCP client such as OpenCode
  • Network access only for installing packages or using whichever model provider your MCP client calls

Install From Source

git clone https://github.com/open-workbook/open-workbook.git
cd open-workbook
corepack pnpm install
corepack pnpm build
node packages/cli/dist/index.js doctor

Run the MCP server:

node packages/cli/dist/index.js mcp

Serve the Excel add-in assets in a separate terminal:

node packages/cli/dist/index.js addin serve

Generate OpenCode config:

node packages/cli/dist/index.js opencode config --id open-workbook --command "node packages/cli/dist/index.js"

For an installed package, the same commands become:

owb doctor
owb mcp
owb addin serve
owb opencode config --id open-workbook

Sideload Excel Add-in

macOS:

owb sideload mac

Windows:

owb sideload windows --out open-workbook.xml

Windows Excel uses a trusted shared-folder add-in catalog. Create a folder, share it, copy the generated manifest into that shared folder, add the UNC path in Excel Trust Center, select Show in Menu, restart Excel, and insert the add-in from Shared Folder.

More detail is in Local Excel Add-in Sideloading.

Runtime URLs

Defaults:

  • Add-in taskpane: http://127.0.0.1:37846/taskpane.html
  • Add-in backend: ws://127.0.0.1:37845/addin

Environment overrides:

  • OPEN_WORKBOOK_ADDIN_HOST
  • OPEN_WORKBOOK_ADDIN_PORT
  • OPEN_WORKBOOK_ADDIN_URL
  • OPEN_WORKBOOK_HOST
  • OPEN_WORKBOOK_PORT
  • OPEN_WORKBOOK_ADDIN_PATH
  • OPEN_WORKBOOK_BACKUP_DIR
  • OPEN_WORKBOOK_PREVIEW_TOOLS=1

Common Commands

corepack pnpm check
corepack pnpm test
corepack pnpm build
node packages/cli/dist/index.js paths
node packages/cli/dist/index.js sideload manifest --out open-workbook.xml

Safety Contract

Mutating operations should follow the same lifecycle:

  1. Resolve workbook, sheet, and range targets.
  2. Validate permissions, locked regions, and destructive-action policy.
  3. Capture affected-region snapshots.
  4. Create backups for rollback.
  5. Compile writes into batch operations.
  6. Check target fingerprints immediately before apply.
  7. Apply through Office.js.
  8. Validate template, style, formula, table, filter, and layout invariants where requested.
  9. Return telemetry, warnings, diff summaries, and rollback IDs.
  10. Roll back through stored snapshots when requested or when repair workflows fail validation.

Documentation

Contributing

See CONTRIBUTING.md. The most important rule is that write tools must not bypass planning, snapshots, permission checks, and rollback-aware batches.

Security

Open Workbook handles sensitive spreadsheet data. See SECURITY.md. Workbook content stays local by default; integrations that send data to external services must be explicit and documented.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选