MCP Server · v1.2.16

Give your AI agent markdown superpowers.

The quikdown MCP server exposes 24 tools over JSON-RPC 2.0 — markdown parsing, bidirectional conversion, file I/O, and full editor control. Works with Cursor, Claude Desktop, VS Code, and any MCP-compatible host.

Quick Start

1

Install quikdown

npm install quikdown
2

Run the MCP server

npx quikdown-mcp --root=.

The server reads JSON-RPC on stdin and writes responses to stdout. --root sets the filesystem sandbox.

3

Configure your AI host

Add the server to your tool's MCP config (see setup guides below).

Path A vs Path B

One MCP package, two setups. The human’s UI is different in each case.

Path A Shipped

Run: npx quikdown-mcp --root=. in your MCP config.

Human: Your IDE (Cursor, VS Code) — edit .md files as usual. No browser window.

Agent: Parse, convert, read/write files by path (headless + filesystem tools).

Path B Shipped

Run: node examples/mcp-doc-host/start-mcp.js in MCP config (from quikdown repo).

Human: A browser tab with QuikdownEditor — split view, live preview, fences. You interact here.

Node: Launcher + bridge only — not the editor UI. Forwards agent tool calls to the browser editor.

Agent: Full buffer control + rich render export.

Path B is both a Node process and a browser window — not either/or. Installing MCP does not turn Cursor into QuikdownEditor. See docs/quikdown-mcp.md for architecture and limits.

Tool Groups

The server organizes 24 tools into three groups, activated by configuration.

Headless Always on

Parse markdown, convert HTML, get statistics. No file access or editor required.

markdown_to_htmlMarkdown → XSS-safe HTML
html_to_markdownHTML → Markdown
markdown_statsWord/line/paragraph counts
quikdown_infoVersion, modules, active groups
markdown_to_astMarkdown → AST (structured tree)
markdown_to_jsonMarkdown → JSON string

Filesystem --root

Read and write markdown/HTML files within a sandboxed directory. Path traversal is blocked.

read_file_infoSize, lines, modified time
read_file_linesLine range from a file
read_file_markdownFull file contents
write_markdown_to_fileWrite markdown to disk
write_html_to_fileConvert & write HTML

Editor Host binding

Full control over a QuikdownEditor instance: read/write buffer, search, replace, undo/redo.

read_editorGet editor markdown
write_editorReplace editor content
find_regexSearch with regex
replace_regexRegex find & replace
replace_textLiteral string replace
extract_textExtract line range
get_statsBuffer statistics
get_htmlGet parsed HTML output
undoUndo last change
redoRedo last undo
load_file_to_editorLoad file into buffer
get_renderedRich HTML export (Path B)
write_rendered_to_fileExport rendered to file

Setup Guides

Cursor

Add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "quikdown": {
      "command": "npx",
      "args": ["quikdown-mcp", "--root=."]
    }
  }
}

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "quikdown": {
      "command": "npx",
      "args": ["quikdown-mcp", "--root=/path/to/project"]
    }
  }
}

Claude Code

Add to .mcp.json in your project root:

{
  "mcpServers": {
    "quikdown": {
      "command": "npx",
      "args": ["quikdown-mcp", "--root=."]
    }
  }
}

VS Code (Copilot MCP)

Add to .vscode/mcp.json:

{
  "servers": {
    "quikdown": {
      "command": "npx",
      "args": ["quikdown-mcp", "--root=${workspaceFolder}"]
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "quikdown": {
      "command": "npx",
      "args": ["quikdown-mcp", "--root=."]
    }
  }
}

Programmatic Usage

Use the MCP server from Node.js without the CLI:

// ES Module
import { createMcpServer } from 'quikdown/mcp';

// Headless only
const mcp = createMcpServer();
const result = mcp.callTool('markdown_to_html', { markdown: '# Hello' });
console.log(result.content[0].text);

// With filesystem sandbox
const mcpFs = createMcpServer({ root: '/path/to/docs' });

// With editor binding (browser context)
const mcpFull = createMcpServer({ root: '.', editor: editorInstance });
console.log(mcpFull.getTools().length); // 19

Security

Filesystem Sandbox

All file operations are confined to the --root directory. Path traversal attempts (../) are rejected before any I/O occurs.

XSS Protection

markdown_to_html escapes HTML entities by default. Unsafe HTML passthrough must be explicitly enabled.

Regex Limits

Search patterns capped at 200 characters. Match count limited to 200 results. No ReDoS-vulnerable patterns.

No Network

The MCP server makes zero outbound network requests. All operations are local to the machine.

Full tool reference, JSON-RPC protocol details, and TypeScript types:
docs/quikdown-mcp.md