A
securityA
licenseA
qualityA powerful MCP server for fetching and transforming web content into various formats (HTML, JSON, Markdown, Plain Text) with ease.
Last updated -
4
146
12
TypeScript
MIT License
Used for rendering PowerPoint slides as PNG images, enabling visual export of presentation content for preview or sharing purposes.
Leverages Python libraries like python-pptx for programmatically creating and manipulating PowerPoint presentations, enabling slide creation, content insertion, and presentation formatting.
一个基于 FastMCP 的服务器,用于以编程方式创建、编辑和渲染 PowerPoint (PPTX) 演示文稿。支持幻灯片创建、文本和形状插入、图像嵌入以及将幻灯片渲染为 PNG(使用 LibreOffice)。
pyproject.toml
了解依赖项)sudo pacman -S libreoffice-fresh
或sudo apt install libreoffice
brew install --cask libreoffice
启动服务器:
您可以使用环境变量设置服务器的主机和端口:
HOST
(默认值: 127.0.0.1
)PORT
(默认值: 8000
)例如,要在所有接口和端口 9000 上运行:
或者(使用 FastMCP 进行开发):
服务器通过 FastMCP 公开工具和资源,包括:
create_or_clear_presentation(filename)
add_slide(filename, layout_index)
add_title_and_content(filename, slide_index, title, content)
add_textbox(filename, slide_index, text, left_inches, top_inches, width_inches, height_inches, font_size_pt, bold)
add_shape(filename, slide_index, shape_type_name, left_inches, top_inches, width_inches, height_inches, text)
add_picture(filename, slide_index, image, left_inches, top_inches, width_inches, height_inches)
get_slide_content_description(filename, slide_index)
get_slide_image(filename, slide_index)
(需要 LibreOffice)get_pptx_file(filename)
查看代码以了解完整的参数详细信息和可用的形状类型。
presentations/
目录中。presentations/templates/
中添加自己的模板。请参阅许可证以了解详情。