AI Group Markdown to Word MCP Server

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.

Category
访问服务器

README

AI Group Markdown to Word MCP Server

License: MIT Node.js Version MCP Protocol

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 template
  • template://academic - Academic paper template
  • template://business - Professional business report
  • template://technical - Technical documentation
  • template://minimal - Clean minimal template

Style Guides

  • style-guide://quick-start - Quick styling reference
  • style-guide://advanced - Advanced styling options
  • style-guide://templates - Template usage guide

Performance Metrics

  • metrics://conversion-stats - Conversion performance data
  • metrics://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:

  1. minimal - Clean modern style with thin borders
  2. professional - Business style with dark headers
  3. striped - Zebra striping for better readability
  4. grid - Complete grid borders for structured data
  5. elegant - Double borders for formal documents
  6. colorful - Colorful headers for vibrant presentations
  7. compact - Minimal margins for data-dense tables
  8. fresh - Green theme for environmental reports
  9. tech - Blue tech theme for technical documents
  10. report - Formal report style with double borders
  11. financial - Right-aligned numbers for financial data
  12. 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.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📞 Support


AI Group Markdown to Word MCP Server - Professional document conversion powered by MCP protocol.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选