MCP Documents

MCP Documents

A unified MCP server for document processing that enables creating, editing, and converting Word documents (DOCX), PDFs, Markdown, and images, with support for templates, formatting, and batch operations.

Category
Visit Server

README

MCP Documents

Unified MCP Server for Document Processing

A comprehensive Model Context Protocol (MCP) server that combines the best features from multiple document processing libraries into a single, efficient Python 3.10 compatible engine.

Features

📄 Word Document Operations (DOCX)

  • Create/Open/Save - Full document lifecycle management
  • Content - Paragraphs, headings, tables, images
  • Formatting - Font styles, colors, alignment, spacing
  • Tables - Create, edit, merge cells, add/delete rows
  • Sections - Page layout, margins, orientation
  • Headers/Footers - Add, modify, zone-based headers
  • Styles - Built-in and custom styles management
  • Search/Replace - Find and replace with preview

🔄 Format Conversion

  • DOCX ↔ PDF - Bidirectional conversion
  • Markdown → DOCX/PDF - With styling support
  • Markdown → PPTX - PowerPoint presentations
  • Image formats - PNG, JPG, WebP, GIF, BMP, TIFF
  • Excel → CSV - Spreadsheet conversion
  • HTML → PDF - Web page to document

🎨 Advanced Features

  • Template support - Reference documents for styling
  • Pandoc integration - Advanced format conversion
  • Base64 I/O - Direct content handling without files
  • Batch operations - Multiple edits in one call

Installation

cd MCP-Documents
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Optional Dependencies

For PDF conversion:

pip install -e ".[pdf]"

For all features:

pip install -e ".[full]"

External Tools

Some features require external tools:

  • Pandoc - For advanced format conversion: sudo apt install pandoc
  • LibreOffice - For DOCX→PDF on Linux: sudo apt install libreoffice
  • wkhtmltopdf - For HTML→PDF: sudo apt install wkhtmltopdf

Configuration

Claude Desktop / VS Code

Add to your MCP configuration:

{
  "mcpServers": {
    "mcp-documents": {
      "command": "/path/to/MCP-Documents/.venv/bin/python",
      "args": ["-m", "mcp_documents.server"]
    }
  }
}

Usage Examples

Create a Document

"Create a new Word document called report.docx with title 'Q4 Report'"

Add Content

"Add a heading 'Summary' at level 2, then add a paragraph with the quarterly results"

Format Text

"Make the title bold and center-aligned, set font size to 24pt"

Add Tables

"Insert a 3x4 table with sales data, merge the header row"

Convert Formats

"Convert report.docx to PDF"
"Convert this markdown to PowerPoint and save as presentation.pptx"

Available Tools

Document Management

Tool Description
create_document Create new Word document
open_document Open existing document
save_document Save current document
save_as_document Save as new file
get_document_info Get document statistics

Content Operations

Tool Description
add_paragraph Add paragraph with formatting
add_heading Add heading (level 1-9)
add_table Create table with data
add_image Insert image
add_page_break Insert page break

Table Operations

Tool Description
edit_table_cell Modify cell content
add_table_row Add row to table
delete_table_row Remove row
merge_table_cells Merge cell range

Format Conversion

Tool Description
convert_docx_to_pdf DOCX → PDF
convert_pdf_to_docx PDF → DOCX
convert_markdown MD → DOCX/PDF/PPTX
convert_image Image format conversion

Search & Edit

Tool Description
search_text Find text in document
find_and_replace Replace text
delete_paragraph Remove paragraph

Architecture

mcp_documents/
├── __init__.py          # Package exports
├── server.py            # MCP server entry point
├── core/
│   ├── document.py      # Document processor class
│   ├── formatting.py    # Text/paragraph formatting
│   └── utils.py         # Helper functions
├── tools/
│   ├── document_ops.py  # Document CRUD operations
│   ├── content_ops.py   # Content manipulation
│   ├── table_ops.py     # Table operations
│   ├── style_ops.py     # Style management
│   ├── section_ops.py   # Section/layout operations
│   ├── header_footer.py # Headers and footers
│   └── conversion.py    # Format conversion tools
└── converters/
    ├── pdf.py           # PDF conversion
    ├── image.py         # Image conversion
    └── pandoc.py        # Pandoc wrapper

License

MIT License

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured