Markdown to PDF Converter MCP server

Converts Markdown to styled PDFs, enabling creation of visually appealing documents with code highlighting and typography.
Back to servers
Provider
Sean Horvath
Release date
Feb 04, 2025
Language
Python
Stats
7 stars

The md-pdf-mcp server enables you to convert Markdown files to beautifully styled PDFs using VS Code's markdown styling combined with Python's ReportLab. This tool allows for seamless transformation of your markdown documents into professional PDF format.

Installation

Setting Up with Claude Desktop

To integrate the md-pdf-mcp server with Claude Desktop, you'll need to modify your Claude Desktop configuration file:

On MacOS:

  • Configuration file location: ~/Library/Application\ Support/Claude/claude_desktop_config.json

On Windows:

  • Configuration file location: %APPDATA%/Claude/claude_desktop_config.json

Add one of the following configurations to the file:

For Development/Unpublished Servers

"mcpServers": {
  "md-pdf-mcp": {
    "command": "uv",
    "args": [
      "--directory",
      "/Users/path/to/your/local/md-pdf-mcp",
      "run",
      "md-pdf-mcp"
    ]
  }
}

For Published Servers

"mcpServers": {
  "md-pdf-mcp": {
    "command": "uvx",
    "args": [
      "md-pdf-mcp"
    ]
  }
}

Using the Server

Working with Notes

The md-pdf-mcp server implements a simple note storage system that you can interact with:

  • Notes are accessible via a custom note:// URI scheme
  • Each note has a name, description, and text/plain mimetype

Using the Add-Note Tool

You can add new notes to the server using the provided tool:

  1. Use the add-note tool with the following required arguments:
    • name: A string identifier for your note
    • content: The markdown content as a string

When you add a note, the server will:

  • Update its internal state
  • Notify any connected clients about the resource changes

Working with Prompts

The server provides a summarize-notes prompt that:

  • Creates summaries of all stored notes
  • Accepts an optional style argument to control detail level:
    • Use brief for concise summaries
    • Use detailed for more comprehensive summaries
  • Generates a prompt that combines all current notes with your style preference

Example Workflow

  1. Add a markdown note to the server
  2. Request a summary of your notes with your preferred style
  3. When ready, convert your markdown to a styled PDF

Debugging with MCP Inspector

For troubleshooting, you can use the MCP Inspector:

npx @modelcontextprotocol/inspector uv --directory /path/to/your/md-pdf-mcp run md-pdf-mcp

After launching, the Inspector will display a URL that you can open in your browser to begin debugging the server.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later