MarsDawn

dev.southern-light.mcp由 mcp.southern-light.dev 发布v0.2.4更新于 Oct 25, 2026

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

已验证STDIO仅桌面文件与存储开发者工具

概览

AI 生成的概览

仅限 macOS 的 MCP 服务器,通过调用本地 marsdawn 命令行工具,让助手把 Markdown 导出为 PDF 并在 MarsDawn 应用中打开。

可以做什么
将 Markdown 文件导出为 PDF,可选择主题、纸张大小,并可选覆盖已有 PDF,返回 CLI 的 JSON 结果作为结构化内容,Mermaid 图表按 MarsDawn 预览效果渲染。在 MarsDawn 应用中打开已有的 Markdown 文件,可定位到指定行,也可在后台打开。两个工具都只能在用户允许的文件夹内工作,允许范围来自扩展的允许文件夹设置或 MCP roots,拒绝信息会列出允许的文件夹。
适用场景
适用于 macOS 上助手需要把 Markdown 文档转成 PDF,或把 Markdown 文件交给 MarsDawn 应用查看的场景,尤其适合自身没有 shell 的客户端。若已有 shell,直接运行 marsdawn 命令更简单。
运行要求
macOS,已安装 marsdawn CLI 0.5.0 或更高版本(例如通过 Homebrew),以及 Node.js 20 或更高版本;打开文件还需要从 Mac App Store 安装 MarsDawn 应用。必须至少配置一个允许的文件夹,或由客户端提供 MCP roots,否则所有调用都会被拒绝。CLI 依次在 MARSDAWN_PATH、PATH 以及常见 Homebrew bin 目录中查找。
安装前请注意
两个工具都会写入磁盘:导出会创建 PDF,带 force 时会替换已有 PDF,README 说明在允许文件夹内 force 仍会覆盖。除非启用 allowRemoteImages,否则不会加载网络图片。沙箱宽度取决于最宽的来源,若客户端允许代理自行扩大 roots,就等于扩大了自身的限制范围。拒绝信息会把已配置的文件夹路径透露给模型。

安装

在 SourceWeft 中

  1. 打开 控制台中的 MarsDawn,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

marsdawn-mcp

An MCP server that lets an AI agent export Markdown to PDF and open Markdown files in the MarsDawn app, on macOS, by running the marsdawn command-line tool you already have. It's a channel for clients that have no shell of their own; where a shell is available, driving marsdawn directly is simpler.

The first release, 0.1.0, is an MCP Bundle, marsdawn.mcpb, attached to the release.

0.2.4, the latest release, is listed in the MCP Registry as dev.southern-light.mcp/marsdawn.

What it does

Two tools.

export_markdown_to_pdf

Runs marsdawn export <input> --json and returns the CLI's JSON result as structured content, so the PDF looks the way it does from the command line: rendered like MarsDawn's preview, Mermaid diagrams included.

Argument
inputAbsolute path of the Markdown file, inside an allowed folder. Required.
outputAbsolute path for the PDF, inside an allowed folder, ending in .pdf. Defaults to the input path with a .pdf extension.
themedawn, classic, modern or vivid.
papera4 or letter.
forceReplace an existing PDF. Without it, an existing PDF is left alone and the tool says so.
allowRemoteImagesLoad web images while rendering. Off by default.

open_in_marsdawn

Runs marsdawn open <path>[:line] --json and returns the CLI's JSON result. Needs the MarsDawn app installed, from the Mac App Store; call it once per file, since the window it opens follows that file's later edits by itself, without being called again.

Argument
pathAbsolute path of an existing Markdown file, not a folder, inside an allowed folder. Required.
lineLine to land on, 1 to 999999999.
backgroundOpen without bringing MarsDawn to the front.

No folder yet: the launch build's marsdawn open --folder answers with an error dialog in the app, so this tool doesn't offer it. It returns once folders ship in app 1.1 and the site publishes open.v3.json for them.

A failure from either tool comes back as an error with the CLI's message and what to do next. A missing MarsDawn app (open_in_marsdawn only) comes back the same way, not as a thrown error.

Where it may read and write

Both tools work only inside folders you allow. There are two ways to name one, and the server uses both together:

  • The extension's settings. "Allowed folders" is a multi-value setting with no preset value: add the folders you want, for example your Documents folder, and save. Each folder becomes one argument to the server. Until one is added, every call is refused with a message that says so. (A preset would not help: Claude Desktop does not expand ${DOCUMENTS}-style placeholders in a folder setting's default, and a required setting keeps the server from starting at all until it is saved.)
  • MCP roots. If your client offers the roots capability, the server asks it for the current roots on each tool call (and caches them only when the client promises to announce changes). Roots are the client's claim about your workspace, not something this server controls: the sandbox is as wide as the widest source, so a client where the agent can widen its own workspace widens its own confinement. Claude Desktop doesn't send roots; Claude Code does.

From source, the folders are the positional arguments:

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

With neither a folder nor a root, every call is refused. So is a call the server can't check: if the client's roots/list answers with an error, a malformed result or nothing at all, that call sees no roots rather than everything.

The rules, applied before marsdawn is ever started:

  • Every path must be a plain absolute path — no . or .. components, no //, no trailing slash — so the string the server checks is the string the CLI receives.
  • The folder the path is in, resolved through symlinks, must be inside an allowed folder, and so must the file itself. A symlink that leads out of the tree is refused from either end.
  • output must name a .pdf file, must not be a symlink, and must not be anything other than a regular file. A missing output becomes <input without its extension>.pdf and is checked the same way, then passed to the CLI as --output.
  • Anything outside gets one refusal that names the allowed folders, whether or not the path exists, so neither tool says what is there. That message does tell the model your folder paths; a deliberate trade, so an agent can pick a valid path instead of retrying blindly.
  • A file that doesn't exist inside an allowed folder is passed through, so the CLI's own input_not_found still comes back with its next step. A symlink there whose target can't be resolved is not a missing file: it gets the same refusal as one that leads outside.

What this does not do: inside an allowed folder, force still replaces an existing PDF, exactly as on the command line. And if the destination is a hard link, the PDF replaces the directory entry rather than the bytes — the CLI renders to a temporary file beside the destination and swaps it in — so the other link keeps the old contents. Both are the CLI's behaviour, unchanged.

Requirements

  • macOS, with marsdawn 0.5.0 or later: brew install redtear1115/tap/marsdawn.
  • Node.js 20 or later.

The server looks for marsdawn at the path in MARSDAWN_PATH if that's set, then in PATH, then in /opt/homebrew/bin and /usr/local/bin.

Run it from source

sh
git clone https://github.com/redtear1115/marsdawn-mcp.gitcd marsdawn-mcpnpm ci --omit=dev

Then point your MCP client at node /absolute/path/to/marsdawn-mcp/server/index.js over stdio, with the folders it may work in as arguments (see Where it may read and write).

Development

sh
npm cinpm test               # unit and stdio tests, against a fake marsdawnnpm run check-schemas  # the vendored schemas match the ones the site publishesnpx mcpb validate manifest.jsonnode scripts/check-server-json.js   # server.json's fileSha256 matches the release asset

schemas/ holds copies of the JSON Schemas published at https://marsdawn.southern-light.dev/schemas/cli/. The site is where they're written; update them by copying the published files, never by editing them here.

License

Apache License 2.0. See LICENSE.

来源:README.md,提交 ece3187

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

4
  1. v0.2.4最新Oct 9, 2026
  2. v0.2.3Sep 25, 2026
  3. v0.2.2Sep 23, 2026
  4. v0.2.1Sep 23, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分