一个高性能的文档转换服务器,同时支持 Model Context Protocol (MCP) 和 RESTful API 接口。将 PDF、Word 和 Excel 文档转换为 Markdown 格式,具备图片提取、页眉页脚移除和批量处理等高级功能
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"any2markdown": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
一个高性能的文档转换服务器,同时支持 Model Context Protocol (MCP 模型上下文协议) 和 RESTful API 接口。将 PDF、Word 和 Excel 文档转换为 Markdown 格式,具备图片提取、页眉页脚移除和批量处理等高级功能。
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in writing / developer-tools
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
MCP server for accessing Figma plugin console logs and screenshots via Cloudflare Workers or local mode
MCP Security Weekly
Get CVE alerts and security updates for Any2markdown and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
一个高性能的文档转换服务器,同时支持 Model Context Protocol (MCP 模型上下文协议) 和 RESTful API 接口。将 PDF、Word 和 Excel 文档转换为 Markdown 格式,具备图片提取、页眉页脚移除和批量处理等高级功能。
📚 语言版本: English README | 中文说明
# 克隆仓库
git clone https://github.com/WW-AI-Lab/any2markdown.git
cd any2markdown
# 创建虚拟环境(推荐使用 Python 3.13)
python3.13 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# 准备环境变量文件
cp env.example .env
# 安装依赖(默认使用华为镜像)
PIP_CONFIG_FILE=.pip/pip.conf pip install -r requirements.txt
# 或一键安装
./scripts/setup_venv.sh
# 使用预构建镜像直接启动服务
docker run -d \
-p 3000:3000 \
--name any2markdown-mcp-server \
--restart unless-stopped \
-v $(pwd)/uploads:/app/uploads \
-v $(pwd)/temp_images:/app/temp_images \
-v $(pwd)/logs:/app/logs \
-v $(pwd)/models:/root/.cache/marker \
-v $(pwd)/models/huggingface:/root/.cache/huggingface \
-v $(pwd)/models/torch:/root/.cache/torch \
-v $(pwd)/models/transformers:/root/.cache/transformers \
ccr.ccs.tencentyun.com/yfgaia/any2markdown-mcp-server:latest
# 💡 卷挂载说明:
# - uploads/: 上传文件存储
# - temp_images/: 临时图片缓存
# - logs/: 日志文件
# - models/: AI模型缓存(首次运行会自动下载,约3-5GB)
# 或使用部署脚本
./scripts/deploy.sh docker
# GPU 加速部署(需要 NVIDIA GPU)
./scripts/deploy.sh docker-gpu
# 自定义端口部署
./scripts/deploy.sh docker -p 8080
# 或直接使用 docker-compose:
docker-compose up -d any2markdown-mcp
# 使用部署脚本启动服务器
./scripts/deploy.sh source
# 或手动启动:
python run_server.py
# 服务器将在以下地址可用:
# - MCP 协议:http://localhost:3000/mcp (流式 HTTP)
# - REST API:http://localhost:3000/api/v1/
# - API 文档:http://localhost:3000/api/v1/docs
# 测试 RESTful API
python test_restful_api.py
# 测试 MCP 协议(官方 SDK,streamable-http)
python test_streamable_client.py ~/Downloads/测试翻译_1_1_translate.docx
# 检查服务状态
./scripts/deploy.sh status
# 停止服务
./scripts/deploy.sh stop
📋 完整API文档: 详细的API设计和使用说明请参考 RESTful API 设计文档
📋 dify集成文档: 详细的dify集成文档请参考 dify集成文档
Any2Markdown 提供统一的RESTful API接口,支持两种调用方式:
# 文件上传方式 (推荐)
curl -X POST "http://localhost:3000/api/v1/convert" \
-F "file=@document.pdf" \
-F "extract_images=true" \
-F "include_content=false"
# JSON方式 (base64编码)
curl -X POST "http://localhost:3000/api/v1/convert" \
-H "Content-Type: application/json" \
-d '{
"files": [{
"filename": "document.pdf",
"file_content": "<base64编码的PDF>",
"options": {
"extract_images": true,
"include_content": false
}
}]
}'
# 查看系统状态
curl "http://localhost:3000/api/v1/status"
# 访问API文档
open http://localhost:3000/api/v1/docs
/api/v1/convert端点处理所有文档类型from mcp.client import ClientSession
from mcp.client.stdio import stdio_client
... [View full README on GitHub](https://github.com/WW-AI-Lab/any2markdown#readme)