# aigroup-mdtoword-mcp

Converts Markdown into ready .docx files with tables, formulas, images, and Mermaid diagrams. Runs locally over MCP.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 14
- Author: jackdark425
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/jackdark425/aigroup-mdtoword-mcp
- Updated: 2026-04-24
- HTML: https://affpapa.org/en/nevibecode/mcp/aigroup-mdtoword-mcp

## What it does

The server exposes two tools: `markdown_to_docx` builds a document from text or a file, applies styling templates, embeds images, and renders diagrams; `table_data_to_markdown` converts CSV and JSON into Markdown tables. It uses the `docx` engine by Dolan Miu, ships report templates (business, academic, technical, minimal), heading and table styles, and supports headers, footers, page numbers, and watermarks. Math is written in LaTeX notation (`$E = mc^2$`), Mermaid renders into diagrams.

Requires Node.js 18 or higher. Runs via `npx -y aigroup-mdtoword-mcp` or locally after `npm install && npm run build`. Can work over HTTP and deploy to Cloudflare Worker. Relative image paths are read from the filesystem and embedded into the document.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add aigroup-mdtoword-mcp -- npx -y aigroup-mdtoword-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add aigroup-mdtoword-mcp -- npx -y aigroup-mdtoword-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "aigroup-mdtoword-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "aigroup-mdtoword-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "aigroup-mdtoword-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "aigroup-mdtoword-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add aigroup-mdtoword-mcp npx -y aigroup-mdtoword-mcp
```

## When to use it
- build `.docx` from Markdown with tables, formulas, and diagrams
- apply a styling template to a report
- embed local images into a Word document
- convert CSV or JSON into a Markdown table
- add headers, footers, page numbers, and watermarks

## Example prompts
- Turn `report.md` into a Word document with the business template
- Convert this JSON table to Markdown and add it to the report
- Embed the Mermaid diagram from `workflow.md` into `.docx` with formulas

## Similar
- [Excel MCP Server](https://affpapa.org/en/nevibecode/mcp/excel-mcp-server.md) — MCP server · ★ 4259
- [kordoc](https://affpapa.org/en/nevibecode/mcp/kordoc.md) — MCP server · ★ 2726
- [Power BI Authoring MCP Server (Local)](https://affpapa.org/en/nevibecode/mcp/power-bi-authoring-mcp-server-local.md) — MCP server · ★ 1247
- [Microsoft 365 MCP Server](https://affpapa.org/en/nevibecode/mcp/microsoft-365-mcp-server.md) — MCP server · ★ 1074
- [anymd](https://affpapa.org/en/nevibecode/mcp/anymd.md) — MCP server · ★ 1051
- [Docling MCP](https://affpapa.org/en/nevibecode/mcp/docling-mcp.md) — MCP server · ★ 777

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
