kw-md2pdf-mcp
v1.0.0MCP server that converts Markdown to print-optimized A4 HTML (not a PDF: save as PDF via browser Ctrl+P).
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
markdown_to_html
Convert a Markdown string to print-optimized (A4) HTML and return the HTML text. NOTE: this does NOT produce a PDF; open the HTML in a browser and use Ctrl+P > Save as PDF. Raw HTML in the Markdown is escaped. For large documents prefer save_as_html_file to avoid returning a huge string.
| Parameter | Type | Description |
|---|---|---|
markdown * | string | Markdown content to convert |
theme | string | Visual theme: 'default' (clean white), 'technical' (dark code blocks), 'elegant' (serif, wide margins). Defaults to 'default'. |
title | string | HTML document title (optional, defaults to 'Document') |
save_as_html_file
Convert Markdown to print-optimized (A4) HTML and save it to a file (not a PDF; print it from a browser). output_path must end with .html/.htm and lie inside the working directory or MD2PDF_ALLOWED_DIRS.
| Parameter | Type | Description |
|---|---|---|
markdown * | string | Markdown content to convert |
output_path * | string | Path to save the HTML file (must end with .html or .htm, inside an allowed directory) |
theme | string | Visual theme (optional, defaults to 'default') |
title | string | HTML document title (optional) |
convert_file
Read a .md/.markdown file and convert it to a print-optimized (A4) HTML file (not a PDF; print it from a browser). Input and output must lie inside the working directory or MD2PDF_ALLOWED_DIRS. If output_path is omitted, saves next to the input with .html.
| Parameter | Type | Description |
|---|---|---|
input_path * | string | Path to the input .md or .markdown file (inside an allowed directory) |
output_path | string | Path to save the output HTML file (optional, defaults to same directory as input with .html extension) |
theme | string | Visual theme (optional, defaults to 'default') |
title | string | HTML document title (optional, defaults to the input file name) |