
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
@cylixlee/mdocx
Advanced tools
Markdown to DOCX converter and MCP server. Generates high-quality DOCX that requires no manual reformatting.

$...$ and block $$...$$, ```math fenced blocks[^label] syntaxnpx @cylixlee/mdocx --input paper.md --output paper.docx
Presets: --preset academic (default) or --preset minimal
Config file: --config style.json, see examples/sample-config.json
npm install -g @cylixlee/mdocx
# or
pnpm add -g @cylixlee/mdocx
mdocx --input paper.md
mdocx --input paper.md --output paper.docx
mdocx --input paper.md --preset minimal
mdocx --input paper.md --config style.json
mdocx --version
mdocx --help
| Option | Description |
|---|---|
-i, --input <file> | Input .md file (required) |
-o, --output <file> | Output .docx file (defaults to .docx extension) |
-p, --preset <name> | Style preset: academic or minimal (default academic) |
-c, --config <file> | JSON config file (may include preset, style, math, etc.) |
-v, --version | Output version number |
Presets: academic (default), minimal
Config file: see examples/sample-config.json for a full reference. --preset overrides the preset in a config file.
MCP mode: mdocx mcp starts an MCP server (stdio transport) for AI tools.
Generate DOCX directly from AI tools.
Edit opencode.json:
{
"mcp": {
"mdocx": {
"type": "local",
"command": ["npx", "-y", "@cylixlee/mdocx", "mcp"],
"enabled": true
}
}
}
Edit claude_desktop_config.json:
{
"mcpServers": {
"mdocx": {
"command": "npx",
"args": ["-y", "@cylixlee/mdocx", "mcp"]
}
}
}
convert_markdown_to_docx| Parameter | Type | Required | Description |
|---|---|---|---|
inputPath | string | ✓ | Input .md file path |
outputPath | string | Output .docx path (defaults to .docx extension) | |
preset | "academic" | "minimal" | Style preset | |
config | string | JSON config file path |
Academic (default) — Times New Roman + SimSun, 12pt, 1.5× line spacing, Heiti headings, first-line indent, three-line tables.
Minimal — Calibri, 11pt, 1.15× line spacing, colored inline elements, Consolas code font.
Customization: --config with a JSON file deep-merges over the preset.
Forked from markdown-docx · Built with marked, KaTeX, docx · CLI via commander · MCP via @modelcontextprotocol/sdk
This project is independently developed based on markdown-docx by Vace. I take full responsibility for the maintenance of this derivative work. Please do not report issues from this project to the original author; all issues should be submitted to this repository.
FAQs
Convert Markdown file to DOCX format
We found that @cylixlee/mdocx demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.