Skip to content
Conduit

mcp server

md-viewer

Minimalist editorial Markdown studio & reader with native Mermaid diagrams, KaTeX math formulas, password-protected sharing, and Model Context Protocol (MCP) support.

ekacahya21/md-viewercommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 26, 2026

MD Viewer

A minimalist Markdown editor and reader with native math, Mermaid diagrams, instant zero-account link sharing, and password protection.

Live Demo CI Pipeline Production Deploy License: MIT Node.js 22+ React 19 TypeScript Docker M8ven Score


Features

  • Reader & Split Views: Seamlessly switch between reading mode, distraction-free editing, and synchronized split view.
  • Math & Diagrams: Native rendering for KaTeX LaTeX formulas ($...$ and $$...$$) and Mermaid diagrams (flowcharts, sequence, state, ER, class, Gantt).
  • Zero-Account Sharing: Generate a short link (/s/:id) with an optional QR code in one click. No registration required.
  • Password Protection & Burn-After-Reading: Secure shared documents with bcrypt password protection or self-destructing links that permanently burn on first view.
  • Re-publish Shared Docs: Authors receive an edit token saved locally in the browser/CLI, allowing you to update a shared document without changing its URL.
  • AI Document Summaries: Instant asynchronous document executive summaries powered by local LLM endpoints (Ollama/9router/OpenAI-compatible).
  • Bilingual Interface: Seamless language switching between English and Indonesian (en / id).
  • Multi-Format Export: Export clean print-formatted PDFs, standalone offline HTML files, or raw Markdown.
  • Themes: Paper (light), Charcoal (dark), and Sepia.
  • Command Palette: Press Cmd+K / Ctrl+K for fast navigation, theme switching, and actions.
  • Terminal CLI (mdv): Publish and update documents directly from your terminal or shell pipelines.
  • Model Context Protocol (MCP): Built-in stdio MCP server for Claude Desktop, Cursor, and other AI coding assistants.

Quickstart

Prerequisites

  • Node.js 22.5+ (uses native node:sqlite)
  • npm or pnpm

Development

git clone https://github.com/ekacahya21/md-viewer.git
cd md-viewer
npm install
npm run dev

Open http://localhost:5173 in your browser.

Production Build

npm run build
node server.mjs

Docker & Self-Hosting

A production-ready multi-stage Dockerfile is included:

# Build Docker image
docker build -t md-viewer .

# Run with persistent SQLite data directory
docker run -d \
  --name md-viewer \
  -p 3015:80 \
  -v $(pwd)/data:/data \
  --restart unless-stopped \
  md-viewer

Command Line Tool (mdv)

mdv lets you publish markdown files or piped output directly from your terminal.

Installation

curl -fsSL https://md-viewer.e21.dev/install.sh | bash

Usage

# Publish a local file (title auto-detected from first heading)
mdv README.md

# Publish with custom title and expiration
mdv notes.md -t "Project Roadmap" -e 7d

# Pipe from standard input
cat draft.md | mdv
git diff | mdv -t "Current Diff"

# Update an existing document using your saved edit token
mdv -u abc1234 updated.md

# List your recent uploads
mdv --list

Model Context Protocol (MCP)

mdv includes a built-in MCP server that allows AI assistants to publish, read, and update shared Markdown documents.

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "md-viewer": {
      "command": "mdv",
      "args": ["--mcp"]
    }
  }
}

Cursor

Add to .cursor/mcp.json in your workspace:

{
  "mcpServers": {
    "md-viewer": {
      "command": "mdv",
      "args": ["--mcp"]
    }
  }
}

Run mdv mcp config in your terminal for system-specific path suggestions.


Configuration

Copy .env.example to .env to customize settings:

cp .env.example .env
VariableDefaultDescription
PORT80Port for the Node.js production server
DB_PATH/data/shared_docs.dbPath to the SQLite database file
VIEW_SALTmd-viewer-view-salt-2026Salt used to hash visitor IP for view deduplication
GOOGLE_SITE_VERIFICATION""Optional Google Search Console verification meta tag
LOCAL_LLM_HOSThttp://127.0.0.1:20128/v1Optional OpenAI-compatible endpoint for AI summary
LOCAL_LLM_KEY""Optional API key for LLM endpoint
LOCAL_LLM_MODELag/gemini-3-flashLLM model name for document summarization

Testing & Quality Assurance

# Run unit and integration tests (Node 22 native test runner)
npm test

# Run code linter (oxlint)
npm run lint

# Compile production assets
npm run build

Contributing

Contributions are welcome. Please see CONTRIBUTING.md for details on development workflow and coding standards.


License

This project is open-source software licensed under the MIT License.
Copyright (c) 2026 Eka Cahya.

↑↓ navigate openesc close