# MarsDawn [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/redtear1115/marsdawn-mcp  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/marsdawn

## Description
Export Markdown to PDF and open it in the MarsDawn app on macOS, with the marsdawn CLI.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/redtear1115/marsdawn-mcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Start the server:

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

2. Install:

```sh
git clone https://github.com/redtear1115/marsdawn-mcp.git
```

3. Run:

```sh
cd marsdawn-mcp
```

4. Install:

```sh
npm ci --omit=dev
```

5. Start the server:

```sh
node /absolute/path/to/marsdawn-mcp/server/index.js
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/marsdawn/readme_

