mcpcn-office-powerpoint-mcp-server 2.0.7__tar.gz → 2.0.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/PKG-INFO +2 -2
  2. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/pyproject.toml +8 -3
  3. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/tools/content_tools.py +64 -1
  4. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/.gitignore +0 -0
  5. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/Dockerfile +0 -0
  6. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/LICENSE +0 -0
  7. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/README.md +0 -0
  8. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/__init__.py +0 -0
  9. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/mcp-config.json +0 -0
  10. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/ppt_mcp_server.py +0 -0
  11. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/requirements.txt +0 -0
  12. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/setup_mcp.py +0 -0
  13. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/slide_layout_templates.json +0 -0
  14. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/smithery.yaml +0 -0
  15. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/tools/__init__.py +0 -0
  16. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/tools/chart_tools.py +0 -0
  17. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/tools/connector_tools.py +0 -0
  18. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/tools/hyperlink_tools.py +0 -0
  19. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/tools/master_tools.py +0 -0
  20. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/tools/presentation_tools.py +0 -0
  21. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/tools/professional_tools.py +0 -0
  22. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/tools/structural_tools.py +0 -0
  23. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/tools/template_tools.py +0 -0
  24. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/tools/transition_tools.py +0 -0
  25. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/utils/__init__.py +0 -0
  26. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/utils/content_utils.py +0 -0
  27. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/utils/core_utils.py +0 -0
  28. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/utils/design_utils.py +0 -0
  29. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/utils/presentation_utils.py +0 -0
  30. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/utils/template_utils.py +0 -0
  31. {mcpcn_office_powerpoint_mcp_server-2.0.7 → mcpcn_office_powerpoint_mcp_server-2.0.8}/utils/validation_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcpcn-office-powerpoint-mcp-server
3
- Version: 2.0.7
3
+ Version: 2.0.8
4
4
  Summary: MCP Server for PowerPoint manipulation using python-pptx - Consolidated Edition
5
5
  Project-URL: Homepage, https://github.com/GongRzhe/Office-PowerPoint-MCP-Server.git
6
6
  Project-URL: Bug Tracker, https://github.com/GongRzhe/Office-PowerPoint-MCP-Server.git/issues
@@ -30,7 +30,7 @@ License-File: LICENSE
30
30
  Classifier: License :: OSI Approved :: MIT License
31
31
  Classifier: Operating System :: OS Independent
32
32
  Classifier: Programming Language :: Python :: 3
33
- Requires-Python: >=3.6
33
+ Requires-Python: >=3.10
34
34
  Requires-Dist: fonttools>=4.0.0
35
35
  Requires-Dist: mcp[cli]>=1.3.0
36
36
  Requires-Dist: pillow>=8.0.0
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "mcpcn-office-powerpoint-mcp-server"
7
- version = "2.0.7"
7
+ version = "2.0.8"
8
8
  description = "MCP Server for PowerPoint manipulation using python-pptx - Consolidated Edition"
9
9
  readme = "README.md"
10
10
  license = {file = "LICENSE"}
@@ -16,7 +16,7 @@ classifiers = [
16
16
  "License :: OSI Approved :: MIT License",
17
17
  "Operating System :: OS Independent",
18
18
  ]
19
- requires-python = ">=3.6"
19
+ requires-python = ">=3.10"
20
20
  dependencies = [
21
21
  "python-pptx>=0.6.21",
22
22
  "mcp[cli]>=1.3.0",
@@ -32,6 +32,11 @@ dependencies = [
32
32
  only-include = ["ppt_mcp_server.py", "tools/", "utils/", "enhanced_slide_templates.json", "slide_layout_templates.json"]
33
33
  sources = ["."]
34
34
 
35
+ [dependency-groups]
36
+ dev = [
37
+ "build>=1.3.0",
38
+ ]
39
+
35
40
  [tool.hatch.build]
36
41
  exclude = [
37
42
  "public/demo.mp4",
@@ -40,4 +45,4 @@ exclude = [
40
45
  ]
41
46
 
42
47
  [project.scripts]
43
- mcpcn-office-powerpoint-mcp-server = "ppt_mcp_server:main"
48
+ mcpcn-office-powerpoint-mcp-server = "ppt_mcp_server:main"
@@ -492,7 +492,70 @@ def register_content_tools(app: FastMCP, presentations: Dict, get_current_presen
492
492
  output_path: Optional[str] = None,
493
493
  presentation_id: Optional[str] = None
494
494
  ) -> Dict:
495
- """Unified image management tool for adding and enhancing images."""
495
+ """
496
+ 统一的图片处理工具(添加/增强)。
497
+
498
+ 功能
499
+ - operation="add":将图片插入到指定幻灯片位置,支持本地文件或 Base64 图片源。
500
+ - operation="enhance":对已有图片文件进行画质增强与风格化处理,输出增强后的图片路径。
501
+
502
+ 参数
503
+ - slide_index: int — 目标幻灯片索引(从 0 开始)。
504
+ - operation: str — "add" 或 "enhance"。
505
+ - image_source: str —
506
+ * 当 source_type="file":本地图片文件路径。
507
+ * 当 source_type="base64":图片的 Base64 字符串。
508
+ - source_type: str — "file" 或 "base64"。
509
+ * add 支持 "file" 与 "base64"。
510
+ * enhance 仅支持 "file"(不接受 base64)。
511
+ - left, top: float — 插入位置(英寸)。
512
+ - width, height: Optional[float] — 插入尺寸(英寸)。可只提供一项以按比例缩放;都不提供则按图片原始尺寸。
513
+ - enhancement_style: Optional[str] — "presentation" 或 "custom"。当 operation="add" 且需要自动增强时可用;"presentation" 走预设的专业增强流程。
514
+ - brightness, contrast, saturation, sharpness: float — 亮度/对比度/饱和度/锐度(默认 1.0,>1 增强,<1 减弱)。
515
+ - blur_radius: float — 模糊半径(默认 0)。
516
+ - filter_type: Optional[str] — 过滤器类型(如 "DETAIL"、"SMOOTH" 等,取决于 Pillow 支持)。
517
+ - output_path: Optional[str] — 增强后图片的输出路径(不传则生成临时文件)。
518
+ - presentation_id: Optional[str] — 指定演示文稿 ID;不传则使用当前打开的演示文稿。
519
+
520
+ 返回
521
+ - operation="add":
522
+ * message: str
523
+ * shape_index: int — 新增形状索引
524
+ * image_path: str(当 source_type="file" 时返回)
525
+ - operation="enhance":
526
+ * message: str
527
+ * enhanced_path: str — 增强后图片文件路径
528
+ - 失败时返回 {"error": str}
529
+
530
+ 注意事项
531
+ - 当前不支持直接传入网络 URL。如需使用网络图片,请先下载为本地文件,或转为 Base64 后将 source_type 设为 "base64"。
532
+ - operation="enhance" 不接受 Base64,必须提供可访问的本地文件路径。
533
+ - 插入 Base64 图片时,内部会写入临时文件后再插入,操作完成后临时文件会被清理。
534
+ - slide_index 必须在当前演示文稿的有效范围内,否则将返回错误。
535
+
536
+ 示例
537
+ - 插入本地图片:
538
+ manage_image(slide_index=0, operation="add",
539
+ image_source="D:/images/logo.png", source_type="file",
540
+ left=1.0, top=1.0, width=3.0)
541
+
542
+ - 插入 Base64 图片:
543
+ manage_image(slide_index=1, operation="add",
544
+ image_source="<BASE64字符串>", source_type="base64",
545
+ left=2.0, top=1.5, width=4.0, height=2.5)
546
+
547
+ - 插入并应用专业增强(演示风格):
548
+ manage_image(slide_index=2, operation="add",
549
+ image_source="assets/photo.jpg", source_type="file",
550
+ enhancement_style="presentation", left=1.0, top=2.0)
551
+
552
+ - 增强已有图片文件(自定义参数):
553
+ manage_image(slide_index=0, operation="enhance",
554
+ image_source="assets/photo.jpg", source_type="file",
555
+ brightness=1.2, contrast=1.1, saturation=1.3,
556
+ sharpness=1.1, blur_radius=0, filter_type=None,
557
+ output_path="assets/photo_enhanced.jpg")
558
+ """
496
559
  pres_id = presentation_id if presentation_id is not None else get_current_presentation_id()
497
560
 
498
561
  if pres_id is None or pres_id not in presentations: