Skip to main content
Glama

docforge-mcp

MCP server for complete Office document manipulation — create, read, edit, convert, and template DOCX, XLSX, PPTX, PDF, and EML files.

Built for AI agents that need full document lifecycle control, not just one-shot generation.

Install

# Via uvx (no install needed)
uvx docforge-mcp

# Or install globally
uv tool install docforge-mcp

# Or pip
pip install docforge-mcp

Related MCP server: SmartOffice-MCP

Tools (38)

Category

Tools

Capabilities

Word (DOCX)

12

Create from markdown, read, edit paragraphs, insert, delete, search/replace, headers/footers, images, merge, templates

Excel (XLSX)

7

Create from markdown, read sheets, edit cells, insert/delete rows, charts, conditional formatting

PowerPoint (PPTX)

9

Create presentations, read slides, edit text, add shapes/images, reorder, duplicate, delete, merge, templates

PDF

3

Create from markdown, convert DOCX→PDF, read

Email (EML)

1

Create HTML email drafts

XML

1

Create well-formed XML

Templates

2

Render DOCX/PPTX with variables, conditionals ({{#if}}), loops ({{#each}})

Metadata

1

Get document info/stats

Merge

2

Merge multiple DOCX or PPTX files

Usage

As MCP server (stdio — default)

docforge-mcp

As HTTP server

MCP_TRANSPORT=streamable-http MCP_PORT=8958 docforge-mcp

MCP client configuration

{
  "mcpServers": {
    "office-documents": {
      "command": "docforge-mcp",
      "autoApprove": ["read_document", "get_document_info", "get_docx_paragraphs", "get_pptx_slides", "get_xlsx_sheets"]
    }
  }
}

Origins

This project was born from ForLegalAI/mcp-ms-office-documents (MIT license). It diverged in scope and philosophy:

ForLegalAI (upstream)

docforge-mcp

Goal

One-shot document generation

Full document lifecycle

Read

❌

✅ Read any DOCX/XLSX/PPTX

Edit

❌

✅ Edit paragraphs, cells, slides

Convert

❌

✅ DOCX→PDF

Templates

Simple {{var}}

Conditionals + loops

Transport

Docker + HTTP only

stdio + HTTP

Install

Docker

uvx docforge-mcp

We continue to contribute compatible features upstream (PRs #57, #58, #59) while developing the full toolkit independently.

Development

git clone https://github.com/filhocf/docforge-mcp.git
cd docforge-mcp
uv sync --group dev
uv run pytest tests/ -v
uv run ruff check .

License

MIT — see LICENSE for details. Original work © ForLegalAI, extensions © Claudio Ferreira Filho.

Available Tools

40 tools
add_bullet_listB

Add a bullet list to a DOCX file

Inputs: items (required), file_path (required), output_path. Returns: result

add_image_to_docxC

Add an image to a DOCX file

Inputs: file_path (required), image_path (required), output_path, width_inches. Returns: result

add_numbered_listC

Add a numbered list to a DOCX file

Inputs: items (required), file_path (required), output_path. Returns: result

add_shape_to_slideC

Add a shape (rectangle, oval, triangle) to a PPTX slide

Inputs: file_path (required), slide_index (required), text, fill_color, +6 more. Returns: result

apply_excel_formattingB

Apply conditional formatting rules to an Excel sheet

Inputs: rules (required), file_path (required), sheet_name (required), output_path. Returns: result

apply_pptx_templateC

Replace placeholder text in a PPTX slide

Inputs: file_path (required), slide_index (required), replacements (required), output_path. Returns: result

convert_docx_to_pdfC

Convert an existing DOCX file to PDF

Inputs: file_path (required), file_name. Returns: result

create_email_draftEmail Draft CreatorC

Creates an email draft in EML format with HTML content using preset professional styling.

Inputs: content (required), subject (required), cc, to, +4 more. Returns: result

create_excel_chartB

Create a chart (bar, line, pie, column) in an Excel file

Inputs: title (required), chart_type (required), file_name, file_path, +7 more. Returns: result

create_excel_from_markdownMarkdown to Excel ConverterA

Converts markdown content with tables and formulas to Excel (.xlsx) format. Use '## Sheet: Name' headings to create multiple sheets.

Inputs: markdown_content (required), file_name. Returns: result

create_pdf_from_markdownB

Generate a PDF document from Markdown content

Inputs: markdown_content (required), file_name. Returns: result

create_powerpoint_presentationPowerPoint Presentation CreatorC

Creates PowerPoint presentations from structured slides.

Inputs: slides (required), format, file_name. Returns: result

create_word_from_markdownMarkdown to Word ConverterA

Converts markdown content to a professionally formatted Word (.docx) document. Supports headings, lists, tables, images, block quotes, page breaks, horizontal lines, text alignment, and rich inline formatting.

Inputs: markdown_content (required), title, author, subject, +4 more. Returns: result

create_xml_fileXML File CreatorB

Creates an XML file from provided XML content.

Inputs: xml_content (required), file_name. Returns: result

delete_docx_paragraphB

Delete a paragraph from a DOCX file by index

Inputs: index (required), file_path (required), output_path. Returns: result

delete_pptx_slideB

Delete a slide from a PPTX file

Inputs: file_path (required), slide_index (required), output_path. Returns: result

delete_xlsx_rowB

Delete a row from an XLSX sheet

Inputs: file_path (required), row_index (required), sheet_name (required), output_path. Returns: result

duplicate_pptx_slideC

Duplicate a slide in a PPTX file

Inputs: file_path (required), slide_index (required), output_path. Returns: result

edit_docx_paragraphB

Edit a paragraph in an existing DOCX file by index

Inputs: index (required), new_text (required), file_path (required), output_path. Returns: result

edit_pptx_slide_textB

Replace text in a specific PPTX slide

Inputs: new_text (required), old_text (required), file_path (required), slide_index (required), +1 more. Returns: result

edit_xlsx_cellC

Edit a cell value in an XLSX file

Inputs: cell (required), value (required), file_path (required), sheet_name (required), +1 more. Returns: result

formal_letterFormal Letter GeneratorA

Generate a formal business letter with customizable recipient, subject, body, and sender information. All placeholder values support markdown formatting:

  • Inline: bold, italic, code, links

  • Block-level: headings (#), bullet lists (-, *, +), numbered lists (1., 2.)

Inputs: data (required). Returns: result

get_document_infoB

Get metadata and statistics from an existing document

Inputs: file_path (required). Returns: object

get_docx_paragraphsA

List all paragraphs from a DOCX file with index and style

Inputs: file_path (required). Returns: result

get_docx_tablesB

Extract tables from a DOCX file with content

Inputs: file_path (required). Returns: result

get_pdf_pagesB

Extract text from specific pages of a PDF file

Inputs: file_path (required), page_numbers. Returns: result

get_pptx_slidesC

List all slides from a PPTX file with content

Inputs: file_path (required). Returns: result

get_xlsx_sheetsA

Get sheet content from an XLSX file

Inputs: file_path (required), max_rows, sheet_name. Returns: result

insert_docx_paragraphB

Insert a new paragraph at a specific position in a DOCX file

Inputs: text (required), index (required), file_path (required), style, +1 more. Returns: result

insert_xlsx_rowC

Insert a new row in an XLSX sheet

Inputs: values (required), file_path (required), row_index (required), sheet_name (required), +1 more. Returns: result

merge_docx_filesB

Merge multiple DOCX files into one document

Inputs: file_paths (required), output_path (required). Returns: result

merge_pptx_filesA

Merge multiple PPTX files into one presentation

Inputs: file_paths (required), output_path (required). Returns: result

merge_table_cellsB

Merge cells in a DOCX table

Inputs: end_col (required), end_row (required), file_path (required), start_col (required), +3 more. Returns: result

read_documentA

Extract all text from an existing document (DOCX, XLSX, PPTX, or PDF)

Inputs: file_path (required). Returns: result

render_docx_templateC

Render a DOCX template with variables, conditionals, and loops

Inputs: context (required), file_path (required), output_path. Returns: result

render_pptx_templateB

Render a PPTX template with variables, conditionals, and loops

Inputs: context (required), file_path (required), output_path. Returns: result

reorder_pptx_slidesB

Reorder slides in a PPTX file

Inputs: file_path (required), new_order (required), output_path. Returns: result

search_replace_docxC

Search and replace text in a DOCX file

Inputs: file_path (required), search_text (required), replace_text (required), output_path. Returns: result

set_page_marginsB

Set page margins for a DOCX file (in cm)

Inputs: file_path (required), top_cm, left_cm, right_cm, +2 more. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 40 tools

    Disambiguation3/5

    Tools are largely grouped by file type, but several overlap in purpose: render_docx_template, create_word_from_markdown, and add_bullet_list/add_numbered_list all generate DOCX content, and apply_pptx_template vs edit_pptx_slide_text vs render_pptx_template all modify presentation text. The distinctions require careful reading of each description.

    Naming Consistency4/5

    Most tools follow a clear verb_noun pattern (read_document, get_docx_paragraphs, merge_docx_files, delete_pptx_slide). Minor deviations exist: formal_letter is a content-type verb instead of a file operation, and create_excel_from_markdown uses 'create' with a format suffix, but overall the pattern is predictable.

    Tool Count2/5

    40 tools is excessive for a document manipulation server. Many are micro-operations (set_page_margins, merge_table_cells, add_shape_to_slide) that could be consolidated into broader editing commands. The count creates a heavy, hard-to-navigate surface.

    Completeness4/5

    The server covers a broad range of document operations: read, create, edit, merge, convert, and format across DOCX, XLSX, PPTX, and PDF. Minor gaps exist (no PDF editing/merging, no XLSX delete/rename sheet, no document deletion), but the core lifecycle for the main formats is well covered.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to read, edit, and create Microsoft Word documents (.docx) with support for rich text, tables, and images, deployable locally or via SSE.
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to create, edit, format, and analyze Microsoft Office documents (Excel, Word, PPT, PDF) using natural language, with features like table replication and automated styling.
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides AI agents with 20 tools to create, read, edit, validate, convert, and render documents across formats like DOCX, XLSX, PPTX, PDF, Markdown, HTML, and CSV, including charts, diagrams, templates, and CSV data operations over stdio.
      1
      Apache 2.0