Claude Desktop + pdfmcp:设置指南
将 pdfmcp 添加到 Claude Desktop 作为本地 MCP 服务器。
仅限本地。相同的 74 个工具,在您的机器上运行:无账户、无密钥、无限制。 使用 Claude Desktop 时,本页的配置会在您的机器上运行 pdfmcp;通过更换配置,您可以随时重新安装或更换客户端。
您需要: 本地 pdfmcp 软件包:安装一次(或让 uvx 在首次启动时下载它)。无账户、无密钥,没有任何秘密需要替换。
它放在哪里: claude_desktop_config.json (Claude Desktop → Settings → Developer → Edit Config)
{
"mcpServers": {
"pdfmcp": {
"command": "uvx",
"args": [
"--from",
"https://pdfmcp.org/downloads/pdfmcp-4.2.1-py3-none-any.whl",
"pdfmcp"
]
}
}
}步骤
- Merge the config below into claude_desktop_config.json (create the file if it doesn't exist).
- Fully restart Claude Desktop.
- Drop in a PDF and ask Claude to extract the text — it happens on this machine.
Local servers live in the config file — the Settings → Connectors UI is for remote servers and can't start local processes.
uvx downloads the pdfmcp package on first launch and keeps it cached. No key is involved: the tools run on this machine.
故障排除
- 本地服务器无法启动:先用
pip install https://pdfmcp.org/downloads/pdfmcp-4.2.1-py3-none-any.whl安装一次软件包,并在终端中运行 pdfmcp 查看错误——通常是软件包下载被拦截,或 Python 版本低于 3.11。 - 工具未出现:编辑其配置后,请完全重新启动客户端;大多数客户端仅在启动时加载 MCP 服务器。
- 某个引擎无法启动:较重的引擎会在首次使用时只下载一次;请检查该次下载的连接并重试:之后一切都在本地运行。
试试这些
设备端处理PDF 转文本提取纯文本,每页一个以换页符分隔的部分。设备端处理压缩 PDF使用 Ghostscript 减小文件大小。预设:轻度(打印质量)、中度(电子书)、重度(屏幕,最小)。本地 · MCPOCR — 可搜索的 PDF使扫描的 PDF 可搜索:没有文本层的页面使用 Tesseract 进行 OCR 并获得不可见文本层;已有文本的页面直接通过并报告为跳过。
更多客户端: Claude Code MCP 设置 · ChatGPT MCP 设置 · Cursor MCP 设置 · 所有 MCP 设置指南 · 本地 API 指南