Any2Markdown
一个高性能的文档转换服务器,同时支持 Model Context Protocol (MCP) 和 RESTful API 接口。将 PDF、Word 和 Excel 文档转换为 Markdown 格式,具备图片提取、页眉页脚移除和批量处理等高级功能
What is Any2Markdown?
Any2Markdown is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 一个高性能的文档转换服务器,同时支持 model context protocol (mcp) 和 restful api 接口。将 pdf、word 和 excel 文档转换为 markdown 格式,具备图片提取、页眉页脚移除和批量处理等高级功能
一个高性能的文档转换服务器,同时支持 Model Context Protocol (MCP) 和 RESTful API 接口。将 PDF、Word 和 Excel 文档转换为 Markdown 格式,具备图片提取、页眉页脚移除和批量处理等高级功能
This server falls under the File Systems category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- 一个高性能的文档转换服务器,同时支持 Model Context Protocol (MCP) 和 RESTful AP
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx any2markdownConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Any2Markdown
Any2Markdown is a high-performance document conversion server that exposes both an MCP interface and a RESTful API for converting PDF, Word (DOCX/DOC), and Excel files into clean Markdown. It uses AI-driven OCR and layout detection (powered by the Marker model) to accurately extract text, tables, and embedded images while optionally removing headers and footers. Developers integrate it into AI pipelines to convert raw documents into LLM-readable Markdown before indexing or analysis, with batch processing support for handling large document sets concurrently.
Prerequisites
- Python 3.10–3.13 (or Docker for the recommended container deployment)
- At least 4 GB of RAM and 10 GB of free disk space for model caching (Marker models are 3–5 GB)
- An internet connection on first startup to download Hugging Face models
- Optional: a CUDA-compatible GPU and the USE_GPU=true environment variable for faster PDF processing
- An MCP client such as Claude Desktop or Claude Code to invoke conversion tools
Deploy with Docker (recommended)
The fastest way to get started is with the official Docker image, which bundles all dependencies and model caching. Mount volumes so models are persisted between restarts.
docker run -d -p 3000:3000 \
-v $(pwd)/uploads:/app/uploads \
-v $(pwd)/models:/root/.cache/marker \
ccr.ccs.tencentyun.com/yfgaia/any2markdown-mcp-server:latestOr install manually with Python
Clone the repo, create a virtual environment, and install Python dependencies. Note that the first run will download several gigabytes of model weights.
git clone https://github.com/WW-AI-Lab/any2markdown.git
cd any2markdown
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python main.pyConfigure environment variables
Set key environment variables before starting. MAX_CONCURRENT_JOBS controls parallelism; USE_GPU enables GPU acceleration; MODEL_CACHE_DIR sets where model weights are stored.
export MCP_SERVER_HOST=0.0.0.0
export MCP_SERVER_PORT=3000
export MAX_CONCURRENT_JOBS=3
export MAX_FILE_SIZE=100MB
export USE_GPU=false
export MODEL_CACHE_DIR=~/.cache/markerVerify the server is running
Test the RESTful API endpoint with a sample file upload to confirm the server started correctly and models loaded.
curl -X POST "http://localhost:3000/api/v1/convert" \
-F "[email protected]" \
-F "extract_images=true"Add to your MCP client configuration
Connect Claude Desktop or another MCP host to the running Any2Markdown server over HTTP. The server exposes six tools: convert_pdf_to_markdown, convert_word_to_markdown, convert_excel_to_markdown, batch_convert_documents, analyze_pdf_structure, and validate_document.
{
"mcpServers": {
"any2markdown": {
"command": "npx",
"args": ["any2markdown"],
"env": {
"ANY2MD_SERVER_URL": "http://localhost:3000"
}
}
}
}Any2Markdown Examples
Client configuration
Configure Claude Desktop to connect to a locally running Any2Markdown server.
{
"mcpServers": {
"any2markdown": {
"command": "npx",
"args": ["any2markdown"],
"env": {
"ANY2MD_SERVER_URL": "http://localhost:3000"
}
}
}
}Prompts to try
These prompts invoke the Any2Markdown conversion tools from within your MCP client.
- "Convert this PDF to Markdown and extract all embedded images."
- "Convert the Word document report.docx to Markdown, removing headers and footers."
- "Convert this Excel spreadsheet to Markdown tables."
- "Analyze the structure of annual_report.pdf and tell me how many sections it has."
- "Batch convert all the documents in this folder to Markdown format."Troubleshooting Any2Markdown
Server hangs or is very slow on first startup.
Any2Markdown downloads 3–5 GB of Hugging Face model weights on first run. Ensure you have a stable internet connection and sufficient disk space (10 GB+). Progress can be monitored in the server logs. Subsequent startups use cached models and are fast.
Out-of-memory errors when converting large PDFs.
Reduce MAX_CONCURRENT_JOBS to 1 and ensure the host has at least 4 GB of RAM available. For very large documents, split them into smaller files before conversion. Enabling GPU (USE_GPU=true) offloads computation from RAM to VRAM.
Docker image fails to pull from ccr.ccs.tencentyun.com.
If the Tencent registry is not accessible in your region, build the image locally from the cloned repository using 'docker build -t any2markdown .' and run the local image instead.
Frequently Asked Questions about Any2Markdown
What is Any2Markdown?
Any2Markdown is a Model Context Protocol (MCP) server that 一个高性能的文档转换服务器,同时支持 model context protocol (mcp) 和 restful api 接口。将 pdf、word 和 excel 文档转换为 markdown 格式,具备图片提取、页眉页脚移除和批量处理等高级功能 It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Any2Markdown?
Follow the installation instructions on the Any2Markdown GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Any2Markdown?
Any2Markdown works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Any2Markdown free to use?
Yes, Any2Markdown is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Any2Markdown Alternatives — Similar File Systems Servers
Looking for alternatives to Any2Markdown? Here are other popular file systems servers you can use with Claude, Cursor, and VS Code.
Electerm
★ 14.1k📻Terminal/ssh/sftp/ftp/telnet/serialport/RDP/VNC/Spice client(linux, mac, win)
Plik
★ 1.8kPlik is a temporary file upload system (Wetransfer like) in Go.
Kordoc
★ 957An MCP server that parses South Korean document formats like HWP, HWPX, and PDF into Markdown. It features specialized table reconstruction and security-hardened extraction optimized for administrative and public institution files.
macOS Automator
★ 801A Model Context Protocol server that enables execution of AppleScript and JavaScript for Automation scripts on macOS, allowing programmatic control of applications and system functions through a rich knowledge base of pre-defined scripts.
PDF Reader
★ 723Enables reading, searching, and metadata extraction from PDF files without loading the entire content into the context window. It provides efficient tools for text cleaning, page-specific extraction, and context-aware search results.
Filesystem MCP Server
★ 643Provides comprehensive filesystem operations (read, write, list, create, delete, move files and directories) through the Model Context Protocol with Streamable HTTP transport and built-in security through configurable root directory restrictions.
Browse More File Systems MCP Servers
Explore all file systems servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Any2Markdown in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Any2Markdown?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.