Getting started
github.com/Serendipity-AI/markdown2pdf-mcpFor Claude Desktop users
Get started using the pre-built markdown2pdf server in Claude for Desktop. You can find our MCP server here. In this tutorial you will extend Claude for Desktop so that it can convert markdown to PDF using this service, prompting for payment when required. You can see how this looks below.
1. Download Claude for Desktop
First, download Claude for Desktop for macOS or Windows, then follow the installation instructions. Anthropic does not publish a Linux build of Claude for Desktop, but the markdown2pdf server itself runs anywhere Node.js 18 or later runs, so Linux users can use it from another MCP client such as Claude Code. If you already have Claude for Desktop, make sure it’s on the latest version by clicking on the Claude menu on your computer and selecting “Check for Updates…”Can I use it outside Claude for Desktop?
Can I use it outside Claude for Desktop?
Yes. The markdown2pdf server is a local stdio server, so it works in any MCP client that runs local servers, including Claude for Desktop and Claude Code. To add it to Claude Code, run:
2. Add the markdown2pdf server
To add this functionality, we will be installing a pre-built markdown2pdf server in Claude for Desktop. Get started by opening up the Claude menu on your computer and select “Settings…” Please note that these are not the Claude Account Settings found in the app window itself. This is what it should look like on a Mac:

- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
markdown2pdf entry under "mcpServers", keeping any servers already listed there. For a new, empty file, the full contents look like this:
- On macOS, open the Terminal from your Applications folder.
- On Windows, press Windows + R, type “cmd”, and press Enter.
3. Restart Claude
After updating your configuration file, quit and restart Claude for Desktop. Claude for Desktop then starts the markdown2pdf server, and themarkdown2pdf tool appears in the list of tools and connectors available to your chats.
4. Try it out!
You can now ask Claude to convert any markdown content to PDF. Claude asks for your approval before it calls the tool.The markdown2pdf tool
The server provides a single tool,markdown2pdf, which takes these inputs:
Paying with Lightning
The markdown2pdf server takes payment over Lightning only (L402), not X402. Each conversion runs like this:1
Claude requests the conversion
The tool returns a Lightning invoice for 5 sats, with a link to a QR code for it.
2
You pay the invoice
Pay the invoice from your own Lightning wallet, either by scanning the QR code or by pasting the invoice.
3
Claude runs the conversion again
Ask Claude to run the same conversion again. The server recognises the paid request and returns a link to your PDF.
The repeat request must carry the same content, title and date as the first one. Because the date forms part of the request, a repeat on a later day produces a new invoice.

