mdrvserve
Binary:
mdrvserve· Maintainer: MDRV (Umar Alfarouk) · Rust 1.82+ / 2021 edition · MIT
Markdown preview server for AI coding agents. Follow along as your agent writes markdown — rendered live in the browser instead of scrolling past as raw text in the terminal.
[!CAUTION] mdrvserve is largely LLM-assisted code. Most of it was written by AI coding agents, not hand-reviewed line by line. It works and is exercised by a test suite, but it has not had the scrutiny of a traditional, human-audited codebase. Inspect it before you rely on it. Use at your own risk.
Features
Zero config. mdrvserve file.md just works. No config files, no required
flags.
Single binary. One statically-compiled executable, no runtime dependencies.
Instant live reload. File changes appear in the browser immediately via WebSocket. This is the core interaction: an agent writes, a human reads.
Ephemeral sessions. Start it during a session, kill it when you're done. It is not a long-running server and doesn't need to be.
Agent-friendly content. GFM (tables, task lists, code blocks), opt-in
D2 / Mermaid / LaTeX math support, HTML file serving (--include-html),
and directory mode with a navigation sidebar — including --recursive
support for nested subdirectories shown as collapsible groups. Sidebar
filter with wildcard patterns, source view, and scroll persistence round
out the reading experience.
What mdrvserve is not
- Not a documentation site generator (use mdBook, Docusaurus, MkDocs, or Astro Starlight).
- Not a static site server or anything you deploy to production.
- Not a general-purpose authoring tool for manual writing workflows.
Installation
Linux
|
Detects your platform (Linux, macOS, Windows) and installs the latest binary.
Other methods
Build from source:
Or download a binary from the latest release.
Usage
# Serve a single markdown file (default port 3000)
# Serve all markdown files in a directory, with a sidebar
# Include nested subdirectories in directory mode
# Custom hostname/port, and open in the browser
# Render D2 diagrams server-side, LaTeX math, or Mermaid client-side
# Include HTML files alongside markdown in directory mode
Single-file vs directory mode
Single-file mode serves one file in a clean, focused view.
Directory mode scans and serves all .md and .markdown files with a
navigation sidebar, watches for new files, and live-reloads on change. By
default it watches the immediate directory only; pass --recursive (-r) to
include nested subdirectories, which then appear as collapsible groups in the
sidebar.
Themes
Five built-in themes (light, dark, and Catppuccin variants) from the theme picker in the top-right corner. Your choice persists across sessions.
Development
Requires Rust 1.82+ (2021 edition).
For architecture, modes, rendering internals, and design decisions, see the documentation index.
License
MIT — see LICENSE.
Acknowledgments
- Built with Axum
- Markdown parsing by markdown-rs
- Catppuccin color themes
- LaTeX math rendering by RaTeX
- Part of the MDRV ecosystem