OSS · OPEN SOURCE · 2026

LibreOffice-MCP

LibreOffice .oxt extension, MCPB bundle, and 210+ tool MCP server for AI agents

Python · LibreOffice UNO · MCP

GitHub | Release v0.10.2

LibreOffice MCP v0.10.2 architecture and 222-tool UNO module surface showcase

Overview / Engineering Problem

AI agents are increasingly capable of drafting text and reasoning over structured data, yet automating real office document suites—creating formatted reports, editing spreadsheets, building presentations, and exporting PDFs—remains fragile when agents rely on raw XML manipulation or brittle GUI macros.

LibreOffice-MCP bridges AI agents directly into LibreOffice through the Model Context Protocol (MCP). Distributed as a LibreOffice .oxt extension, an MCPB bundle, and a Python MCP server exposing 210+ tools, it lets agents programmatically control Writer, Calc, and Impress with native fidelity.

Open-Source Tooling: Maintained publicly on GitHub at swe-sanad/LibreOffice-MCP as part of an ongoing suite of developer and agent MCP tools.

Architecture & Technical Decisions

The project separates agent protocol handling from LibreOffice's internal object model:

  • Model Context Protocol (MCP) Server in Python: Exposes a structured catalog of 210+ typed tools that AI clients can discover and invoke deterministically across document creation, formatting, querying, and export workflows.
  • LibreOffice UNO Bridge: Connects directly to LibreOffice's Universal Network Objects (UNO) API rather than rewriting ODF XML archives offline, ensuring live layout rules, styles, formulas, and slide structures remain valid.
  • Multi-Suite Coverage (Writer, Calc, Impress): Covers word processing, spreadsheet calculation/formatting, and slide deck authoring within a single unified server surface.
  • Packaged Distribution (.oxt & MCPB): Provides both a native LibreOffice .oxt extension and an MCPB bundle so installation works cleanly across desktop environments and MCP-compatible agent hosts.
Why UNO Over Raw XML: Driving LibreOffice through UNO delegates rendering, style inheritance, and export behavior directly to the office engine itself.

SDLC & Quality Practices

Designing a 210+ tool surface for LLM consumption demands strict interface discipline:

  1. Deterministic Tool Schemas: Each MCP tool defines explicit parameters and predictable return structures so agents can chain multi-step document edits reliably.
  2. Suite-Aligned Modularity: Capabilities are organized cleanly across Writer, Calc, and Impress domains rather than monolithic catch-all endpoints.
  3. Open-Source Packaging: Maintained with reproducible extension and MCPB bundle packaging for transparent community inspection and adoption.

Stack & Deliverables

Layer Technology / Artifact Role
Protocol & Runtime Python & MCP Exposes 210+ structured automation tools for AI agents
Office Engine API LibreOffice UNO Native programmatic control of Writer, Calc, and Impress
Packaging .oxt Extension & MCPB Bundle Turnkey installation in LibreOffice and MCP agent clients
Source Repository GitHub (swe-sanad/LibreOffice-MCP) Public open-source codebase and release packaging

Latest Release: v0.10.2 — Full 222-Tool Surface, RTL/CTL & Calc Formula Reliability (v0.10.2)

LibreOffice MCP v0.10.2

v0.10.2 expands the MCP server from 220 to 222 tools and advertises all 222 tools directly by default, alongside targeted fixes for RTL/CTL typography, locale-safe Calc formula normalization, Calc/Writer table styling, document_lifecycle empty-state handling, and list_documents / lo_status reliability.


Overview

LibreOffice MCP bridges LibreOffice and AI assistants (Claude Desktop, Claude Code, VS Code Copilot, and any MCP client) over the native UNO API using LibreOffice's own bundled Python interpreter — requiring zero third-party Python packages (uno + Python standard library only):

  1. 222-Tool MCP Server (mcp/libreoffice_mcp.py) — JSON-RPC 2.0 over stdio across 14 tool modules covering Writer, Calc, Impress, Draw, and Cross-application lifecycle, properties, recovery, and automation (embedded Basic/Python macros, window PrintWindow screenshots, saved-file XML inspection, and uno_exec / dispatch_uno escape hatches).
  2. LibreOffice Extension (claude-connector-0.10.2.oxt) — Adds an in-app Claude menu and toolbar in Calc and Writer (with a worker-thread progress dialog and DPAPI-encrypted key storage on Windows) plus the startup agent-acceptor named-pipe job so MCP clients connect flag-free to any open LibreOffice instance.
  3. Claude Desktop Bundle (libreoffice-connector-0.10.2.mcpb) — One-click .mcpb desktop extension backed by a Node.js launcher (mcpb/index.js) that auto-locates LibreOffice's bundled Python across Windows, macOS, and Linux.

Tool Surface Breakdown (222 Tools — All Advertised)

Family Modules Tools Highlights
Calc calc_analysis (16), calc_data (28), calc_format (17), calc_sheets (17) 78 Ranges, locale-normalized formulas, pivot tables, charts, conditional formatting, table presets, RTL sheet layout, print setup
Writer writer_format (20), writer_structure (18), writer_tables (10), writer_text (21) 69 Index-accurate paragraph editing, inline markup, headings/TOC, captions, bookmarks, tracked changes, tables, RTL/CTL defaults
Cross-App shared_lifecycle (16), shared_properties (12), shared_recovery (5), shared_automation (16) 49 Lifecycle phase advisor, checkpoints, crash recovery, document watch, accessible PDF/form export, Basic/Python macros, lo_screenshot, uno_exec
Impress impress 19 Slide layouts, bullet outlines, speaker notes, tables, charts, transitions, per-object animations, slide rendering (impress_export_slides)
Draw draw 7 Multi-page vector drawings, shapes, text boxes, images, and glued connectors

What's Fixed in v0.10.2

  • RTL/CTL font and direction handling: Fixed RTL/CTL typography and text direction behavior across Writer and Calc tools, including writing_mode (rtl/ltr/page) and cell padding (padding_mm, padding_v_mm, padding_h_mm) in calc_format_range (6aa5e18).
  • Calc formula normalization: Normalized formula argument separators and ODF bracket handling across locales (6aa5e18, a6ba47c) — _normalize_formula preserves commas inside plain-text cells and quoted string literals, converts top-level arguments to the sheet's arg_sep, and strips accidental [...] brackets around sheet references.
  • document_lifecycle with no document open: Handled no_document states cleanly by returning an advisory payload recommending create_document or open_document instead of raising an error (6aa5e18).
  • list_documents & lo_status reliability: Routed list_documents through the shared _open_docs_info() helper (05255dc) and kept document titles JSON-safe in lo_status when an embedded chart is open (1897fd0).
  • PR #17 fixes: Merged PR #17 improvements (ad6c85d).
  • Offline tools/call tests: Kept tools/call unit tests fully offline by stubbing _connect, and updated test_reconnect.py for arg_sep (a6ba47c).

Added / Changed in v0.10.2

  • All 222 tools advertised directly: Updated BASIC_TOOLS in mcp/loconn/registry.py so every registered tool is advertised directly to MCP clients without requiring dispatch discovery (e48f2d0).
  • Writer & Calc table styling and sheet setup: Added zebra/row banding and header/border color overrides (header_bg, header_fg, zebra_bg, even_row_bg, odd_row_bg, border_color) to writer_format_table and calc_format_table (plus neutral/sanad presets), sizes_mm to calc_set_dimensions, and header_on/footer_on to calc_page_setup (6aa5e18).
  • Documentation: Regenerated docs/MCP-TOOLS.md for v0.10.2 (ebbb68a, e48f2d0) and updated the project name in README.md (201d292).

Installation & Bundle Assets

Asset Target How to Install
libreoffice-connector-0.10.2.mcpb Claude Desktop Download from the release assets below and open / drag into Claude Desktop → Settings → Extensions.
claude-connector-0.10.2.oxt LibreOffice (24.8+ / min 7.2) Install via Tools → Extension Manager → Add… (or unopkg add claude-connector-0.10.2.oxt), then restart LibreOffice.

Usage Overview

  • Automatic LibreOffice Transport (pipe → socket → auto-launch): When .oxt is installed, the MCP server connects directly to your running LibreOffice over the local agent-acceptor named pipe with no CLI flags. Otherwise it connects on LO_UNO_PORT (default 2002) or auto-launches LibreOffice (LO_AUTOSTART=0 to disable, LO_HEADLESS=1 for headless).
  • Claude Code / Generic MCP Client:
    claude mcp add libreoffice -e LO_UNO_PORT=2002 -- "C:\Program Files\LibreOffice\program\python.exe" "<repo>\mcp\libreoffice_mcp.py"
    
  • VS Code / GitHub Copilot: Open the repository workspace — .vscode/mcp.json configures the libreoffice MCP server automatically via mcpb/index.js.
  • Full Tool Reference: See docs/MCP-TOOLS.md and CHANGELOG.md.