LibreOffice MCP Tools
LibreOffice MCP 도구
[!WARNING] 이 프로젝트는 GitHub Copilot이 작성하였으며 사람이 완전히 검토하지 않았습니다. 코드에 버그, 보안 문제 또는 예상치 못한 동작이 포함되어 있을 수 있습니다. 사용 시 위험은 사용자 본인의 책임입니다. 철저한 검토 없이 프로덕션 환경에서 사용하지 마십시오.
AI 에이전트(Claude, Copilot, Gemini, Cursor 등)가 LibreOffice를 통해 Office 문서를 읽고, 쓰고, 편집할 수 있는 기능을 제공하는 Model Context Protocol (MCP) 서버입니다. LLM 컨텍스트 사용량을 최소화하는 토큰 효율적인 설계를 갖추고 있습니다.
chrome-devtools-mcp의 아키텍처에서 영감을 받았습니다.
✨ 주요 기능
22개의 MCP 도구: 읽기, 쓰기, 스프레드시트 및 프레젠테이션 기능 포함
토큰 효율적인 설계: 개요 우선 탐색, 범위 기반 액세스, 페이지 매김
광범위한 형식 지원: DOCX, DOC, XLSX, XLS, PPTX, PPT, ODT, ODS, ODP, RTF, CSV, TXT, PDF
레거시 형식 브리지:
.doc,.xls,.ppt파일은 파싱 전 LibreOffice를 통해 자동 변환기본 읽기 시 LibreOffice 불필요: 네이티브 파서가 DOCX, XLSX, PPTX를 직접 처리
LibreOffice 필수 작업: 레거시 형식, PDF 내보내기, 형식 변환
Related MCP server: Spire.Doc MCP Server
📋 지원 형식
형식 | 확장자 | 읽기 | 쓰기 | 방식 |
Word 2007+ |
| ✅ | ✅ | 네이티브 (mammoth 읽기 / JSZip OOXML 쓰기) |
Word 97-2003 |
| ✅ | ✅ | LibreOffice 브리지 |
Excel 2007+ |
| ✅ | ✅ | 네이티브 (ExcelJS) |
Excel 97-2003 |
| ✅ | ✅ | LibreOffice 브리지 |
PowerPoint 2007+ |
| ✅ | ✅ | 네이티브 (JSZip OOXML) |
PowerPoint 97-2003 |
| ✅ | ✅ | LibreOffice 브리지 |
OpenDocument Text |
| ✅ | ✅ | LibreOffice 브리지 |
OpenDocument Spreadsheet |
| ✅ | ✅ | LibreOffice 브리지 |
OpenDocument Presentation |
| ✅ | ✅ | LibreOffice 브리지 |
Rich Text Format |
| ✅ | ✅ | LibreOffice 브리지 |
CSV |
| ✅ | ✅ | 네이티브 |
| ✅ (텍스트) | ❌ | LibreOffice CLI | |
일반 텍스트 |
| ✅ | ✅ | 네이티브 |
🚀 빠른 시작
사전 요구 사항
Node.js 20+
LibreOffice (기본 DOCX/XLSX/PPTX 읽기에는 선택 사항; .doc/.xls/.ppt 및 형식 변환에는 필수)
Windows: LibreOffice 다운로드
macOS:
brew install --cask libreofficeLinux:
sudo apt install libreoffice또는sudo dnf install libreoffice
설치
npx 사용 (권장 — 설치 불필요):
{
"mcpServers": {
"libreoffice": {
"command": "npx",
"args": ["-y", "@passerbyflutter/libreoffice-mcp-tools"]
}
}
}전역 설치:
npm install -g @passerbyflutter/libreoffice-mcp-tools소스에서 설치:
git clone https://github.com/passerbyflutter/libreoffice-mcp-tools
cd libreoffice-mcp-tools
npm install
npm run buildMCP 클라이언트 구성
MCP 클라이언트 구성(예: Claude Desktop claude_desktop_config.json)에 추가하십시오:
{
"mcpServers": {
"libreoffice": {
"command": "npx",
"args": ["-y", "@passerbyflutter/libreoffice-mcp-tools"],
"env": {
"SOFFICE_PATH": "/path/to/soffice"
}
}
}
}또는 프로젝트 루트의 .mcp.json을 사용하십시오:
{
"mcpServers": {
"libreoffice": {
"command": "npx",
"args": ["-y", "@passerbyflutter/libreoffice-mcp-tools"]
}
}
}CLI 옵션
node build/bin/libreoffice-mcp.js [options]
--libreoffice-path <path> Path to soffice executable
(default: auto-detected or SOFFICE_PATH env)🛠 도구 참조
문서 관리
도구 | 설명 |
| 파일 열기 → |
| 문서 핸들 및 임시 파일 해제 |
| 열려 있는 모든 문서 나열 |
| 새 빈 문서 생성 (writer/calc/impress) |
| 현재 또는 새 경로에 저장 |
| LibreOffice를 통해 내보내기 (PDF, HTML, CSV 등) |
| 파일 형식 변환 (DOC→DOCX, XLSX→CSV 등) |
읽기 (토큰 효율적)
도구 | 설명 |
| 제목, 작성자, 단어/페이지 수, 날짜 |
| 제목 (Writer) / 시트 이름 (Calc) / 슬라이드 제목 (Impress) |
| Markdown 형식의 페이지 매김된 문서 텍스트 |
| 특정 단락 또는 슬라이드 범위 |
| 주변 컨텍스트와 함께 텍스트 찾기 |
쓰기 (Writer)
도구 | 설명 |
| 시작/끝/제목 뒤에 삽입 |
| 찾기 및 바꾸기 (첫 번째 또는 모든 항목) |
| 특정 인덱스에 단락 삽입 |
| 제목/단락 스타일 적용 |
스프레드시트 (Calc)
도구 | 설명 |
| 행/열 수가 포함된 시트 이름 |
| JSON + 마크다운 테이블 형식의 셀 범위 |
| 셀 값 또는 수식 설정 |
| 2D 값 범위 설정 |
| 새 시트 추가 |
| 범위 내 수식 표현식 가져오기 |
프레젠테이션 (Impress)
도구 | 설명 |
| 인덱스가 포함된 슬라이드 제목 |
| 전체 슬라이드 콘텐츠 (제목, 본문, 노트) |
| 발표자 노트 |
| 새 슬라이드 추가 (LibreOffice 필요) |
| 슬라이드 콘텐츠 업데이트 |
💡 토큰 절약 워크플로우
최대 토큰 효율성을 위해 다음 패턴을 따르십시오:
1. document_open(filePath) → get docId
2. document_get_metadata(docId) → understand size/type
3. document_get_outline(docId) → see structure
4. document_read_range(docId, startIndex=N, endIndex=M) → read specific section전체 문서를 덤프하는 대신 필요한 부분만 정확하게 탐색합니다.
스프레드시트 워크플로우:
1. document_open(path) → docId
2. spreadsheet_list_sheets(docId) → see all sheets
3. spreadsheet_get_range(docId, sheetName="Sales", range="A1:D20") → targeted data🏗 아키텍처
src/
├── index.ts # createMcpServer() — MCP server factory
├── LibreOfficeAdapter.ts # soffice subprocess manager
├── DocumentContext.ts # Open document registry
├── DocumentSession.ts # Per-document state + format bridge
├── McpResponse.ts # Response builder (text/JSON/markdown)
├── Mutex.ts # Serializes LibreOffice subprocess calls
├── parsers/
│ ├── DocxParser.ts # DOCX read → {paragraphs, outline, metadata} (mammoth)
│ ├── DocxOoxmlEditor.ts # DOCX write → direct JSZip OOXML manipulation (format-preserving)
│ ├── XlsxParser.ts # XLSX read/write via ExcelJS
│ ├── PptxParser.ts # PPTX read → {slides[]} (JSZip XML)
│ └── PptxOoxmlEditor.ts # PPTX write → add/update slides, create PPTX (JSZip OOXML)
├── formatters/
│ ├── MarkdownFormatter.ts
│ ├── JsonFormatter.ts
│ └── TableFormatter.ts # Spreadsheet → Markdown table
└── tools/
├── documents.ts # open/close/list/create
├── reader.ts # metadata/outline/read/search
├── writer.ts # insert/replace/style
├── spreadsheet.ts # get/set cells/ranges/sheets
├── presentation.ts # slides/notes
└── converter.ts # save/export/convert🧪 테스트
# Create sample fixtures
node tests/create-fixtures.mjs
# Run smoke tests
npm test📝 환경 변수
변수 | 설명 |
| LibreOffice |
| 상세 로깅을 위해 |
📄 라이선스
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to create, read, edit, and manipulate LibreOffice documents with support for track changes, comments, search/replace, and real-time document operations through a native extension or HTTP API.9MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to create, read, modify, and convert Word documents without Microsoft Word, supporting 18 tools for document operations, paragraph manipulation, table management, formatting, and conversion between multiple formats including PDF, HTML, and Markdown.6MIT
- AlicenseAqualityFmaintenanceEnables AI assistants to create, read, convert, and manipulate LibreOffice documents programmatically, supporting 50+ file formats including Writer, Calc, Impress documents with real-time editing, batch operations, and document analysis capabilities.1495MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to read, edit, and create Microsoft Word documents (.docx) with support for rich text, tables, and images, deployable locally or via SSE.3MIT
Related MCP Connectors
Persistent docs and memory for AI agents — read, write, organize & search a shared workspace.
AI document editing for agents: draft, edit, export .docx/PDF. 37 MCP tools; agent self-signup.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/passerbyflutter/libreoffice-mcp-tools'
If you have feedback or need assistance with the MCP directory API, please join our Discord server