Skip to content

v2.0.0

Latest

Choose a tag to compare

@zcaceres zcaceres released this 03 Dec 04:35
· 9 commits to main since this release
ffbc7b7

Markdownify MCP v2.0.0

A major release introducing the standalone mcp-markdownify CLI, MCP TypeScript SDK v2 alignment, a compact 4-tool default Toolset, stateless Streamable HTTP transport, Git repository conversion, connect-time IP pinning against DNS rebinding SSRF, and full documentation at markdownify.zach.dev.

Highlights

  • Standalone Local CLI (mcp-markdownify): Run conversions directly from your terminal with mcp-markdownify web <url>, mcp-markdownify file <path>, mcp-markdownify repo <url>, and mcp-markdownify read <path> (with --json and --branch support).
  • MCP TypeScript SDK v2: Upgraded from SDK v1 to v2 with typed outputSchema and structuredContent alongside text content, server instructions, cacheHints, ToolAnnotations, and strict per-tool argument schemas.
  • Compact Default Toolset (4 tools): Consolidates conversion tools into convert-web-url, convert-local-file, convert-git-repo, and get-markdown-file to cut tool-schema token overhead for agents. Pass --toolset=classic (or MD_TOOLSET=classic) to restore all 11 legacy tool names.
  • Git Repository Conversion (convert-git-repo): Convert public Git repositories to structured Markdown via Repomix with optional branch selection and SSRF protection.
  • Stateless Streamable HTTP Transport: Run over HTTP with mcp-markdownify-server --http (default 127.0.0.1:3000/mcp) with Host/Origin guards and sessionless request handling.
  • Slim Docker Image & Multi-Form-Factor Verification: Verified across all 7 Form Factors (node-stdio, bun-stdio, local-http, docker-stdio, docker-http, npm-package, and cli).
  • Documentation Site: Live at https://markdownify.zach.dev (with /llms.txt).

Breaking Changes

  • Node.js >= 22 is now required (tested on Node.js 22 and 24).
  • Default Toolset changed to compact (4 tools). Existing clients depending on legacy per-format tool names (pdf-to-markdown, webpage-to-markdown, etc.) can opt back in with --toolset=classic or MD_TOOLSET=classic.
  • MCP local file paths must be absolute or ~/-prefixed (relative paths are rejected by the MCP server; the standalone mcp-markdownify CLI resolves relative paths against the working directory).
  • HTTP transport is fail-closed for local filesystem access: local file conversion and Markdown retrieval are disabled over HTTP unless MD_ALLOWED_PATHS is explicitly configured.
  • Strict argument validation: unknown tool argument keys are rejected, and unknown tools/list cursors return JSON-RPC -32602.
  • Fail-fast startup configuration: invalid values for MD_FETCH_TIMEOUT_MS, MD_MAX_FETCH_BYTES, MD_MARKITDOWN_TIMEOUT_MS, MD_MAX_FILE_BYTES, or MD_REPOMIX_TIMEOUT_MS now exit immediately at startup with a clear error message.

Security Fixes

  • Connect-time IP pinning (GHSA-fq99-42vp-565f): Eliminates DNS rebinding / check-then-connect TOCTOU SSRF bypasses on Web URL fetches and remote Git repository clones by pinning outbound TCP/TLS connections to the validated public IP address across every hop and redirect. Thank you to @beardthelion and @baeseungwon1010 for responsibly reporting this issue.
  • Added SECURITY.md with vulnerability disclosure policy and supported versions.

Quick Start

# Run the MCP server via npx
npx -y mcp-markdownify-server

# Or install globally for both the MCP server and standalone CLI
npm install -g mcp-markdownify-server
mcp-markdownify web https://example.com