MarkView logo

MarkView

Community
paulhkang94

Native macOS markdown preview + MCP server for Claude Code. Swift/SwiftUI, GFM, Mermaid, syntax highlighting. No Electron.

Publisherpaulhkang94
Repositorymarkview
LanguageHTML
Forks
5
Stars
38
Available tools
2
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    MarkView exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 2 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    38 stars and 5 forks from the linked repository.

MarkView

App npm Glama

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 (app badge) and the npm MCP wrapper (npm badge) 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.

MarkView demo

Preview onlyEditor + Preview
PreviewEditor + Preview

Quick Start — Claude Code

One command to wire MarkView into every Claude Code session:

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

ToolWhat it does
preview_markdownRender markdown content in a live-reloading MarkView window
open_fileOpen an existing .md file in MarkView

Claude Desktop Setup

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{
  "mcpServers": {
    "markview": {
      "command": "npx",
      "args": ["mcp-server-markview"]
    }
  }
}

Note: MCP servers belong in ~/.claude.json (Claude Code) or claude_desktop_config.json (Claude Desktop), not ~/.claude/settings.json.

Installation

Homebrew (recommended)

bash
# 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)

bash
git clone https://github.com/paulhkang94/markview.git
cd markview
swift build -c release

Install as app (Open With support)

bash
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
bash scripts/install-cli.sh

Creates mdpreview and md symlinks in ~/.local/bin/.

Usage

CLI

bash
mdpreview README.md       # Open a file
mdpreview                 # Open empty editor

Finder

Right-click any .md, .markdown, .mdown, .mkd file > Open With > MarkView

Programmatic

bash
open -a MarkView README.md

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 .md files 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 ![](./image.png) correctly
  • Export to HTML and PDF
  • HTML sanitizer — strips scripts, event handlers, and XSS vectors
  • Drag and drop — drop any .md file 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

Sources/MarkViewCore/           # Library (no UI, fully testable)
  MarkdownRenderer.swift        # cmark-gfm C API wrapper
  FileWatcher.swift             # DispatchSource file monitoring
  MarkdownLinter.swift          # 9-rule pure Swift linting engine
  HTMLSanitizer.swift           # XSS prevention
  LanguagePlugin.swift          # Plugin protocol + registry
  Plugins/                      # CSV, HTML, Markdown plugins

Sources/MarkView/               # SwiftUI app (macOS 14+)
  ContentView.swift             # Split-pane editor + preview
  WebPreviewView.swift          # WKWebView with Prism.js
  ExportManager.swift           # HTML/PDF export

Sources/MarkViewMCPServer/      # MCP server for AI tool integration
  main.swift                    # stdio JSON-RPC (preview_markdown, open_file)

Tests/TestRunner/               # 403 standalone tests (no XCTest)
Tests/VisualTester/             # 5 visual regression tests + WCAG contrast
Tests/FuzzTester/               # 10K random input crash testing
Tests/DiffTester/               # Differential testing vs cmark-gfm CLI

See docs/ARCHITECTURE.md for full details.

Testing

bash
swift run MarkViewTestRunner    # 403 tests
python3 scripts/verify.py       # Full verification (build + tests, writes stamp)
python3 scripts/verify.py --extended  # + fuzz + differential
bash scripts/test-mcp.sh        # MCP protocol tests

Development

bash
swift build
swift run MarkView
swift run MarkView /path/to/file.md

Support

License

MIT — see LICENSE.

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "paulhkang94-markview": {
      "command": "npx",
      "args": [
        "-y",
        "markview"
      ]
    }
  }
}

Available Tools

  • preview_markdown

    Render a markdown string in MarkView's native macOS preview window. Supports GFM, Mermaid diagrams, code syntax highlighting (Prism.js), tables, task lists, and all CommonMark extensions.

  • open_file

    Open an existing markdown file from disk in MarkView. The file must exist and have a markdown extension (.md, .markdown).

Use MarkView MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MarkView is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add MarkView as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the MarkView MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "paulhkang94-markview": {
      "command": "npx",
      "args": [
        "-y",
        "markview"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MarkView MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the MarkView MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MarkView to help me with this task?
MarkView
Sure. I read it.
Here is what I found using MarkView.

Frequently asked questions

What is the MarkView MCP server used for?

MarkView is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MarkView MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MarkView with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MarkView MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MarkView connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MarkView MCP to TypingMind?

MarkView runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does MarkView MCP provide in TypingMind?

MarkView exposes 2 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MarkView MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MarkView requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇