# Markdownify MCP — Convert Files and URLs to Markdown > Markdownify MCP is an MCP server that converts PDFs, images, audio, and web pages into Markdown, with optional path allowlists for safer local file access. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use 1. Clone + install dependencies: ```bash git clone https://github.com/zcaceres/markdownify-mcp.git cd markdownify-mcp bun install ``` 2. Build + start: ```bash bun run build bun start ``` 3. (Docker) Run with a read boundary: ```bash docker build -t markdownify-mcp . docker run --rm -i -v "$HOME/Documents:/data:ro" -e MD_ALLOWED_PATHS=/data markdownify-mcp ``` ## Intro Markdownify MCP is an MCP server that converts PDFs, images, audio, and web pages into Markdown, with optional path allowlists for safer local file access. - **Best for:** agents that need document-to-Markdown ingestion (PDF/web/audio) before summarizing or indexing - **Works with:** Bun/Node, optional Docker, optional `MD_ALLOWED_PATHS` allowlist - **Setup time:** 15–30 minutes ## Practical Notes - Data point: Docker mode can enforce a read boundary via `MD_ALLOWED_PATHS`. - Quant: mount only one directory first (e.g. `/data`) to reduce accidental file exposure. ## Pattern: convert → then summarize When an agent reads arbitrary documents, keep the pipeline explicit: 1) Convert to Markdown (normalize), 2) store the Markdown (cache), 3) summarize / chunk / index. This avoids repeated parsing and makes outputs auditable. ## Security note If your agent has local file access, always restrict paths (allowlist) and run conversion in a container when possible. ### FAQ **Q: Does it support PDFs?** A: Yes. The repo lists `pdf-to-markdown` and related tools. **Q: How do I restrict what it can read?** A: Set `MD_ALLOWED_PATHS` to an allowlist of directories. **Q: Should I run it in Docker?** A: If you’re exposing local files, Docker + read-only mounts is a safer default. ## Source & Thanks > Source: https://github.com/zcaceres/markdownify-mcp > License: MIT > GitHub stars: 2,673 · forks: 223 --- ## 快速使用 1. 克隆并安装依赖: ```bash git clone https://github.com/zcaceres/markdownify-mcp.git cd markdownify-mcp bun install ``` 2. 构建并启动: ```bash bun run build bun start ``` 3.(Docker)用“只读挂载 + 路径白名单”跑: ```bash docker build -t markdownify-mcp . docker run --rm -i -v "$HOME/Documents:/data:ro" -e MD_ALLOWED_PATHS=/data markdownify-mcp ``` ## 简介 Markdownify MCP 是一个把 PDF/图片/音频/网页转换成 Markdown 的 MCP server,适合做 RAG/总结前的标准化处理,并支持用路径白名单限制本地文件读取范围。 - **适合谁:** 需要把文档(PDF/网页/音频)先转成 Markdown 再总结/索引的 agent - **可搭配:** Bun/Node、可选 Docker、可选 `MD_ALLOWED_PATHS` 路径白名单 - **准备时间:** 15–30 分钟 ## 实战建议 - 数据点:Docker 模式可用 `MD_ALLOWED_PATHS` 强制读取边界。 - 量化建议:先只挂载一个目录(例如 `/data`),减少误读文件的风险。 ## 常用打法:先转换,再总结 让 agent 读各种文档时,建议把管线写清楚: 1)先转 Markdown(标准化), 2)保存 Markdown(缓存), 3)再做总结/切分/索引。 这样解析过程可审计、也避免反复解析。 ## 安全提示 只要涉及本地文件读取,就要做路径限制(allowlist);条件允许时用容器跑转换更稳。 ### FAQ **支持 PDF 吗?** 答:支持,仓库列出了 `pdf-to-markdown` 等工具。 **如何限制读取范围?** 答:设置 `MD_ALLOWED_PATHS` 只允许读取指定目录。 **需要用 Docker 吗?** 答:如果涉及本地文件,Docker + 只读挂载通常更安全。 ## 来源与感谢 > Source: https://github.com/zcaceres/markdownify-mcp > License: MIT > GitHub stars: 2,673 · forks: 223 --- Source: https://tokrepo.com/en/workflows/markdownify-mcp-convert-files-and-urls-to-markdown Author: MCP Hub