Provides comprehensive tools for creating, reading, converting, and manipulating LibreOffice documents programmatically, including Writer, Calc, Impress, and Draw documents, with support for text editing, formatting, search/replace, track changes, comments, and document navigation.
Enables direct manipulation of Writer documents through an embedded MCP server extension with real-time editing, paragraph-level navigation, text formatting, revision tracking, and comment management capabilities.
LibreOffice MCP Server
A comprehensive Model Context Protocol (MCP) server that provides tools and resources for interacting with LibreOffice documents. This server enables AI assistants and other MCP clients to create, read, convert, and manipulate LibreOffice documents programmatically.
π Features
LibreOffice Extension (Plugin) - Recommended!
Native Integration: Embedded MCP server directly in LibreOffice
Real-time Editing: Live document manipulation with instant visual feedback
Performance: 10x faster than external server (direct UNO API access)
9 Consolidated Tools: Reduced from 32 individual tools for better UX
Track Changes Support: Full revision tracking awareness
Multi-document: Work with all open LibreOffice documents
HTTP API: External AI assistant access via localhost:8765
Document Operations
Create Documents: New Writer, Calc, Impress, and Draw documents
Read Content: Extract text with visible_content for Track Changes awareness
Navigate: Paragraph-level navigation, cursor positioning, document outline
Edit: Insert, format, select, and replace text
Search: Find/replace with Track Changes awareness (skips tracked deletions)
Comments: Add and retrieve document annotations
Track Changes: Enable, disable, list, accept/reject revisions
π§ 9 Consolidated MCP Tools
The MCP interface provides 9 logical tool groups (consolidated from 32 individual tools):
Tool | Actions | Description |
| create, info, list, content, status | Document management |
| outline, paragraph, range, count | Document navigation |
| goto_paragraph, goto_position, position, context | Cursor control |
| paragraph, range, delete, replace | Text selection |
| find, replace, replace_all | Search/replace (Track Changes aware) |
| status, enable, disable, list, accept, reject, accept_all, reject_all | Revision tracking |
| list, add | Comment management |
| save, export | Save/export documents |
| insert, format | Text insertion and formatting |
See docs/TOOL_REFERENCE.md for complete documentation.
π Requirements
LibreOffice: 24.2+ (must be accessible via command line)
Python: 3.12+
UV Package Manager: For dependency management
π Installation
LibreOffice Extension (Recommended)
After installation:
Open LibreOffice Writer
Go to Tools > MCP Server > Start MCP Server
The HTTP API is now available at
http://localhost:8765
FastMCP Bridge (for Claude Code)
π― Quick Start
Using with Claude Code
Once configured, you can use natural language commands:
HTTP API Examples
π Repository Structure
π Documentation
Tool Reference: Complete documentation of all 9 tools
Plugin README: LibreOffice extension details
Known Issues & Roadmap: Future plans
π Recent Changes
v0.3.0 - Tool Consolidation
Consolidated 32 tools into 9 logical groups
Reduced permission prompts for better UX
Each tool uses
actionparameter for routing
v0.2.0 - Track Changes Awareness
Added 7 Track Changes management tools
Search/replace now skips tracked deletions
get_paragraphreturnsvisible_contentfieldfind_textreturnstrack_changes_activefield
v0.1.0 - Initial Release
25 individual MCP tools
HTTP API on localhost:8765
LibreOffice extension with UNO API integration
π‘ Security
Local Execution: All operations run locally
File Permissions: Limited to user's file access
No Network: No external network dependencies
Email Privacy: Uses GitHub noreply email for commits
π€ Contributing
Fork the repository
Create a feature branch
Make your changes
Submit a pull request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Links
Repository: https://github.com/jwingnut/mcp-libre
MCP Specification: https://spec.modelcontextprotocol.io/
LibreOffice: https://www.libreoffice.org/
LibreOffice MCP Server v0.3.0 - AI-Powered Document Editing