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
Visit Server

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured