MarkdownMCP

MarkdownMCP

Live markdown preview for LLM agents. Call a single tool to watch a markdown file and it opens a browser UI that streams rendered updates, changes, and history.

Category
Visit Server

README

MarkdownMCP

Live markdown preview for LLM agents. The agent calls one tool when a markdown file comes into scope; a shared hub watches the file, opens your OS default browser on the first create/change, and streams updates into a multi-tab Vue UI (unread dots, toggleable change marks, history).

Features

  • One MCP tool: scope_markdown — call once before the first write (path may not exist yet)
  • Singleton hub shared by all MCP clients; exits when no clients remain
  • OS default browser — opened on first scoped file create/change (not hub start)
  • In-app tabs with subtle unread indicators
  • Toggleable change highlights + snapshot history
  • First-run settings (theme, bind host, allowed path roots)
  • Cross-platform (Windows, macOS, Linux)

Quick install (Grok)

From this repo (after build), or once published:

# From monorepo root
npm install
npm run build

# User-level MCP (Grok)
grok mcp add markdown-mcp -- node /absolute/path/to/live-markdown-mcp/packages/mcp/dist/cli.js

Or with a global/workspace link:

npm link -w markdown-mcp
grok mcp add markdown-mcp -- markdown-mcp

~/.grok/config.toml equivalent:

[mcp_servers.markdown-mcp]
command = "node"
args = ["/absolute/path/to/live-markdown-mcp/packages/mcp/dist/cli.js"]
enabled = true
startup_timeout_sec = 60

Copy the skill so the model knows when to call the tool:

# Windows PowerShell
Copy-Item -Recurse .grok/skills/markdown-scope $HOME/.grok/skills/markdown-scope

Other clients

Claude Code

claude mcp add markdown-mcp -- node /absolute/path/to/live-markdown-mcp/packages/mcp/dist/cli.js

Or project .mcp.json:

{
  "mcpServers": {
    "markdown-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/live-markdown-mcp/packages/mcp/dist/cli.js"]
    }
  }
}

Cursor

.cursor/mcp.json:

{
  "mcpServers": {
    "markdown-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/live-markdown-mcp/packages/mcp/dist/cli.js"]
    }
  }
}

Agent usage

1. Decide you will create or edit a markdown doc the user should see rendered.
2. Call scope_markdown once with the path (absolute preferred).
3. Write/edit the file freely — do not call the tool again for edits.

Tool:

Tool Args Purpose
scope_markdown path: string Watch + preview this file

Architecture

MCP client(s)  --stdio-->  markdown-mcp bridge
                              |
                              +--> ensure hub up (singleton)
                              +--> register client
                              +--> scope_markdown → hub API

Hub  --chokidar--> disk
Hub  --WebSocket--> Vue UI (tabs, diffs, history)
Hub  --open--> OS default browser (first file event)

State lives under:

Platform Directory
Windows %LOCALAPPDATA%\markdown-mcp\
macOS ~/Library/Application Support/markdown-mcp/
Linux ${XDG_CONFIG_HOME:-~/.config}/markdown-mcp/

Files: hub.json (dynamic port), settings.json, hub.lock.

Development

npm install
npm run build
npm run start:hub          # hub only (stays up until Ctrl+C; no MCP client timeout if you register manually)
npm run start:mcp          # MCP stdio server (spawns hub as needed)
npm run dev:web            # Vite UI against a hub on :7420 (optional proxy)

Packages:

Package Role
@markdown-mcp/shared Types + defaults
@markdown-mcp/hub HTTP/WS hub, watchers, browser
@markdown-mcp/web Vue UI
markdown-mcp MCP stdio entry (scope_markdown)

Settings

First browser open shows a short wizard. Later: Settings in the UI.

Setting Default
Theme System / Light / Dark
Bind host 127.0.0.1
Allowed path roots empty = allow any
Open browser on first file event on
Preserve scroll on
Show changes by default on

Changing bind host requires a hub restart. Non-loopback binds ask for confirmation.

Troubleshooting

Issue Fix
Hub won't start Delete %LOCALAPPDATA%\markdown-mcp\hub.lock and hub.json if stale
Browser never opens Scope a file and write it; browser waits for first create/change
Path denied Add root under Settings → Allowed path roots
UI is fallback HTML Run npm run build so packages/hub/dist/public is populated
Port unknown Read hub.json in the app data dir

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured