Docconvert MCP

MCP文档知识

提供方 jwingnut

文档知识 stdio · 本地进程 无需鉴权 社区 / 第三方 Claude DesktopClaudeCursorWindsurf
查看接入方式

DocConvert MCP Server 是一个支持多种文档格式转换的服务,能够将PDF、Word、HTML、Markdown等格式相互转换,适用于学术写作、文档迁移和内容提取等多种场景。

一句话选型结论

按资料字段整理

Docconvert MCP 属于文档知识类 MCP 服务器,stdio · 本地进程,无需鉴权,可直接接入 Claude Desktop、Claude、Cursor 等,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类文档知识 传输方式stdio · 本地进程 鉴权无需鉴权 部署方式本地部署
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 3 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

文档知识
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量3暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

文档转换Python本地部署PDF处理OCR支持批量处理学术写作

安装与配置

stdio · 本地进程 无需鉴权
客户端在本机拉起子进程,数据不出本机
pip install pymupdf4llm

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js 等运行时,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 3 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
文档检索问答

在你的文档库里按问题找答案。

知识库读写

把新资料写进知识库,随用随取。

内容整理

把零散资料归纳成结构化笔记。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 3 个工具,职责相对集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。
  • 资料标注无需鉴权,装好就能连。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在文档知识场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Docconvert MCP当前 3 stdio · 本地进程 本地部署 有 2026-05-17
dify 未标注 stdio · 本地进程 本地部署 有 2026-04-11
open-webui 未标注 stdio · 本地进程 本地部署 有 2026-04-11
JeecgBoot 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Cherry Studio 未标注 未标注 未标注 无 2026-05-17
mempalace 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

文档知识
字段来自项目仓库与公开索引,中文说明由本站标注
提供方jwingnut上游标注的维护方 jwingnut
分类文档知识本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式无需鉴权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

11.5 KB
来自项目仓库与上游目录的原文,未做删改

DocConvert MCP服务器

用于通用文档格式转换的FastMCP服务器。将PDF、Word文档、HTML、Markdown、LaTeX等转换为任何输出格式。

特性

  • 通用转换 -在20多种文档格式之间转换
  • PDF支持 -使用pdf2docx进行精确的PDF提取,然后使用pandoc
  • OCR支持 -从扫描的PDF中提取文本,并保留布局
  • GROBID集成 -从学术PDF中提取元数据和参考文献
  • 批量处理 -将整个目录转换为混合格式
  • 并行处理 -实现真正PDF并行性的子进程隔离
  • 递归模式 -处理嵌套文件夹结构
  • 格式过滤 -仅转换特定文件类型(例如,仅转换PDF)

建筑```

Claude Code
│
└── DocConvert MCP Server (this)
│
├── pdf2docx (PDF → DOCX extraction)
├── PyMuPDF (OCR with layout preservation)
├── GROBID (metadata + references extraction)
│
└── pandoc (all other conversions)


## 支持格式

### 输入格式

`pdf`, `docx`, `odt`, `html`, `md`, `tex`, `latex`, `rst`, `epub`, `rtf`, `txt`, `org`, `mediawiki`, `textile`, `asciidoc`

### 输出格式

`odt`, `docx`, `html`, `markdown`, `latex`, `pdf`, `epub`, `rst`, `asciidoc`, `rtf`, `txt`, `org`, `mediawiki`

## 安装

### 先决条件```bash
# Install pandoc
sudo apt install pandoc

设置```bash

git clone https://github.com/jwingnut/docconvert-mcp.git
cd docconvert-mcp
uv venv
source .venv/bin/activate
uv pip install fastmcp pdf2docx


## MCP客户端配置

Claude Code CLI

创建或编辑 `.mcp.json` 在您的项目目录(或更广泛的父目录)中:```json
{
"mcpServers": {
"docconvert": {
"command": "/path/to/docconvert-mcp/.venv/bin/python",
"args": ["/path/to/docconvert-mcp/pdf2odt_mcp_server.py"]
}
}
}

然后在中启用服务器 .claude/settings.local.json:```json
{
"enabledMcpjsonServers": ["docconvert"]
}


Claude Desktop

添加到您的 `claude_desktop_config.json`:

- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **视窗**: `%APPDATA%\Claude\claude_desktop_config.json````json
{
"mcpServers": {
"docconvert": {
"command": "/path/to/docconvert-mcp/.venv/bin/python",
"args": ["/path/to/docconvert-mcp/pdf2odt_mcp_server.py"]
}
}
}

Codex CLI

添加 ~/.codex/config.toml:```toml
[mcp_servers.docconvert]
command = "/path/to/docconvert-mcp/.venv/bin/python"
args = ["/path/to/docconvert-mcp/pdf2odt_mcp_server.py"]
startup_timeout_sec = 30


Cursor

添加到光标MCP设置(设置→ MCP → 添加服务器):```json
{
"mcpServers": {
"docconvert": {
"command": "/path/to/docconvert-mcp/.venv/bin/python",
"args": ["/path/to/docconvert-mcp/pdf2odt_mcp_server.py"]
}
}
}

Windsurf

添加 ~/.codeium/windsurf/mcp_config.json:```json
{
"mcpServers": {
"docconvert": {
"command": "/path/to/docconvert-mcp/.venv/bin/python",
"args": ["/path/to/docconvert-mcp/pdf2odt_mcp_server.py"]
}
}
}


Cline / Claude Dev

添加到您的Cline MCP设置中:```json
{
"mcpServers": {
"docconvert": {
"command": "/path/to/docconvert-mcp/.venv/bin/python",
"args": ["/path/to/docconvert-mcp/pdf2odt_mcp_server.py"]
}
}
}

Continue IDE Extension

添加到“继续”配置中:```json
{
"mcpServers": {
"docconvert": {
"command": "/path/to/docconvert-mcp/.venv/bin/python",
"args": ["/path/to/docconvert-mcp/pdf2odt_mcp_server.py"]
}
}
}


Alternative: Using fastmcp run

你也可以通过 `fastmcp` CLI与 `--no-banner` 为了抑制输出:```json
{
"mcpServers": {
"docconvert": {
"command": "/path/to/docconvert-mcp/.venv/bin/fastmcp",
"args": ["run", "--no-banner", "/path/to/docconvert-mcp/pdf2odt_mcp_server.py"]
}
}
}

工具

convert

将文档转换为目标格式。```python

Single file: PDF to Markdown

convert(
input="/path/to/document.pdf",
output="/path/to/document.md",
format="markdown"
)

Single file: PDF to ODT

convert(
input="/path/to/paper.pdf",
output="/path/to/paper.odt",
format="odt"
)

Directory: Convert all supported files to markdown

convert(
input="/path/to/docs/",
output="/path/to/output/",
format="markdown",
recursive=True
)

Directory: Only convert PDFs to ODT

convert(
input="/path/to/mixed_docs/",
output="/path/to/odt_output/",
format="odt",
filter="pdf",
recursive=True
)


**参数:**

|参数|类型|说明|
|-----------|------|-------------|
| `input` |string |输入文件或目录路径|
| `output` |string |输出文件或目录路径|
| `format` |string |目标格式(odt、docx、markdown、html等)|
| `filter` |string |可选-仅转换具有此扩展名的文件|
| `recursive` |bool |如果为True,则处理子目录|
| `parallel` |int |并行工作者的数量(默认1=连续,最多16个)|
| `overwrite` |bool |如果为True(默认),则覆盖现有文件。如果为False,跳过现有。 |

**并行处理:**

并行处理适用于所有文件类型。PDF文件使用子进程隔离来绕过pdf2docx的内部锁定,实现真正的并行性。需要足够的CPU和RAM。```python
# Parallel PDF conversion (4 workers)
convert(
input="/path/to/pdfs/",
output="/path/to/output/",
format="markdown",
filter="pdf",
recursive=True,
parallel=4  # Each PDF runs in isolated subprocess
)

# Response shows parallel PDF info:
# {"total": 10, "converted": 10, "pdf_files": 10, "pdf_parallel": true, "pdf_workers": 4}

# Convert markdown files in parallel (4 workers)
convert(
input="/path/to/markdown_docs/",
output="/path/to/output/",
format="html",
filter="md",
recursive=True,
parallel=4
)

# Mixed formats: all parallel
convert(
input="/path/to/mixed_docs/",  # Contains PDFs and markdown
output="/path/to/output/",
format="html",
recursive=True,
parallel=4
)

# Response shows breakdown:
# {"total": 50, "converted": 50, "pdf_files": 10, "pdf_parallel": true, "pdf_workers": 4, "parallel_workers": 4, "parallel_files": 40}

注: 并行PDF处理需要足够的CPU和RAM。在资源受限的系统上,使用 parallel=1 (默认)用于可靠的顺序处理。

跳过现有文件:

使用 overwrite=False 跳过已存在的文件(对于恢复中断的批处理很有用):```python

Resume an interrupted batch - only convert files not yet done

convert(
input="/path/to/docs/",
output="/path/to/output/",
format="markdown",
recursive=True,
overwrite=False # Skip existing output files
)

Response includes skipped count:

{"total": 100, "converted": 25, "skipped": 75, "failed": 0}


### `formats`

列出所有支持的输入和输出格式。```python
formats()
# Returns:
# {
#   "input_formats": ["asciidoc", "docx", "epub", "htm", "html", ...],
#   "output_formats": ["asciidoc", "docx", "epub", "html", "latex", ...],
#   "note": "PDF input uses pdf2docx then pandoc..."
# }

list_convertible

按格式分组,列出路径中的可转换文件。```python
list_convertible("/path/to/docs/", recursive=True)

Returns:

{

"success": True,

"count": 15,

"by_format": {

".pdf": ["file1.pdf", "file2.pdf"],

".docx": ["report.docx"],

".md": ["notes.md", "readme.md"]

}

}


## 用例

### 学术写作

转换期刊指南和示例论文以便于参考:```python
# Convert journal author guidelines
convert(
input="/path/to/author_guidelines.pdf",
output="/path/to/guidelines.md",
format="markdown"
)

# Convert example papers to study structure
convert(
input="/path/to/example_paper.pdf",
output="/path/to/example.md",
format="markdown"
)

文档迁移

批量转换旧文档:```python

Convert all Word docs to ODT

convert(
input="/path/to/word_docs/",
output="/path/to/odt_docs/",
format="odt",
filter="docx",
recursive=True
)


### 内容提取

从PDF中提取文本进行分析:```python
# Convert PDFs to plain text
convert(
input="/path/to/pdfs/",
output="/path/to/text/",
format="txt",
filter="pdf"
)

Web发布

将文档转换为HTML:```python

Markdown to HTML

convert(
input="/path/to/docs/",
output="/path/to/html/",
format="html",
filter="md",
recursive=True
)


## 整合

与其他MCP服务器协同工作:

- **LibreOffice MCP** -编辑转换后的文档
- **Zotero MCP** -为转换后的内容添加引用

### 工作流示例```python
# 1. Convert journal guidelines
convert(input="guidelines.pdf", output="guidelines.md", format="markdown")

# 2. Read guidelines
Read("guidelines.md")

# 3. Create document in LibreOffice
document(action="create", doc_type="writer")

# 4. Write content following guidelines
text(action="insert", content="...")

# 5. Add citations from Zotero
search_zotero("topic")
text(action="insert", content="{  | (Author, 2020) |  |  |zu:LIB:KEY}")

# 6. Save
save(action="save", file_path="paper.odt")

技术说明

PDF转换

PDF转换分为两个阶段:

  1. pdf2docx 将内容提取到DOCX(保留布局、表格、图像)
  2. 潘多克。 将DOCX转换为目标格式

对于大多数文档,这比直接PDF解析产生更好的结果。

其他格式

所有非PDF转换都直接使用pandoc,它处理:

  • 文档结构(标题、列表、表格)
  • 基本格式
  • 交叉引用
  • 引文(某些格式)

并行PDF处理

PDF并行使用子进程隔离:每个PDF转换都在一个完全独立的Python进程中运行。这绕过了pdf2docx的内部锁定,该锁定阻止了基于线程的并行性。

  • 每个子进程:约100-200MB RAM+CPU使用率
  • 4个并行工作器:~400-800MB RAM,4个CPU核
  • 8个并行工作器:~800MB-1.6GB RAM,8个CPU核

用于扫描PDF的OCR

标准OCR(ocr=True) -保留表格和布局(推荐):```python

Best quality - preserves tables and structure

convert(
input="/path/to/scanned.pdf",
output="/path/to/output.md",
format="markdown",
ocr=True
)

Batch OCR conversion

convert(
input="/path/to/scanned_docs/",
output="/path/to/output/",
format="markdown",
filter="pdf",
ocr=True,
recursive=True
)


**快速OCR(`ocr=True, ocr_fast=True`)** -更简单,失去布局:```python
convert(
input="/path/to/scanned.pdf",
output="/path/to/output.txt",
format="txt",
ocr=True,
ocr_fast=True
)

独立OCR -创建可搜索的PDF:```python
ocr_document("/path/to/scanned.pdf", "/path/to/searchable.pdf")


**OCR要求:**```bash
# Standard OCR (recommended)
pip install pymupdf4llm

# Fast OCR (optional)
pip install ocrmypdf
sudo apt install tesseract-ocr

GROBID学术PDF

使用GROBID从学术文档中提取结构化元数据和参考文献:```python

Extract metadata (title, authors, abstract, DOI, etc.)

extract_metadata("/path/to/paper.pdf")

Returns: {title, authors, abstract, keywords, date, doi, affiliations}

Extract bibliography/references

extract_references("/path/to/paper.pdf")

Returns: [{title, authors, year, journal, volume, pages, doi}, ...]

Extract full document structure

extract_fulltext("/path/to/paper.pdf")

Returns: metadata + all references

Save as TEI XML

extract_fulltext("/path/to/paper.pdf", "/path/to/paper.tei.xml")


**GROBID要求:**```bash
# Start GROBID server (Docker)
docker run -d --name grobid -p 8070:8070 lfoppiano/grobid:0.8.0

# Install client
pip install grobid-client-python

# Optional: Set custom server URL
export GROBID_SERVER=http://your-server:8070

局限性

  • 复杂的PDF布局可能无法完美转换
  • 转换过程中可能会丢失某些格式
  • 并行PDF处理需要足够的系统资源
  • OCR质量取决于扫描质量和Tesseract的功能
  • GROBID需要一个正在运行的服务器(本地或远程)

文件```

pdf2odt-mcp/
├── pdf2odt_mcp_server.py # MCP server
├── .venv/ # Virtual environment
├── .gitignore
└── README.md
```

许可证

麻省理工学院

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
Docconvert MCP 怎么安装?

在客户端按下面的安装命令接入:pip install pymupdf4llm。装完在客户端配置里引用同一个包或端点。

Docconvert MCP 怎么在 Claude Desktop、Claude、Cursor 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Docconvert MCP 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Docconvert MCP 需要 API Key 吗?

资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Docconvert MCP 支持哪些客户端?

资料标注支持 Claude Desktop、Claude、Cursor、Windsurf、Cline;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Docconvert MCP 能提供哪些能力?

资料显示约 3 个工具;能力标签包括 文档转换、批量处理、Python、Claude。具体工具清单以官方文档为准。

Docconvert MCP 需要什么运行环境?

属于本地进程,需要在本机装好运行环境。

Docconvert MCP 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。