- Home
- MCP servers
- MCP MD2PDF Server
MCP MD2PDF Server
- other
0
GitHub Stars
other
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"valyc0-mcp-md2pdf": {
"command": "python3",
"args": [
"/path/to/mcp_md2pdf_server.py"
]
}
}
}MCP MD2PDF Server provides a complete Markdown-to-PDF conversion capability with Mermaid diagram support. It can run as a standalone script for quick, file-based conversions or as an MCP server for programmatic use through a client, enabling structured responses and advanced content management.
How to use
You can use the server in two ways: as a local, command-line tool for direct conversions, or as an MCP server that accepts requests from an MCP client and returns structured results. In MCP mode you connect via stdio and send a tool call with Markdown content or a Markdown file path, then receive a JSON response that includes the PDF data or a path to the output.
To configure a client for MCP mode, specify a stdio-based connection that runs the Python MCP server script. Use the following configuration as a starting point. It starts the server via Python and points to the server script. You can adjust the working directory to where your project stores its resources.
{
"mcpServers": {
"md2pdf": {
"command": "python3",
"args": ["/path/to/mcp_md2pdf_server.py"],
"cwd": "/workspace/db-ready/md2pdf/"
}
}
}
What you can do with MCP mode
In MCP mode you gain structured control over conversion parameters, including output file naming, document metadata, and optional features like a table of contents and custom page sizes. The MCP endpoint exposes tools for converting Markdown to PDF from content you provide or from existing Markdown files, and it returns results in JSON along with the generated PDF data.
Available tools
convert_md_to_pdf
Converts a Markdown string into a PDF, allowing optional title, author, page size, table of contents, and syntax highlighting style. Returns a structured JSON response that includes the PDF data or a base64 representation, plus status and messages.
convert_md_file_to_pdf
Converts a Markdown file to PDF using a given input path and optional output path, title, author, papersize, toc, and highlight_style. Returns a JSON payload with success status, output path, filename, and size details.
list_highlight_styles
Lists the available syntax highlighting styles supported by the conversion pipeline.
get_pandoc_info
Provides information about the Pandoc version in use and available PDF engines, plus availability of Mermaid rendering features.