
MarkView
io.github.paulhkang94由 GitHub 账号 paulhkang94 发布v1.7.2更新于 Oct 24, 2026
Native macOS markdown preview with MCP server for Claude Code. Swift/SwiftUI, no Electron.
概览
让助手在原生 macOS MarkView 预览窗口中渲染 Markdown 字符串或打开 .md 文件。
- 可以做什么
- MarkView 是一款原生 macOS Markdown 预览应用,附带一个小型 MCP 服务器,提供两个工具:preview_markdown 在可实时刷新的 MarkView 窗口中渲染 Markdown 字符串,open_file 在应用中打开已有的 .md 文件。渲染支持 GitHub 风格 Markdown、Mermaid 图表、语法高亮和本地图片路径。应用本身还提供分栏编辑器、语法检查和 HTML/PDF 导出。
- 适用场景
- 适合在 macOS 上使用 Claude Code 或 Claude Desktop,并希望把 Markdown 输出显示在原生窗口中而不是终端或浏览器标签页时使用。尤其适合边写边查看生成的文档、README 或笔记。
- 运行要求
- 需要 macOS 14 或更高版本,并安装 MarkView 应用(推荐 Homebrew cask,或用 Swift 6.0+ 与 Xcode 命令行工具从源码构建)。MCP 服务器通过 npx mcp-server-markview 以 stdio 在本地运行,因此需要 Node.js。未声明任何账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 MarkView,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
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.
Quick Start — Claude Code
One command to wire MarkView into every Claude Code session:
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.
Claude Desktop Setup
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Note: MCP servers belong in
~/.claude.json(Claude Code) orclaude_desktop_config.json(Claude Desktop), not~/.claude/settings.json.
Installation
Homebrew (recommended)
Build from source
Prerequisites: macOS 14+, Swift 6.0+ (Xcode Command Line Tools)
Install as app (Open With support)
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
Creates mdpreview and md symlinks in ~/.local/bin/.
Usage
CLI
Finder
Right-click any .md, .markdown, .mdown, .mkd file > Open With > MarkView
Programmatic
Features
- GitHub Flavored Markdown via swift-cmark (tables, strikethrough, autolinks, task lists, footnotes)
- Mermaid diagrams — flowcharts, sequence, Gantt, ER, and pie charts
- Syntax highlighting via Prism.js (18 languages)
- Quick Look integration — spacebar-preview
.mdfiles in Finder without opening the app - Markdown linting with 9 built-in rules and status bar diagnostics
- Live split-pane editor with WKWebView rendering and bidirectional scroll sync
- File watching with DispatchSource — works with VS Code, Vim, and other editors
- Local image rendering — inlines relative paths like
correctly - Export to HTML and PDF
- HTML sanitizer — strips scripts, event handlers, and XSS vectors
- Drag and drop — drop any
.mdfile onto the window to open - Find & Replace — Cmd+F / Cmd+Option+F
- Format on save — auto-applies lint fixes
- Auto-save, word count, line numbers, scroll position preservation
- Dark mode — system/light/dark theme options, 18 configurable settings
Architecture
See docs/ARCHITECTURE.md for full details.
Testing
Development
Support
- GitHub Sponsors
- Star this repo to help others find it
License
MIT — see LICENSE.
来源:README.md,提交 523804c
工具
0版本历史
1- v1.7.2最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分