MarsDawn logo

MarsDawn

Exports Markdown to PDF and opens Markdown files in MarsDawn on macOS through the marsdawn CLI.

Install MarsDawn

Run the project’s own setup commands, in order.

Setup steps from the project

MarsDawn installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Start the server
    node /absolute/path/to/marsdawn-mcp/server/index.js /Users/me/Documents /Users/me/Projects
    
  2. 2. Install
    git clone https://github.com/redtear1115/marsdawn-mcp.git
    
  3. 3. Run
    cd marsdawn-mcp
    
  4. 4. Install
    npm ci --omit=dev
    
  5. 5. Start the server
    node /absolute/path/to/marsdawn-mcp/server/index.js
    

Overview

MarsDawn MCP server exposes the MarsDawn CLI's Markdown-to-PDF export and file-opening functions to MCP clients on macOS. It runs the installed `marsdawn` executable over stdio and returns the CLI's JSON results as structured tool output. Use it when an agent needs to render Markdown with MarsDawn themes or open a file in the MarsDawn app without its own shell.

Use cases

  • Export Markdown documents to themed PDF files
  • Open a generated Markdown file at a specific line
  • Render Mermaid diagrams from Markdown
  • Restrict agent file access to approved folders

Key features

  • Markdown-to-PDF export through the MarsDawn CLI
  • MarsDawn app opening with line targeting
  • Theme, paper size, overwrite, and remote-image options
  • MCP roots and explicit allowed-folder checks
  • Structured JSON results and CLI error messages

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

11/11 checks healthy over the last 44d

How MarsDawn works

What MarsDawn MCP server does

The MarsDawn MCP server gives an MCP client two tools for working with Markdown files on macOS. export_markdown_to_pdf invokes the MarsDawn CLI to render a Markdown file as a PDF, while open_in_marsdawn opens an existing Markdown file in the MarsDawn app. Both tools return the CLI's JSON response, including actionable error messages when an operation fails.

PDF export uses MarsDawn's preview rendering, including Mermaid diagrams. Callers can select the dawn, classic, modern, or vivid theme; choose A4 or Letter paper; replace an existing PDF with force; and optionally load remote images with allowRemoteImages. The output path defaults to a PDF beside the input file.

The opening tool accepts a line number and a background option. Once a file is opened, later edits to that file are followed by the app window without another call. Opening folders is not supported because the current MarsDawn CLI does not provide the required folder behavior.

How it works

The MarsDawn MCP server communicates with the client over stdio. Each tool call is translated into a JSON-enabled CLI command: export calls marsdawn export, and opening a file calls marsdawn open. The executable is selected from MARSDAWN_PATH when set, then from PATH, /opt/homebrew/bin, or /usr/local/bin.

Before starting the CLI, the server checks every path against its allowed locations. Paths must be absolute and cannot contain . or .., duplicate separators, or a trailing slash. Resolved files and their containing folders must remain inside an allowed folder, including when symlinks are involved. PDF output must use a .pdf extension and cannot be a symlink.

Setup and configuration

Use macOS with MarsDawn 0.5.0 or newer and Node.js 20 or newer. The CLI can be installed with Homebrew:

sh
brew install redtear1115/tap/marsdawn

Install the server from source with npm ci --omit=dev, then configure the MCP client to run:

sh
node /absolute/path/to/marsdawn-mcp/server/index.js /Users/me/Documents /Users/me/Projects

The positional arguments define folders the server may access. The client may also provide MCP roots. Roots are requested for each tool call, with caching only when the client announces root changes. A call is refused when neither configured folders nor usable roots are available. Claude Desktop does not provide roots, while Claude Code does, so explicit allowed folders are needed for clients without roots.

The MarsDawn app must be installed for open_in_marsdawn; the README identifies the Mac App Store version. A missing app is reported with the CLI-style error response rather than as an unhandled tool exception.

Tools and capabilities

  • export_markdown_to_pdf: Converts an absolute Markdown path to a PDF, with theme, paper size, overwrite, and remote-image options.
  • open_in_marsdawn: Opens an existing Markdown file, optionally at a specified line and without bringing the app to the foreground.
  • Structured results: Preserves the MarsDawn CLI's JSON output for successful and failed operations.
  • Access boundaries: Applies folder, symlink, file-type, and path-format checks before invoking the CLI.

Limitations and notes

This server is a bridge for clients that do not have a shell. If an agent already has shell access, running marsdawn directly may be simpler. The server does not expand folder-setting placeholders, so allowed folders must be entered as actual paths in the client configuration.

An existing PDF is left unchanged unless force is enabled. Inside an allowed folder, replacement behavior follows the CLI, including its handling of hard links. A nonexistent input inside an allowed folder is passed to the CLI so its own input_not_found response can explain the problem; paths outside the permitted area are rejected without checking whether they exist.

The project is licensed under Apache License 2.0. Release 0.2.4 is listed in the MCP Registry, and the first release was distributed as an MCP Bundle.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MarsDawn

MarsDawn is an MCP server that connects MCP clients to the MarsDawn CLI and macOS app. Its main tools export Markdown to PDF and open Markdown files in MarsDawn, returning the CLI's JSON results. PDF export supports themes, paper sizes, Mermaid rendering, overwrite control, and optional remote images.

Install Node.js 20 or newer, MarsDawn 0.5.0 or newer, and the server dependencies from source. Run `npm ci --omit=dev`, then configure your MCP client to launch `server/index.js` with absolute allowed-folder paths as arguments.

Yes, MarsDawn works with Claude Desktop over stdio, but Claude Desktop does not provide MCP roots. Add explicit allowed folders in the client settings before making tool calls.

Pass an absolute `output` path ending in `.pdf` to `export_markdown_to_pdf`. If omitted, the server derives a PDF path from the Markdown input and checks it against the allowed folders.

Yes, set the `line` argument on `open_in_marsdawn` to a value from 1 through 999999999. The tool opens the existing file at that location and can use `background` to avoid bringing MarsDawn to the foreground.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMarsDawn AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/marsdawn?style=directory)](https://allmcps.com/mcp/marsdawn)
HTML Embed
<a href="https://allmcps.com/mcp/marsdawn"><img src="https://allmcps.com/api/badge/marsdawn?style=directory" alt="MarsDawn on AllMCPs" /></a>