docforge-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@docforge-mcp Create a Word doc from markdown and convert to PDF."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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-mcpRelated 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 |
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 ( |
Metadata | 1 | Get document info/stats |
Merge | 2 | Merge multiple DOCX or PPTX files |
Usage
As MCP server (stdio — default)
docforge-mcpAs HTTP server
MCP_TRANSPORT=streamable-http MCP_PORT=8958 docforge-mcpMCP 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 | Conditionals + loops |
Transport | Docker + HTTP only | stdio + HTTP |
Install | Docker |
|
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 toolsadd_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, linksBlock-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
Scored across 40 tools
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.
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.
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.
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
Related MCP Connectors
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Online office suite for AI agents: edit docs, sheets, slides and PDFs in browser or via MCP.
Create documents and reusable templates, request signatures, and track approvals — for AI agents.
Document conversion and OCR for AI agents: PDF, Office docs, images to text.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables 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
- AlicenseNot gradedqualityDmaintenanceEnables 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.2MIT
- AlicenseCqualityCmaintenanceEnables AI agents to create, read, and edit Word documents with tracked changes, comments, and template manipulation, including bulk text replacement and paragraph-level operations.100MIT
- AlicenseNot gradedqualityDmaintenanceProvides 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.1Apache 2.0