Metadata-Version: 2.4
Name: pdf-to-md-mcp
Version: 0.1.0
Summary: MCP Server for high-quality PDF to Markdown conversion with image extraction
Project-URL: Homepage, https://github.com/D0451/pdf-to-md-mcp
Project-URL: Repository, https://github.com/D0451/pdf-to-md-mcp
Project-URL: Issues, https://github.com/D0451/pdf-to-md-mcp/issues
Author: D0451
License-Expression: MIT
License-File: LICENSE
Keywords: converter,markdown,mcp,pdf,pymupdf
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Text Processing :: Markup :: Markdown
Requires-Python: >=3.10
Requires-Dist: mcp>=1.0.0
Requires-Dist: pymupdf4llm>=0.0.17
Description-Content-Type: text/markdown

# pdf-to-md-mcp

MCP Server for high-quality PDF to Markdown conversion. Powered by [pymupdf4llm](https://github.com/pymupdf/pymupdf4llm).

高质量 PDF 转 Markdown 的 MCP Server，基于 [pymupdf4llm](https://github.com/pymupdf/pymupdf4llm)。

## Features / 功能

- Heading hierarchy preservation (`#`, `##`, `###`) / 保留标题层级结构
- Markdown table extraction / 提取 Markdown 格式表格
- Image extraction to local files / 提取图片到本地文件
- List structure preservation / 保留列表结构
- Works with any MCP client (Kiro, Claude Desktop, Cursor, etc.) / 兼容所有 MCP 客户端

## Quick Start / 快速开始

### Using uvx (recommended / 推荐)

No installation needed / 无需安装：

```json
{
  "mcpServers": {
    "pdf-to-md": {
      "command": "uvx",
      "args": ["pdf-to-md-mcp"]
    }
  }
}
```

### Using pip

```bash
pip install pdf-to-md-mcp
```

Then configure your MCP client / 然后配置你的 MCP 客户端：

```json
{
  "mcpServers": {
    "pdf-to-md": {
      "command": "pdf-to-md-mcp"
    }
  }
}
```

## Tool: `pdf_to_markdown`

| Parameter / 参数 | Type / 类型 | Default / 默认值 | Description / 说明 |
|---|---|---|---|
| `pdf_path` | string | (required / 必填) | Path to the PDF file / PDF 文件路径 |
| `output_path` | string | `""` | Output Markdown file path. Empty = return content only / 输出路径，为空则只返回内容 |
| `extract_images` | boolean | `true` | Extract images to local `images/` directory / 是否提取图片到本地 |

## Example / 示例

```
Convert test/sample.pdf to Markdown and save to docs/output.md
把 test/sample.pdf 转成 Markdown 保存到 docs/output.md
```

Images will be saved to `docs/images/`.
图片会保存到 `docs/images/` 目录。

## License / 许可证

MIT
