home / mcp / libreoffice mcp server

LibreOffice MCP Server

Local MCP server for LibreOffice to create, read, edit, navigate, and manage documents via HTTP API and bridge integrations.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jwingnut-mcp-libre": {
      "url": "http://localhost:8765"
    }
  }
}

You run a LibreOffice MCP Server to enable AI assistants and other MCP clients to create, read, convert, and manipulate LibreOffice documents directly from your local environment. This server exposes a local HTTP API for convenient integration and can be extended with a FastMCP bridge for broader tooling support, all while keeping your edits and document context synchronized with Track Changes and multi-document workflows.

How to use

You access the LibreOffice MCP Server through either the built-in HTTP API or by using a local bridge that connectsClaude Code or other MCP clients to the server. Practical scenarios include obtaining document metadata, fetching visible content with Track Changes awareness, navigating by cursor or paragraph, performing edits and replacements, searching with Track Changes awareness, and managing comments and revisions. When you start the server, keep it running locally so your MCP clients can send requests to http://localhost:8765 and receive structured results to drive your document workflows.

Typical usage patterns include starting the server, using the HTTP endpoints to perform actions like reading document info, finding text, enabling track changes, and moving the cursor to a specific location. Your MCP client issues high-level actions such as document(action="info"), search(action="find", query="hello"), track_changes(action="enable"), and cursor(action="goto_paragraph", n=5). The server aggregates these capabilities into nine consolidated tool groups to simplify integration and preserve a smooth editing experience.

How to install

Prerequisites you need before installing the LibreOffice MCP Server: LibreOffice version 24.2 or newer and accessible from the command line, Python 3.12 or newer, and a dependency management tool such as UV Package Manager for handling runtime libraries.

# Install Python dependencies if you plan to use the FastMCP bridge flow
pip install fastmcp httpx

# (Optional) If you will use Claude Code integration, prepare the Claude CLI pathway as shown below.

LibreOffice Extension (Recommended)

Clone the MCP server repository, install the LibreOffice extension, and enable it from within LibreOffice to expose the HTTP API locally.

# Clone the repository
git clone https://github.com/jwingnut/mcp-libre.git
cd mcp-libre

# Build and install the LibreOffice extension
cd plugin/
./build.sh
unopkg add ../build/libreoffice-mcp-extension-1.0.0.oxt

# Restart LibreOffice

Start the MCP server and access the API

After the extension is installed, you start the MCP server from within LibreOffice and then access the HTTP API at the local address.

Steps to start and verify the HTTP API are below.

# Start the server from within LibreOffice (GUI path)
Tools > MCP Server > Start MCP Server

# Verify the API is available at
# http://localhost:8765/health

FastMCP Bridge for Claude Code

If you want to connect Claude Code or similar clients via a bridge, install the FastMCP package and configure Claude Code to run the bridge against the local server.

# Install FastMCP and httpx for the bridge
pip install fastmcp httpx

# Configure Claude Code to connect to the local MCP server
claude mcp add libreoffice -- fastmcp run /path/to/libreoffice_mcp_server.py

Available tools

document

Document management actions including create, info, list, content, status

structure

Document navigation features such as outline, paragraph, range, and count

cursor

Cursor control including goto_paragraph, goto_position, position, and context

selection

Text selection operations like paragraph, range, delete, and replace

search

Find and replace with Track Changes awareness

track_changes

Revision tracking controls such as status, enable, disable, list, accept, reject, accept_all, and reject_all

comments

Comment management with list and add operations

save

Save and export documents to various formats

text

Text insertion and formatting tools