AI Group Markdown to Word MCP Server
Converts Markdown documents to professional Word documents with advanced formatting capabilities including mathematical formulas, custom styling, tables, images, headers/footers, and watermarks.
README
AI Group Markdown to Word MCP Server
A comprehensive Model Context Protocol (MCP) server for converting Markdown documents to professional Word documents with advanced formatting, styling, and layout capabilities.
๐ Features
Core Conversion
- Full Markdown Support: Complete Markdown syntax including headings, paragraphs, lists, tables, code blocks, and blockquotes
- Advanced Styling System: Comprehensive style configuration with themes, templates, and custom styling
- Professional Document Layout: Page setup, margins, orientation, and document structure
Advanced Features
- Mathematical Formulas: LaTeX math formula support with inline and block rendering
- Table Processing: Advanced table styling with 12+ preset styles, CSV/JSON data import
- Image Support: Local and remote image embedding with automatic scaling and formatting
- Header & Footer: Complete header/footer system with page numbers, total pages, and custom content
- Table of Contents: Automatic TOC generation with configurable levels and styling
- Watermarks: Text watermarks with configurable position, rotation, and transparency
MCP Integration
- Multiple Transports: Support for STDIO and Streamable HTTP transports
- Tool-based Interface: Clean MCP tool interface for document conversion
- Resource Templates: Pre-built document templates for various use cases
- Prompt System: Intelligent prompts for user guidance and troubleshooting
๐ Quick Start
Installation
# Using npx (recommended for one-time use)
npx -y aigroup-mdtoword-mcp
# Or install globally
npm install -g aigroup-mdtoword-mcp
Usage with Claude Desktop
Add to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"markdown-to-word": {
"command": "npx",
"args": ["-y", "aigroup-mdtoword-mcp"]
}
}
}
Usage with Other MCP Clients
{
"mcpServers": {
"markdown-to-word": {
"command": "uvx",
"args": ["aigroup-mdtoword-mcp"]
}
}
}
๐ ๏ธ Available Tools
markdown_to_docx
Convert Markdown content to Word document with full styling support.
Input Schema:
{
markdown?: string; // Markdown content (required if inputPath not provided)
inputPath?: string; // Path to Markdown file
filename: string; // Output filename (without extension)
outputPath?: string; // Custom output directory
styleConfig?: StyleConfig; // Advanced styling configuration
}
Example Usage:
Convert this markdown to a Word document:
# Project Report
## Executive Summary
This is a sample report with **bold text** and *italic text*.
- Feature 1: Complete Markdown support
- Feature 2: Advanced styling system
- Feature 3: Professional document layout
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Data 1 | Data 2 | Data 3 |
| Data 4 | Data 5 | Data 6 |
Mathematical formula: $E = mc^2$
table_data_to_markdown
Convert structured data (CSV/JSON) to formatted Markdown tables.
Input Schema:
{
data: string; // CSV or JSON data
format: 'csv' | 'json'; // Data format
style?: string; // Table style preset
hasHeader?: boolean; // Whether data includes headers
}
๐ Available Resources
Templates
template://customer-analysis- Business analysis report templatetemplate://academic- Academic paper templatetemplate://business- Professional business reporttemplate://technical- Technical documentationtemplate://minimal- Clean minimal template
Style Guides
style-guide://quick-start- Quick styling referencestyle-guide://advanced- Advanced styling optionsstyle-guide://templates- Template usage guide
Performance Metrics
metrics://conversion-stats- Conversion performance datametrics://memory-usage- Memory usage statistics
๐จ Styling System
Basic Styling
{
document: {
defaultFont: "ๅฎไฝ",
defaultSize: 24,
defaultColor: "000000",
page: {
size: "A4",
orientation: "portrait",
margins: { top: 1440, bottom: 1440, left: 1440, right: 1440 }
}
},
headingStyles: {
h1: { font: "้ปไฝ", size: 64, color: "000000", bold: true },
h2: { font: "้ปไฝ", size: 32, color: "000000", bold: true }
}
}
Advanced Features
- Theme System: Color and font variables for consistent branding
- Header/Footer: Custom headers and footers with page numbers
- Watermarks: Text watermarks for document protection
- Table Styling: 12+ preset table styles with zebra striping
- Mathematical Formulas: Professional math formula rendering
๐ Table Styles
The server includes 12 professionally designed table styles:
- minimal - Clean modern style with thin borders
- professional - Business style with dark headers
- striped - Zebra striping for better readability
- grid - Complete grid borders for structured data
- elegant - Double borders for formal documents
- colorful - Colorful headers for vibrant presentations
- compact - Minimal margins for data-dense tables
- fresh - Green theme for environmental reports
- tech - Blue tech theme for technical documents
- report - Formal report style with double borders
- financial - Right-aligned numbers for financial data
- academic - Academic paper style
๐ง Configuration
Style Configuration
Full style configuration supports:
- Document-level settings (fonts, colors, page setup)
- Paragraph and heading styles
- Table and list formatting
- Image and code block styling
- Header/footer configuration
- Watermark settings
Transport Options
- STDIO: Standard input/output for local execution
- Streamable HTTP: HTTP transport for remote servers
๐ Project Structure
src/
โโโ index.ts # Main MCP server implementation
โโโ converter/
โ โโโ markdown.ts # Markdown to DOCX converter
โโโ template/
โ โโโ presetLoader.ts # Template system
โโโ types/
โ โโโ index.ts # Core types
โ โโโ style.ts # Style configuration types
โ โโโ template.ts # Template types
โโโ utils/
โโโ tableProcessor.ts # Table processing utilities
โโโ mathProcessor.ts # Mathematical formula processing
โโโ imageProcessor.ts # Image handling utilities
โโโ styleEngine.ts # Style application engine
โโโ errorHandler.ts # Error handling utilities
๐งช Testing
Run the test suite:
npm test
Available test scenarios:
- Mathematical formula conversion
- Local image embedding
- Page numbering and headers/footers
- Table styling and data import
- Complete document conversion
๐ Performance
- Fast Conversion: Optimized processing for large documents
- Memory Efficient: Stream-based processing for minimal memory usage
- Production Ready: Robust error handling and logging
- Scalable: Handles documents of any size efficiently
๐ค Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Built with the Model Context Protocol SDK
- Uses docx for Word document generation
- Inspired by the MCP community and ecosystem
๐ Support
- Issues: GitHub Issues
- Documentation: Full Documentation
- Examples: Example Files
AI Group Markdown to Word MCP Server - Professional document conversion powered by MCP protocol.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.