Repository navigation
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 withmcp-markdownify web <url>,mcp-markdownify file <path>,mcp-markdownify repo <url>, andmcp-markdownify read <path>(with--jsonand--branchsupport). - MCP TypeScript SDK v2: Upgraded from SDK v1 to v2 with typed
outputSchemaandstructuredContentalongside textcontent, serverinstructions,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, andget-markdown-fileto cut tool-schema token overhead for agents. Pass--toolset=classic(orMD_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(default127.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, andcli). - Documentation Site: Live at https://markdownify.zach.dev (with
/llms.txt).
Breaking Changes
- Node.js
>= 22is 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=classicorMD_TOOLSET=classic. - MCP local file paths must be absolute or
~/-prefixed (relative paths are rejected by the MCP server; the standalonemcp-markdownifyCLI 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_PATHSis explicitly configured. - Strict argument validation: unknown tool argument keys are rejected, and unknown
tools/listcursors 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, orMD_REPOMIX_TIMEOUT_MSnow 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@beardthelionand@baeseungwon1010for responsibly reporting this issue. - Added
SECURITY.mdwith 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