Token导航 LogoToken导航

MCP Server · 文档知识

Docconvert MCP

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

stdio官方级别未说明来源级核验工具 3
文档转换批量处理PythonClaudeClaude DesktopCursorWindsurfCline

快速开始

作者 / 组织
jwingnut
提供方
jwingnut

工具数量

3

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

0

仓库热度

收录来源

1 个

MCP World

选型结论

Docconvert MCP 属于文档知识类 MCP Server,公开资料标注 3 个工具,通过stdio 本地进程接入,适配 Claude Desktop、Claude、Cursor,有可以直接复制的安装命令;接入前先确认权限范围。

分类

文档知识

传输方式

stdio

认证方式

无需认证

部署方式

公开资料未说明

安装与配置

安装命令

pip install pymupdf4llm

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    准备运行环境

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

  2. 2

    安装服务

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

  3. 3

    写入客户端配置

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

  4. 4

    验证是否可用

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

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

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

安装

先决条件

# Install pandoc
sudo apt install pandoc

设置

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 在您的项目目录(或更广泛的父目录)中:

{
  "mcpServers": {
    "docconvert": {
      "command": "/path/to/docconvert-mcp/.venv/bin/python",
      "args": ["/path/to/docconvert-mcp/pdf2odt_mcp_server.py"]
    }
  }
}

然后在中启用服务器 .claude/settings.local.json:

{
  "enabledMcpjsonServers": ["docconvert"]
}

Claude Desktop

添加到您的 claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • 视窗: %APPDATA%\Claude\claude_desktop_config.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:

[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 → 添加服务器):

{
  "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:

{
  "mcpServers": {
    "docconvert": {
      "command": "/path/to/docconvert-mcp/.venv/bin/python",
      "args": ["/path/to/docconvert-mcp/pdf2odt_mcp_server.py"]
    }
  }
}

Cline / Claude Dev

添加到您的Cline MCP设置中:

{
  "mcpServers": {
    "docconvert": {
      "command": "/path/to/docconvert-mcp/.venv/bin/python",
      "args": ["/path/to/docconvert-mcp/pdf2odt_mcp_server.py"]
    }
  }
}

Continue IDE Extension

添加到“继续”配置中:

{
  "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 为了抑制输出:

{
  "mcpServers": {
    "docconvert": {
      "command": "/path/to/docconvert-mcp/.venv/bin/fastmcp",
      "args": ["run", "--no-banner", "/path/to/docconvert-mcp/pdf2odt_mcp_server.py"]
    }
  }
}

工具

convert

将文档转换为目标格式。

# 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
)

参数:

参数类型说明
inputstring输入文件或目录路径
outputstring输出文件或目录路径
formatstring目标格式(odt、docx、markdown、html等)
filterstring可选-仅转换具有此扩展名的文件
recursivebool如果为True,则处理子目录
parallelint并行工作者的数量(默认1=连续,最多16个)
overwritebool如果为True(默认),则覆盖现有文件。如果为False,跳过现有。

并行处理:

并行处理适用于所有文件类型。PDF文件使用子进程隔离来绕过pdf2docx的内部锁定,实现真正的并行性。需要足够的CPU和RAM。

# 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 跳过已存在的文件(对于恢复中断的批处理很有用):

# 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

列出所有支持的输入和输出格式。

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

按格式分组,列出路径中的可转换文件。

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"]
#   }
# }

用例

学术写作

转换期刊指南和示例论文以便于参考:

# 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"
)

文档迁移

批量转换旧文档:

# Convert all Word docs to ODT
convert(
    input="/path/to/word_docs/",
    output="/path/to/odt_docs/",
    format="odt",
    filter="docx",
    recursive=True
)

内容提取

从PDF中提取文本进行分析:

# Convert PDFs to plain text
convert(
    input="/path/to/pdfs/",
    output="/path/to/text/",
    format="txt",
    filter="pdf"
)

Web发布

将文档转换为HTML:

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

整合

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

工作流示例

# 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) -保留表格和布局(推荐):

# 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) -更简单,失去布局:

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

独立OCR -创建可搜索的PDF:

ocr_document("/path/to/scanned.pdf", "/path/to/searchable.pdf")

OCR要求:

# Standard OCR (recommended)
pip install pymupdf4llm

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

GROBID学术PDF

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

# 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要求:

# 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

许可证

麻省理工学院

工具与能力

工具数量

3

资源数量

0

提示词数量

0

能力标签

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

支持客户端

Claude DesktopClaudeCursorWindsurfCline

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

读长文档提问

把 PDF、Markdown 和笔记交给模型,按章节追问细节。

整理知识库

把零散资料归档、打标签,检索时更容易命中。

批量出摘要

提取要点,输出能直接引用的段落。

选择建议

值得选的地方

  • 只提供 3 个工具,职责集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已经适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好 运行环境,换机器要重新装一遍。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

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

不太适合

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

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
Docconvert MCP

MCP World · 本页

3stdio有1 个2026-05-17
Cherry Studio

MCP World

0未说明未标注1 个2026-05-17
Pdf Math Translate

MCP World

0stdio有1 个2026-05-17
report generation

MCP World

0stdio有1 个2026-05-17
Anything To Notebooklm

MCP World

0stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

Docconvert MCP 怎么安装?

公开资料给出的安装命令是 pip install pymupdf4llm,运行环境为 未标注。装完后按客户端要求写进 MCP 配置,重启客户端生效。

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

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

Docconvert MCP 收费吗?

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

Docconvert MCP 需要 API Key 吗?

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

Docconvert MCP 支持哪些客户端?

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

来源信息

继续浏览同类 MCP