Easily use markdown2pdf.ai to convert markdown (.md) to high-quality and impactful PDF in your Model Context Protocol (MCP)-based agentic workflows using our MCP server.
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.Don’t worry — it will ask you for your permission before executing these actions!
First, start by downloading Claude for Desktop, choosing either macOS or Windows. (Linux is not yet supported for Claude for Desktop.)Then follow the installation instructions.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…”
Why Claude for Desktop and not Claude.ai?
Because servers are locally run, MCP currently only supports desktop hosts. Remote hosts are in active development.
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:Click on “Developer” in the left-hand bar of the Settings pane, and then click on “Edit Config”:This will create a configuration file at:macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.jsonif you don’t already have one, and will display the file in your file system. Open up the configuration file in any text editor. Replace the file contents with this:
You will also need Node.js on your computer for this to run properly. To verify you have Node installed, open the command line on your computer.On macOS, open the Terminal from your Applications folder
On Windows, press Windows + R, type “cmd”, and press Enter
Once in the command line, verify you have Node installed by entering in the following command:
Copy
node --version
If you get an error saying “command not found” or “node is not recognized”, download Node from nodejs.org.
How does the configuration file work? This configuration file tells Claude for Desktop which MCP servers to start up every time you start the application. In this case, we have added one server called “markdown2pdf” that will use the Node npx command to install and run @modelcontextprotocol/markdown2pdf. This server, described here, will let you convert markdown to PDF.
Command Privileges Claude for Desktop will run the commands in the configuration file with the permissions of your user account, and access to your local files. Only add commands if you understand and trust the source.
After updating your configuration file, you need to restart Claude for Desktop.Upon restarting, you should see a settings icon in the bottom left corner of the input box:After clicking on the settings icon, you should see the tools that come with the markdown2pdf server.
You can now talk to Claude and ask it to convert any markdown content in to PDF format. It should know when to call the relevant tools and facilitate any payments required. As needed, Claude will call the relevant tools and seek your approval before taking an action.