Skip to main content
Glama
mcp-office-parser

mcp-office-parser

by as7722314

mcp-office-parser

⚠️ AI-Generated Project — Use With Caution

This project was generated with the assistance of AI. While efforts have been made to verify correctness, the code may contain errors, security vulnerabilities, or unexpected behavior. It has not been fully audited or tested in production environments. Use at your own risk, and always review the source code before deploying.

An MCP (Model Context Protocol) server for reading, writing, and converting LibreOffice and Microsoft Office documents — implemented in pure JavaScript with no external binary dependencies.

Quick Start

npx @barry.wu0329/mcp-office-parser

Related MCP server: Office-MCP-Server

What It Does

mcp-office-parser exposes document manipulation capabilities as MCP tools that AI assistants (like Claude) can use to:

  • Read ODT, DOCX, ODP, PPTX, TXT, and more

  • Read spreadsheets from ODS, XLSX, CSV files

  • Create new documents (ODT, ODS, DOCX, XLSX, PDF)

  • Edit existing documents by inserting text

  • Convert between formats (e.g., DOCX → PDF, ODT → TXT)

  • Search through documents for specific content

  • Merge multiple documents into one

Configuration

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "mcp-office-parser": {
      "command": "npx",
      "args": ["@barry.wu0329/mcp-office-parser"]
    }
  }
}

VS Code (MCP extension)

Add to .vscode/mcp.json:

{
  "servers": {
    "mcp-office-parser": {
      "command": "npx",
      "args": ["@barry.wu0329/mcp-office-parser"]
    }
  }
}

Supported File Formats

Format

Read

Write

Notes

.odt

✅

✅

LibreOffice Writer

.ods

✅

✅

LibreOffice Calc

.odp

✅

✅

LibreOffice Impress

.docx

✅

✅

Microsoft Word

.xlsx

✅

✅

Microsoft Excel

.pptx

✅

—

Microsoft PowerPoint

.txt

✅

✅

Plain text

.csv

✅

✅

Comma-separated values

.pdf

✅

✅

Read via pdf-parse; write via pdf-lib

.html

—

✅

HTML conversion output

Available MCP Tools

Tool

Description

get_document_info

Get file metadata (size, format, modified time)

read_document_text

Extract plain text from a document

read_spreadsheet_data

Read spreadsheet data as a 2D array

create_document

Create a new document with content

insert_text_at_position

Insert text at start, end, or replace content

list_documents

Find all supported documents in a directory

search_documents

Search document contents for a query string

get_document_statistics

Word count, character count, sentence count, etc.

convert_document

Convert between formats

merge_text_documents

Merge multiple documents into one

MCP Resources

  • documents:// — Lists all discoverable documents as JSON

  • document://{path} — Reads a document's text content

Requirements

  • Node.js >= 18.17.0

  • No LibreOffice or other external tools needed

License

MIT

Available Tools

11 tools
convert_documentD

Inputs: source_path (required), target_path (required), target_format (required).

create_documentD

Inputs: path (required), doc_type (required), content.

get_document_infoD

Inputs: path (required).

get_document_statisticsD

Inputs: path (required).

insert_table_docxD

Inputs: path (required), rows (required), position.

insert_text_at_positionD

Inputs: path (required), text (required), position.

list_documentsD

Inputs: search_path.

merge_text_documentsD

Inputs: output_path (required), document_paths (required), separator.

read_document_textD

Inputs: path (required).

read_spreadsheet_dataD

Inputs: path (required), max_rows, sheet_name.

search_documentsD

Inputs: query (required), search_path.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    D1.8/5.0

    Scored across 11 tools

    Disambiguation3/5

    Most tools have distinct targets (e.g., read_document_text vs. read_spreadsheet_data), but get_document_info and get_document_statistics could be confused, and insert_text_at_position and insert_table_docx are both insertion operations with unclear boundaries. Without descriptions, an agent might struggle to pick the right tool for metadata vs. statistics.

    Naming Consistency4/5

    All tools follow a verb_noun pattern (get, read, create, insert, list, search, convert, merge), which is consistent. Minor deviations include mixing 'read' and 'get' for similar actions, and suffixes like 'at_position' vs. 'docx' are not uniform, but the overall pattern is readable.

    Tool Count5/5

    11 tools is within the ideal 3-15 range and each tool seems to serve a distinct function in document processing. The count feels well-scoped and not bloated.

    Completeness3/5

    The surface covers reading, creating, inserting, converting, and merging documents, but lacks obvious operations like deleting or updating documents, and spreadsheet write capabilities are absent. This may force an agent to work around missing functionality for typical office document workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Provides MCP tools for working with Microsoft Word documents, enabling reading, editing with tracked changes, formatting, table manipulation, comments, and PDF conversion via direct OOXML manipulation.
      37
      MIT
    • A
      license
      C
      quality
      D
      maintenance
      Enables comprehensive DOCX/OOXML document manipulation via MCP, covering text, tables, images, content controls, comments, tracked changes, and metadata.
      34
      47 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables creating, reading, editing, and verifying PDF, Word, Excel, and PowerPoint documents through MCP tools that return structured results. It preserves source files by default for edits and supports local stdio operation without network requests.
      MIT