$git clone https://github.com/zcaceres/markdownify-mcpMarkdownify is a Model Context Protocol (MCP) server that converts various file types and web content to Markdown format. It provides a set of tools to transform PDFs, images, audio files, web pages, and more into easily readable and shareable Markdown text.
| 1 | # Markdownify MCP Server |
| 2 | |
| 3 |  |
| 4 | |
| 5 | Markdownify is a Model Context Protocol (MCP) server that converts various file types and web content to Markdown format. It provides a set of tools to transform PDFs, images, audio files, web pages, and more into easily readable and shareable Markdown text. |
| 6 | |
| 7 | <a href="https://glama.ai/mcp/servers/bn5q4b0ett"><img width="380" height="200" src="https://glama.ai/mcp/servers/bn5q4b0ett/badge" alt="Markdownify Server MCP server" /></a> |
| 8 | |
| 9 | ## Features |
| 10 | |
| 11 | - Convert multiple file types to Markdown: |
| 12 | |
| 13 | - Images |
| 14 | - Audio (with transcription) |
| 15 | - DOCX |
| 16 | - XLSX |
| 17 | - PPTX |
| 18 | - Convert web content to Markdown: |
| 19 | - YouTube video transcripts |
| 20 | - Bing search results |
| 21 | - General web pages |
| 22 | - Retrieve existing Markdown files |
| 23 | |
| 24 | ## Getting Started |
| 25 | |
| 26 | 1. Clone this repository |
| 27 | 2. Install dependencies: |
| 28 | ``` |
| 29 | bun install |
| 30 | ``` |
| 31 | |
| 32 | The `preinstall` step creates a Python virtual environment at `.venv` and installs `markitdown[all]`. |
| 33 | |
| 34 | 3. Build the project: |
| 35 | ``` |
| 36 | bun run build |
| 37 | ``` |
| 38 | 4. Start the server: |
| 39 | ``` |
| 40 | bun start |
| 41 | ``` |
| 42 | |
| 43 | ## Development |
| 44 | |
| 45 | - Use `bun run dev` to start the TypeScript compiler in watch mode |
| 46 | - Modify `src/server.ts` to customize server behavior |
| 47 | - Add or modify tools in `src/tools.ts` |
| 48 | |
| 49 | ## Usage with Desktop App |
| 50 | |
| 51 | To integrate this server with a desktop app, add the following to your app's server configuration: |
| 52 | |
| 53 | ```js |
| 54 | { |
| 55 | "mcpServers": { |
| 56 | "markdownify": { |
| 57 | "command": "node", |
| 58 | "args": [ |
| 59 | "{ABSOLUTE PATH TO FILE HERE}/dist/index.js" |
| 60 | ] |
| 61 | } |
| 62 | } |
| 63 | } |
| 64 | ``` |
| 65 | |
| 66 | ### Environment variables |
| 67 | |
| 68 | All paths default to sensible values; override only when the defaults don't fit your install layout. |
| 69 | |
| 70 | | Variable | Default | Purpose | |
| 71 | |---|---|---| |
| 72 | | `MARKITDOWN_PATH` | `<project>/.venv/bin/markitdown`, then `markitdown` on `PATH` | Absolute path to the `markitdown` executable. Set this when you've installed markitdown system-wide (e.g. `pipx install "markitdown[pdf]"`) instead of using the bundled venv. | |
| 73 | | `REPOMIX_PATH` | `<project>/node_modules/.bin/repomix`, then `repomix` on `PATH` | Absolute path to the `repomix` executable used by `git-repo-to-markdown`. | |
| 74 | | `MD_ALLOWED_PATHS` | unset (unrestricted) | Path-delimiter-separated list (`:` on POSIX, `;` on Windows) of directories the server is allowed to read. When set, all file-input tools (`pdf-to-markdown`, `get-markdown-file`, etc.) reject paths outside these directories. | |
| 75 | | `MD_SHARE_DIR` | unset | Deprecated alias for `MD_ALLOWED_PATHS` (single directory). Still honored for backward compatibility. | |
| 76 | |
| 77 | ## Usage with Docker |
| 78 | |
| 79 | Build and run: |
| 80 | ```sh |
| 81 | docker build -t markdownify-mcp . |
| 82 | docker run --rm -i \ |
| 83 | -v "$HOME/Documents:/data:ro" \ |
| 84 | -e MD_ALLOWED_PATHS=/data \ |
| 85 | markdownify-mcp |
| 86 | ``` |
| 87 | |
| 88 | Notes for the Docker MCP catalog (`mcp/markdownify`): |
| 89 | - Mount any host directories you want the server to read into the container, then pass the **container** paths to the tools (e.g. `/data/foo.pdf`, not `/Users/you/Documents/foo.pdf`). |
| 90 | - Set `MD_ALLOWED_PATHS` to the colon-separated list of mounted directories so the server enforces a read boundary that matches the bind mount. |
| 91 | - The published Docker image installs `markitdown[pdf]` only — audio transcription and image OCR (`audio-to-markdown`, `image-to-markdown`) require the `[all]` extras and will fail in the slim image. Use the local install (`bun install`) for the full feature set. |
| 92 | |
| 93 | ## Available Tools |
| 94 | |
| 95 | - `youtube-to-markdown`: Convert YouTube videos to Markdown |
| 96 | - `pdf-to-markdown`: Convert PDF files to Markdown |
| 97 | - `bing-search-to-markdown`: Convert Bing search results to Markdown |
| 98 | - `webpage-to-markdown`: Convert web pages to Markdown |
| 99 | - `image-to-markdown`: Convert images to Markdown with metadata |
| 100 | - `audio-to-markdown`: Convert audio files to Markdown with transcription |
| 101 | - `docx-to-markdown`: Convert DOCX files to Markdown |
| 102 | - `xlsx-to-markdown`: Convert XLSX files to Markdown |
| 103 | - `pptx-to-markdown`: Convert PPTX files to Markdown |
| 104 | - `get-markdown-file`: Retrieve an existing Markdown fi |