
原生macOS markdown预览版+Claude代码MCP服务器。Swift/SwiftUI、GFM、Mermaid、语法高亮功能。没有Electron。
概览
Claude Code 的原生 macOS markdown 预览,使用 MCP 服务器。Claude 编写 Markdown — MarkView 在你工作时实时渲染,在真实的原生窗口中。 macOS 应用(应用徽章)和 npm MCP 包装器(npm 徽章)分别有版本限制。应用发布是在 Swift 二进制文件更改时发布;npm 补丁则用于 MCP 服务器改进。两个徽章始终显示最新版本。 一个命令可以将MarkView接入每个Claude Code会话: 就这些。Claude 现在可以调用 preview_markdown 在原生 macOS 窗口中渲染任意 markdown 字符串,或者open_file直接打开任何 .md 文件。 添加到 ~/Library/Application Support/Claude/claude_desktop_config.json: MCP 服务器应位于 ~/.claude.json(Claude Code)或 claude_desktop_config.json(Claude Desktop),而非 ~/.claude/settings.json。 macOS 14+,Swift 6.0+(Xcode 命令行工具) 在 /Applications 创建 MarkView.app,并注册到启动服务,右键点击 > 在 Finder 中打开。
概述(AI 翻译)
&color=绿色)
Claude Code 的原生 macOS markdown 预览,使用 MCP 服务器。Claude 编写 Markdown — MarkView 在你工作时实时渲染,在真实的原生窗口中。
**版本:**macOS 应用(
app)徽章)和 npm MCP 包装器([npm徽章)分别有版本限制。应用发布发生在 Swift 二进制文件更改时;npm 补丁用于 MCP 服务器改进。两个徽章始终显示最新版本。
| 仅预览 | 编辑器 + 预览 |
|---|---|
快速入门 — 克劳德代码
一个命令可以将MarkView接入每个Claude Code会话:
仅此而已。Claude 现在可以调用 preview_markdown 来渲染 macOS 原生窗口中的任意 markdown 字符串,或者调用 open_file 直接打开任意 .md 文件。
| 工具 | 它的作用 |
|---|---|
preview_markdown |
在实时重新加载的MarkView窗口中渲染markdown内容 |
open_file |
在MarkView中打开一个已有的.md文件 |
Claude桌面设置
加到~/Library/Application Support/Claude/claude_desktop_config.json:
注: MCP服务器应属于
~/.claude.json(Claude代码)或claude_desktop_config.json(Claude桌面版),而非~/.claude/settings.json。
安装
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MarkView
Native macOS markdown preview with MCP server for Claude Code. Claude writes markdown — MarkView renders it live, in a real native window, while you work.
Versions: The macOS app (
appbadge) and the npm MCP wrapper (npmbadge) are versioned independently. App releases happen when the Swift binary changes; npm patches happen for MCP server improvements. Both badges always show the latest of each.
| Preview only | Editor + Preview |
|---|---|
Quick Start — Claude Code
One command to wire MarkView into every Claude Code session:
claude mcp add --transport stdio --scope user markview -- npx mcp-server-markview
That’s it. Claude can now call preview_markdown to render any markdown string in a native macOS window, or open_file to open any .md file directly.
| Tool | What it does |
|---|---|
preview_markdown |
Render markdown content in a live-reloading MarkView window |
open_file |
Open an existing .md file in MarkView |
Claude Desktop Setup
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"markview": {
"command": "npx",
"args": ["mcp-server-markview"]
}
}
}
Note: MCP servers belong in
~/.claude.json(Claude Code) orclaude_desktop_config.json(Claude Desktop), not~/.claude/settings.json.
Installation
Homebrew (recommended)
# Full .app with Quick Look extension — Apple notarized, Gatekeeper approved
brew install --cask paulhkang94/markview/markview
# CLI only (builds from source)
brew tap paulhkang94/markview
brew install markview
Build from source
Prerequisites: macOS 14+, Swift 6.0+ (Xcode Command Line Tools)
git clone https://github.com/paulhkang94/markview.git
cd markview
swift build -c release
Install as app (Open With support)
bash scripts/bundle.sh --install
Creates MarkView.app in /Applications and registers it with Launch Services for right-click > Open With in Finder. Refuses (unless you pass --force) if a Dock tile is pinned to a build/ or repo-root MarkView.app path, since both are ephemeral dev output.
Install CLI
bash scripts/install-cli.sh
Creates mdpreview and md symlinks in ~/.local/bin/.
Usage
CLI
mdpreview README.md # Open a file
mdpreview # Open empty editor
安装
npx mcp-server-markview配置
{
"mcpServers": {
"markview": {
"command": "npx",
"args": ["mcp-server-markview"]
}
}
}