PPT转Markdown MCP服务器
这是一个基于Python的MCP (Model Context Protocol) 服务器,用于将PowerPoint文件转换为Markdown格式。
功能特性
- 🚀 直接使用Python的
markitdown库,支持PowerPoint处理 - 📊 支持PowerPoint格式 (.pptx, .ppt)
- 🎯 支持幻灯片结构转换
- 📝 提取文本、图片描述、表格等内容
- 🔧 简单的API接口
- 🛡️ 完整的错误处理
安装和使用
1. 安装依赖
cd /Users/fengjinchao/Desktop/mcp/skills/python/ppt-to-markdown
uv sync
2. Claude配置
在Claude的MCP配置中添加:
{
"ppt-to-markdown-python": {
"name": "PPT转markdown(Python)",
"type": "stdio",
"description": "Python版本的PPT转markdown工具,支持幻灯片结构",
"isActive": true,
"command": "uv",
"args": ["--directory", "/Users/fengjinchao/Desktop/mcp/skills/python/ppt-to-markdown", "run", "ppt-to-markdown-mcp"]
}
}
3. 使用工具
基本用法
{
"name": "pptx-to-markdown",
"arguments": {
"filepath": "/path/to/your/presentation.pptx"
}
}
自定义选项
{
"name": "pptx-to-markdown",
"arguments": {
"filepath": "/path/to/your/presentation.pptx",
"include_slides": true
}
}
支持的文件格式
.pptx- PowerPoint 2007+ 格式.ppt- PowerPoint 97-2003 格式(通过markitdown支持)
转换特性
- ✅ 幻灯片结构: 保持幻灯片的逻辑结构
- ✅ 文本内容: 提取所有文本内容包括标题和正文
- ✅ 图片处理: 提取图片描述和alt文本
- ✅ 表格支持: 转换表格为Markdown表格格式
- ✅ 列表处理: 保持项目符号和编号列表
- ✅ 格式保持: 尽可能保持原有格式结构
Python版本优势
- 更好的Office文档支持: Python在处理Office文档方面有丰富的库
- 更直接的处理: 无需子进程调用,直接API处理
- 更好的错误处理: Python异常处理更完善
- 更强的扩展性: 易于添加自定义处理逻辑
- 更好的性能: 避免进程间通信开销
代码结构
ppt-to-markdown/
├── pyproject.toml # 项目配置
├── README.md # 说明文档
└── ppt_to_markdown_mcp/ # 主要代码
├── __init__.py # 包初始化
└── server.py # MCP服务器实现
Metadata
Release files for ppt-to-markdown-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ppt_to_markdown_mcp-0.1.0.tar.gz | 71.7 kB | Without provenance | Details for ppt_to_markdown_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ppt_to_markdown_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ppt_to_markdown_mcp-0.1.0-py3-none-any.whl |
Total release size: 76.1 kB
Release files / ppt_to_markdown_mcp-0.1.0.tar.gz
| Download URL | ppt_to_markdown_mcp-0.1.0.tar.gz |
|---|---|
| Size | 71.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f2b06faa1aab9f584b0dea8a0490383d36c383bdedb28670988e73affe447d7
|
|
BLAKE2b-256 checksum How to use checksums |
0a68c998c944039d415e3ade948b9b43fc05eff35ec70659b00a3aeee7b939c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / ppt_to_markdown_mcp-0.1.0-py3-none-any.whl
| Download URL | ppt_to_markdown_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
483df49abe7d3091b774bd0be3c0a238a6afb94f24a07c2315bcd899dc6af9c7
|
|
BLAKE2b-256 checksum How to use checksums |
25d0d81ecb672e4ab2562b87b72a5d7a06faae97b8fa2c3d71fa635131bea03c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Security for ppt-to-markdown-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.