MinerU MCP Server
Converts PDF, Word, PPT, and images (JPG, PNG) into Markdown format using the MinerU API, with support for OCR, batch processing, and custom page ranges.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MinerU MCP Server convert https://example.com/manual.pdf to markdown with OCR"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MinerU MCP Server
基于 FastMCP 3.x 的 MCP 服务器,将 MinerU 的文档转 Markdown API 暴露为 MCP 工具。
支持 PDF、Word、PPT 及图片格式(JPG、PNG)的解析。
工具
工具 | 说明 |
| 将文件转换为 Markdown(支持本地路径和 URL,可批量处理) |
| 获取 OCR 支持的语言列表 |
Related MCP server: MinerU Document to Markdown MCP Server
安装
pip install mineru-mcp-server从源码安装:
git clone https://github.com/Tongzhao9417/mineru_mcp.git
cd mineru_mcp
pip install -e .核心依赖仅 3 个:fastmcp>=3.0.0、python-dotenv>=1.0.0、httpx>=0.24.0
环境变量
在项目根目录创建 .env 文件(参考 .env.example),或直接设置环境变量:
变量 | 说明 | 默认值 |
| MinerU API 密钥(官网申请) | 必填 |
| 远程 API 基础 URL |
|
| 转换结果保存路径 |
|
| 是否使用本地 API |
|
| 本地 API 地址( |
|
MCP 客户端配置
Claude Code / Claude Desktop
{
"mcpServers": {
"mineru-mcp": {
"command": "mineru-mcp-server",
"env": {
"MINERU_API_KEY": "your-api-key"
}
}
}
}从源码运行
{
"mcpServers": {
"mineru-mcp": {
"command": "uv",
"args": ["--directory", "/path/to/mineru_mcp", "run", "mineru-mcp-server"],
"env": {
"MINERU_API_KEY": "your-api-key"
}
}
}
}直接运行
# stdio 模式(默认,MCP 客户端自动管理)
mineru-mcp-server
# HTTP 模式(独立服务,多客户端可连接)
mineru-mcp-server --transport streamable-http --port 8001推荐使用
streamable-http传输模式(MCP 规范推荐),SSE 已被标记为 deprecated。
parse_documents 参数
参数 | 类型 | 说明 | 默认值 |
| string | 文件路径或 URL,多个用逗号分隔 | 必填 |
| bool | 启用 OCR |
|
| string | 文档语言( |
|
| string | 页码范围,如 |
|
常见问题
API 返回 401:检查 MINERU_API_KEY 是否正确设置。
找不到文件:请使用绝对路径。
调用超时:大文档处理耗时较长,建议分批处理或使用本地 API 模式。
License
MIT
Available Tools
2 toolsget_ocr_languagesB
获取 OCR 支持的语言列表。
Inputs: no named parameters. Returns: object
parse_documentsA
统一接口,将文件转换为Markdown格式。支持本地文件和URL,会根据USE_LOCAL_API配置自动选择合适的处理方式。
Inputs: file_sources (required), enable_ocr, language, page_ranges. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: get_ocr_languages retrieves a list of supported languages for OCR, while parse_documents converts files to Markdown format. There is no overlap in functionality, making it easy for an agent to select the appropriate tool without confusion.
Both tools follow a consistent verb_noun naming pattern (get_ocr_languages and parse_documents), using snake_case throughout. This predictability enhances readability and usability for agents, with no deviations in style.
With only 2 tools, the server feels thin for a document processing domain that might include OCR and parsing. While the tools cover specific tasks, the scope suggests potential gaps (e.g., no tools for editing, saving, or managing documents), making it borderline too few for comprehensive functionality.
The tools cover basic OCR language retrieval and document parsing, but there are notable gaps in the document processing lifecycle. For example, there are no tools for creating, updating, or deleting documents, which could limit agent workflows and lead to dead ends in more complex tasks.
Maintenance
Related MCP Connectors
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
Convert files, URLs, and documents to clean, AI-ready Markdown via MCP.
Document conversion MCP server: PDF to Markdown, image OCR, spreadsheet parsing.
Convert PDF documents to Markdown for AI agents through an authenticated remote MCP server.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceConverts documents (PDF, DOCX, images, etc.) to Markdown using Microsoft's Markitdown library, with no local setup required. Integrates with AI agents via MCP for seamless document conversion.1-
- AlicenseBqualityDmaintenanceConverts documents (PDF, Word, PPT, images, HTML) to Markdown via MinerU API. Supports URL and local file inputs with OCR, formula/table recognition, and automatic large file handling.55MIT
- AlicenseNot gradedqualityBmaintenanceEnables document conversion and processing through MCP, including Office/PDF/Markdown conversions, OCR, and PDF operations like split, rotate, encrypt, and extract.MIT
- AlicenseAqualityCmaintenanceEnables AI agents and MCP-capable platforms to convert documents such as docx, pptx, xlsx, pdf, odt, rtf, epub, and csv into clean GitHub-Flavored Markdown through a single tool call. Runs fully locally with no API key, no network access, and no OCR, returning structured errors for scanned, encrypted, or unsupported files.1MIT