
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 分