{"id":"e5531371-1e08-4c22-9108-c61325659a37","slug":"md-viewer","kind":"mcp","name":"md-viewer","summary":"Minimalist editorial Markdown studio & reader with native Mermaid diagrams, KaTeX math formulas, password-protected sharing, and Model Context Protocol (MCP) support.","owner":"ekacahya21","repoUrl":"https://github.com/ekacahya21/md-viewer","license":"MIT","licenseTier":"permissive","trust":"community","stars":3,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-10-01T07:34:28.000Z","addedAt":"2026-10-21T05:13:09.424Z","logoUrl":"https://avatars.githubusercontent.com/u/15162377?u=66d3cb66c691b9d9e8a84e3eea3847532f14f32b&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["files-documents","design-media","cloud-infra"],"tags":["katex","markdown","markdown-editor","mermaid","react","tailwindcss","vite"],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-26T02:05:11.076Z","sample":false,"url":"https://conduits.dev/tools/md-viewer","language":"TypeScript","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# MD Viewer\n\nA minimalist Markdown editor and reader with native math, Mermaid diagrams, instant zero-account link sharing, and password protection.\n\n[![Live Demo](https://img.shields.io/badge/demo-md--viewer.e21.dev-2563eb?style=flat-square)](https://md-viewer.e21.dev)\n[![CI Pipeline](https://github.com/ekacahya21/md-viewer/actions/workflows/ci.yml/badge.svg)](https://github.com/ekacahya21/md-viewer/actions/workflows/ci.yml)\n[![Production Deploy](https://github.com/ekacahya21/md-viewer/actions/workflows/deploy.yml/badge.svg)](https://github.com/ekacahya21/md-viewer/actions/workflows/deploy.yml)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green?style=flat-square)](LICENSE)\n[![Node.js 22+](https://img.shields.io/badge/node-%3E%3D22.5-339933?style=flat-square)](https://nodejs.org)\n[![React 19](https://img.shields.io/badge/react-19-61dafb?style=flat-square)](https://react.dev)\n[![TypeScript](https://img.shields.io/badge/typescript-5.9-3178c6?style=flat-square)](https://www.typescriptlang.org)\n[![Docker](https://img.shields.io/badge/docker-ready-2496ed?style=flat-square)](Dockerfile)\n[![M8ven Score](https://m8ven.ai/badge/mcp/ekacahya21-md-viewer-g62uof?v=db68f80078f8815451b5a82bed3db214)](https://m8ven.ai/mcp/ekacahya21-md-viewer-g62uof?s=readme)\n\n![MD Viewer](public/og-image.png)\n\n---\n\n## Features\n\n- **Reader & Split Views**: Seamlessly switch between reading mode, distraction-free editing, and synchronized split view.\n- **Math & Diagrams**: Native rendering for KaTeX LaTeX formulas (`$...$` and `$$...$$`) and Mermaid diagrams (flowcharts, sequence, state, ER, class, Gantt).\n- **Zero-Account Sharing**: Generate a short link (`/s/:id`) with an optional QR code in one click. No registration required.\n- **Password Protection & Burn-After-Reading**: Secure shared documents with bcrypt password protection or self-destructing links that permanently burn on first view.\n- **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.\n- **AI Document Summaries**: Instant asynchronous document executive summaries powered by local LLM endpoints (Ollama/9router/OpenAI-compatible).\n- **Bilingual Interface**: Seamless language switching between English and Indonesian (`en` / `id`).\n- **Multi-Format Export**: Export clean print-formatted PDFs, standalone offline HTML files, or raw Markdown.\n- **Themes**: Paper (light), Charcoal (dark), and Sepia.\n- **Command Palette**: Press `Cmd+K` / `Ctrl+K` for fast navigation, theme switching, and actions.\n- **Terminal CLI (`mdv`)**: Publish and update documents directly from your terminal or shell pipelines.\n- **Model Context Protocol (MCP)**: Built-in stdio MCP server for Claude Desktop, Cursor, and other AI coding assistants.\n\n---\n\n## Quickstart\n\n### Prerequisites\n\n- Node.js 22.5+ (uses native `node:sqlite`)\n- npm or pnpm\n\n### Development\n\n```bash\ngit clone https://github.com/ekacahya21/md-viewer.git\ncd md-viewer\nnpm install\nnpm run dev\n```\n\nOpen [http://localhost:5173](http://localhost:5173) in your browser.\n\n### Production Build\n\n```bash\nnpm run build\nnode server.mjs\n```\n\n---\n\n## Docker & Self-Hosting\n\nA production-ready multi-stage `Dockerfile` is included:\n\n```bash\n# Build Docker image\ndocker build -t md-viewer .\n\n# Run with persistent SQLite data directory\ndocker run -d \\\n  --name md-viewer \\\n  -p 3015:80 \\\n  -v $(pwd)/data:/data \\\n  --restart unless-stopped \\\n  md-viewer\n```\n\n---\n\n## Command Line Tool (`mdv`)\n\n`mdv` lets you publish markdown files or piped output directly from your terminal.\n\n### Installation\n\n```bash\ncurl -fsSL https://md-viewer.e21.dev/install.sh | bash\n```\n\n### Usage\n\n```bash\n# Publish a local file (title auto-detected from first heading)\nmdv README.md\n\n# Publish with custom title and expiration\nmdv notes.md -t \"Project Roadmap\" -e 7d\n\n# Pipe from standard input\ncat draft.md | mdv\ngit diff | mdv -t \"Current Diff\"\n\n# Update an existing document using your saved edit token\nmdv -u abc1234 updated.md\n\n# List your recent uploads\nmdv --list\n```\n\n---\n\n## Model Context Protocol (MCP)\n\n`mdv` includes a built-in MCP server that allows AI assistants to publish, read, and update shared Markdown documents.\n\n### Claude Desktop\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"md-viewer\": {\n      \"command\": \"mdv\",\n      \"args\": [\"--mcp\"]\n    }\n  }\n}\n```\n\n### Cursor\n\nAdd to `.cursor/mcp.json` in your workspace:\n\n```json\n{\n  \"mcpServers\": {\n    \"md-viewer\": {\n      \"command\": \"mdv\",\n      \"args\": [\"--mcp\"]\n    }\n  }\n}\n```\n\nRun `mdv mcp config` in your terminal for system-specific path suggestions.\n\n---\n\n## Configuration\n\nCopy `.env.example` to `.env` to customize settings:\n\n```bash\ncp .env.example .env\n```\n\n| Variable | Default | Description |\n| :--- | :--- | :--- |\n| `PORT` | `80` | Port for the Node.js production server |\n| `DB_PATH` | `/data/shared_docs.db` | Path to the SQLite database file |\n| `VIEW_SALT` | `md-viewer-view-salt-2026` | Salt used to hash visitor IP for view deduplication |\n| `GOOGLE_SITE_VERIFICATION` | `\"\"` | Optional Google Search Console verification meta tag |\n| `LOCAL_LLM_HOST` | `http://127.0.0.1:20128/v1` | Optional OpenAI-compatible endpoint for AI summary |\n| `LOCAL_LLM_KEY` | `\"\"` | Optional API key for LLM endpoint |\n| `LOCAL_LLM_MODEL` | `ag/gemini-3-flash` | LLM model name for document summarization |\n\n---\n\n## Testing & Quality Assurance\n\n```bash\n# Run unit and integration tests (Node 22 native test runner)\nnpm test\n\n# Run code linter (oxlint)\nnpm run lint\n\n# Compile production assets\nnpm run build\n```\n\n---\n\n## Contributing\n\nContributions are welcome. Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on development workflow and coding standards.\n\n---\n\n## License\n\nThis project is open-source software licensed under the [MIT License](LICENSE).  \nCopyright (c) 2026 [Eka Cahya](https://github.com/ekacahya21).\n"}