Any2Markdown

v1.0.0File Systemsstable

一个高性能的文档转换服务器,同时支持 Model Context Protocol (MCP) 和 RESTful API 接口。将 PDF、Word 和 Excel 文档转换为 Markdown 格式,具备图片提取、页眉页脚移除和批量处理等高级功能

any2markdownmcpai-integration
Share:
48
Stars
0
Downloads
0
Weekly
0/5

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

Convert PDF, Word, and Excel documents to Markdown format
Extract images and remove headers/footers with batch processing
WW-AI-Lab

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx any2markdown

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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:latest
2

Or 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.py
3

Configure 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/marker
4

Verify 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"
5

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.

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.

Quick Config Preview

{ "mcpServers": { "any2markdown": { "command": "npx", "args": ["-y", "any2markdown"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides