mcpcn-office-powerpoint-mcp-server 2.0.7__py3-none-any.whl
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.
- mcpcn_office_powerpoint_mcp_server-2.0.7.dist-info/METADATA +1023 -0
- mcpcn_office_powerpoint_mcp_server-2.0.7.dist-info/RECORD +25 -0
- mcpcn_office_powerpoint_mcp_server-2.0.7.dist-info/WHEEL +4 -0
- mcpcn_office_powerpoint_mcp_server-2.0.7.dist-info/entry_points.txt +2 -0
- mcpcn_office_powerpoint_mcp_server-2.0.7.dist-info/licenses/LICENSE +21 -0
- ppt_mcp_server.py +450 -0
- slide_layout_templates.json +3690 -0
- tools/__init__.py +28 -0
- tools/chart_tools.py +82 -0
- tools/connector_tools.py +91 -0
- tools/content_tools.py +593 -0
- tools/hyperlink_tools.py +138 -0
- tools/master_tools.py +114 -0
- tools/presentation_tools.py +212 -0
- tools/professional_tools.py +290 -0
- tools/structural_tools.py +373 -0
- tools/template_tools.py +521 -0
- tools/transition_tools.py +75 -0
- utils/__init__.py +69 -0
- utils/content_utils.py +579 -0
- utils/core_utils.py +55 -0
- utils/design_utils.py +689 -0
- utils/presentation_utils.py +217 -0
- utils/template_utils.py +1143 -0
- utils/validation_utils.py +323 -0
|
@@ -0,0 +1,1023 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mcpcn-office-powerpoint-mcp-server
|
|
3
|
+
Version: 2.0.7
|
|
4
|
+
Summary: MCP Server for PowerPoint manipulation using python-pptx - Consolidated Edition
|
|
5
|
+
Project-URL: Homepage, https://github.com/GongRzhe/Office-PowerPoint-MCP-Server.git
|
|
6
|
+
Project-URL: Bug Tracker, https://github.com/GongRzhe/Office-PowerPoint-MCP-Server.git/issues
|
|
7
|
+
Author-email: GongRzhe <gongrzhe@gmail.com>
|
|
8
|
+
License: MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2025 GongRzhe
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
31
|
+
Classifier: Operating System :: OS Independent
|
|
32
|
+
Classifier: Programming Language :: Python :: 3
|
|
33
|
+
Requires-Python: >=3.6
|
|
34
|
+
Requires-Dist: fonttools>=4.0.0
|
|
35
|
+
Requires-Dist: mcp[cli]>=1.3.0
|
|
36
|
+
Requires-Dist: pillow>=8.0.0
|
|
37
|
+
Requires-Dist: python-pptx>=0.6.21
|
|
38
|
+
Description-Content-Type: text/markdown
|
|
39
|
+
|
|
40
|
+
# Office-PowerPoint-MCP-Server
|
|
41
|
+
[](https://smithery.ai/server/@GongRzhe/Office-PowerPoint-MCP-Server)
|
|
42
|
+

|
|
43
|
+
|
|
44
|
+
A comprehensive MCP (Model Context Protocol) server for PowerPoint manipulation using python-pptx. **Version 2.0** provides 32 powerful tools organized into 11 specialized modules, offering complete PowerPoint creation, management, and professional design capabilities. The server features a modular architecture with enhanced parameter handling, intelligent operation selection, and comprehensive error handling.
|
|
45
|
+
|
|
46
|
+
----
|
|
47
|
+
|
|
48
|
+
# **Not so ugly anymore with new slide_layout_templates**
|
|
49
|
+
|
|
50
|
+
<img width="1509" alt="截屏2025-06-20 15 53 45" src="https://github.com/user-attachments/assets/197d82cb-017a-4c00-b969-6e40440ffa36" />
|
|
51
|
+
|
|
52
|
+
----
|
|
53
|
+
|
|
54
|
+
### Example
|
|
55
|
+
|
|
56
|
+
#### Pormpt
|
|
57
|
+
|
|
58
|
+
<img width="1280" alt="650f4cc5d0f1ea4f3b1580800cb0deb" src="https://github.com/user-attachments/assets/90633c97-f373-4c85-bc9c-a1d7b891c344" />
|
|
59
|
+
|
|
60
|
+
#### Output
|
|
61
|
+
|
|
62
|
+
<img width="1640" alt="084f1cf4bc7e4fcd4890c8f94f536c1" src="https://github.com/user-attachments/assets/420e63a0-15a4-46d8-b149-1408d23af038" />
|
|
63
|
+
|
|
64
|
+
#### Demo's GIF -> (./public/demo.mp4)
|
|
65
|
+
|
|
66
|
+

|
|
67
|
+
|
|
68
|
+
## Features
|
|
69
|
+
|
|
70
|
+
### Core PowerPoint Operations
|
|
71
|
+
- **Round-trip support** for any Open XML presentation (.pptx file) including all elements
|
|
72
|
+
- **Template support** with automatic theme and layout preservation
|
|
73
|
+
- **Multi-presentation management** with global state tracking
|
|
74
|
+
- **Core document properties** management (title, subject, author, keywords, comments)
|
|
75
|
+
|
|
76
|
+
### Content Creation & Management
|
|
77
|
+
- **Slide management** with flexible layout selection
|
|
78
|
+
- **Text manipulation** with placeholder population and bullet point creation
|
|
79
|
+
- **Advanced text formatting** with font, color, alignment, and style controls
|
|
80
|
+
- **Text validation** with automatic fit checking and optimization suggestions
|
|
81
|
+
|
|
82
|
+
### Visual Elements
|
|
83
|
+
- **Image handling** with file and base64 input support
|
|
84
|
+
- **Image enhancement** using Pillow with brightness, contrast, saturation, and filter controls
|
|
85
|
+
- **Professional image effects** including shadows, reflections, glows, and soft edges
|
|
86
|
+
- **Shape creation** with 20+ auto shape types (rectangles, ovals, flowchart elements, etc.)
|
|
87
|
+
- **Table creation** with advanced cell formatting and styling
|
|
88
|
+
|
|
89
|
+
### Charts & Data Visualization
|
|
90
|
+
- **Chart support** for column, bar, line, and pie charts
|
|
91
|
+
- **Data series management** with categories and multiple series support
|
|
92
|
+
- **Chart formatting** with legends, data labels, and titles
|
|
93
|
+
|
|
94
|
+
### Professional Design Features
|
|
95
|
+
- **4 professional color schemes** (Modern Blue, Corporate Gray, Elegant Green, Warm Red)
|
|
96
|
+
- **Professional typography** with Segoe UI font family and size presets
|
|
97
|
+
- **Theme application** with automatic styling across presentations
|
|
98
|
+
- **Gradient backgrounds** with customizable directions and color schemes
|
|
99
|
+
- **Slide enhancement** tools for existing content
|
|
100
|
+
- **25 built-in slide templates** with dynamic sizing and visual effects
|
|
101
|
+
- **Advanced template features** including auto-wrapping, dynamic font sizing, and professional animations
|
|
102
|
+
|
|
103
|
+
### Advanced Features
|
|
104
|
+
- **Font analysis and optimization** using FontTools
|
|
105
|
+
- **Picture effects** with 9 different visual effects (shadow, reflection, glow, bevel, etc.)
|
|
106
|
+
- **Comprehensive validation** with automatic error fixing
|
|
107
|
+
- **Template search** with configurable directory paths
|
|
108
|
+
- **Professional layout calculations** with margin and spacing management
|
|
109
|
+
|
|
110
|
+
## Installation
|
|
111
|
+
|
|
112
|
+
### Installing via Smithery
|
|
113
|
+
|
|
114
|
+
To install PowerPoint Manipulation Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@GongRzhe/Office-PowerPoint-MCP-Server):
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
npx -y @smithery/cli install @GongRzhe/Office-PowerPoint-MCP-Server --client claude
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Prerequisites
|
|
121
|
+
|
|
122
|
+
- Python 3.6 or higher (as specified in pyproject.toml)
|
|
123
|
+
- pip package manager
|
|
124
|
+
- Optional: uvx for package execution without local installation
|
|
125
|
+
|
|
126
|
+
### Installation Options
|
|
127
|
+
|
|
128
|
+
#### Option 1: Using the Setup Script (Recommended)
|
|
129
|
+
|
|
130
|
+
The easiest way to set up the PowerPoint MCP Server is using the provided setup script, which automates the installation process:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
python setup_mcp.py
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
This script will:
|
|
137
|
+
- Check prerequisites
|
|
138
|
+
- Offer installation options:
|
|
139
|
+
- Install from PyPI (recommended for most users)
|
|
140
|
+
- Set up local development environment
|
|
141
|
+
- Install required dependencies
|
|
142
|
+
- Generate the appropriate MCP configuration file
|
|
143
|
+
- Provide instructions for integrating with Claude Desktop
|
|
144
|
+
|
|
145
|
+
The script offers different paths based on your environment:
|
|
146
|
+
- If you have `uvx` installed, it will configure using UVX (recommended)
|
|
147
|
+
- If the server is already installed, it provides configuration options
|
|
148
|
+
- If the server is not installed, it offers installation methods
|
|
149
|
+
|
|
150
|
+
#### Option 2: Manual Installation
|
|
151
|
+
|
|
152
|
+
1. Clone the repository:
|
|
153
|
+
```bash
|
|
154
|
+
git clone https://github.com/GongRzhe/Office-PowerPoint-MCP-Server.git
|
|
155
|
+
cd Office-PowerPoint-MCP-Server
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
2. Install dependencies:
|
|
159
|
+
```bash
|
|
160
|
+
pip install -r requirements.txt
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
3. Make the server executable:
|
|
164
|
+
```bash
|
|
165
|
+
chmod +x ppt_mcp_server.py
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Usage
|
|
169
|
+
|
|
170
|
+
Display help text:
|
|
171
|
+
```bash
|
|
172
|
+
python ppt_mcp_server.py -h
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Starting the Stdio Server
|
|
176
|
+
|
|
177
|
+
Run the stdio server:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
python ppt_mcp_server.py
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Starting the Streamable-Http Server
|
|
184
|
+
|
|
185
|
+
Run the streamable-http server on port 8000:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
python ppt_mcp_server.py --transport http --port 8000
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Run in Docker
|
|
192
|
+
```bash
|
|
193
|
+
docker build -t ppt_mcp_server .
|
|
194
|
+
docker run -d --rm -p 8000:8000 ppt_mcp_server -t http
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
### MCP Configuration
|
|
199
|
+
|
|
200
|
+
#### Option 1: Local Python Server
|
|
201
|
+
|
|
202
|
+
Add the server to your MCP settings configuration file:
|
|
203
|
+
|
|
204
|
+
```json
|
|
205
|
+
{
|
|
206
|
+
"mcpServers": {
|
|
207
|
+
"ppt": {
|
|
208
|
+
"command": "python",
|
|
209
|
+
"args": ["/path/to/ppt_mcp_server.py"],
|
|
210
|
+
"env": {}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
#### Option 2: Using UVX (No Local Installation Required)
|
|
217
|
+
|
|
218
|
+
If you have `uvx` installed, you can run the server directly from PyPI without local installation:
|
|
219
|
+
|
|
220
|
+
```json
|
|
221
|
+
{
|
|
222
|
+
"mcpServers": {
|
|
223
|
+
"ppt": {
|
|
224
|
+
"command": "uvx",
|
|
225
|
+
"args": ["office-powerpoint-mcp-server"],
|
|
226
|
+
"env": {}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## 🚀 What's New in v2.0
|
|
233
|
+
|
|
234
|
+
### **Comprehensive Tool Suite (32 Tools)**
|
|
235
|
+
- **Complete PowerPoint manipulation** with 34 specialized tools
|
|
236
|
+
- **11 organized modules** covering all aspects of presentation creation
|
|
237
|
+
- **Enhanced parameter handling** with comprehensive validation
|
|
238
|
+
- **Intelligent defaults** and operation-based interfaces
|
|
239
|
+
|
|
240
|
+
### **Built-in Slide Templates**
|
|
241
|
+
- **25+ professional slide templates** with dynamic features built-in
|
|
242
|
+
- **Advanced template system** with auto-generation capabilities
|
|
243
|
+
- **Auto-sizing text** that adapts to content length and container size
|
|
244
|
+
- **Professional visual effects** including shadows, glows, and gradients
|
|
245
|
+
- **Complete presentation generation** from template sequences
|
|
246
|
+
|
|
247
|
+
### **Modular Architecture**
|
|
248
|
+
- **11 specialized modules**: presentation, content, structural, professional, template, hyperlink, chart, connector, master, and transition tools
|
|
249
|
+
- **Better maintainability** with separated concerns
|
|
250
|
+
- **Easier extensibility** for adding new features
|
|
251
|
+
- **Cleaner code structure** with shared utilities
|
|
252
|
+
|
|
253
|
+
## Available Tools
|
|
254
|
+
|
|
255
|
+
The server provides **34 specialized tools** organized into the following categories:
|
|
256
|
+
|
|
257
|
+
### **Presentation Management (7 tools)**
|
|
258
|
+
1. **create_presentation** - Create new presentations
|
|
259
|
+
2. **create_presentation_from_template** - Create from templates with theme preservation
|
|
260
|
+
3. **open_presentation** - Open existing presentations
|
|
261
|
+
4. **save_presentation** - Save presentations to files
|
|
262
|
+
5. **get_presentation_info** - Get comprehensive presentation information
|
|
263
|
+
6. **get_template_file_info** - Analyze template files and layouts
|
|
264
|
+
7. **set_core_properties** - Set document properties
|
|
265
|
+
|
|
266
|
+
### **Content Management (8 tools)**
|
|
267
|
+
8. **add_slide** - Add slides with optional background styling
|
|
268
|
+
9. **get_slide_info** - Get detailed slide information
|
|
269
|
+
10. **extract_slide_text** - ✨ **NEW** Extract all text content from a specific slide
|
|
270
|
+
11. **extract_presentation_text** - ✨ **NEW** Extract text content from all slides in presentation
|
|
271
|
+
12. **populate_placeholder** - Populate placeholders with text
|
|
272
|
+
13. **add_bullet_points** - Add formatted bullet points
|
|
273
|
+
14. **manage_text** - ✨ **Unified text tool** (add/format/validate/format_runs)
|
|
274
|
+
15. **manage_image** - ✨ **Unified image tool** (add/enhance)
|
|
275
|
+
|
|
276
|
+
### **Template Operations (7 tools)**
|
|
277
|
+
16. **list_slide_templates** - Browse available slide layout templates
|
|
278
|
+
17. **apply_slide_template** - Apply structured layout templates to existing slides
|
|
279
|
+
18. **create_slide_from_template** - Create new slides using layout templates
|
|
280
|
+
19. **create_presentation_from_templates** - Create complete presentations from template sequences
|
|
281
|
+
20. **get_template_info** - Get detailed information about specific templates
|
|
282
|
+
21. **auto_generate_presentation** - Automatically generate presentations based on topic
|
|
283
|
+
22. **optimize_slide_text** - Optimize text elements for better readability and fit
|
|
284
|
+
|
|
285
|
+
### **Structural Elements (4 tools)**
|
|
286
|
+
23. **add_table** - Create tables with enhanced formatting
|
|
287
|
+
24. **format_table_cell** - Format individual table cells
|
|
288
|
+
25. **add_shape** - Add shapes with text and formatting options
|
|
289
|
+
26. **add_chart** - Create charts with comprehensive customization
|
|
290
|
+
|
|
291
|
+
### **Professional Design (3 tools)**
|
|
292
|
+
27. **apply_professional_design** - ✨ **Unified design tool** (themes/slides/enhancement)
|
|
293
|
+
28. **apply_picture_effects** - ✨ **Unified effects tool** (9+ effects combined)
|
|
294
|
+
29. **manage_fonts** - ✨ **Unified font tool** (analyze/optimize/recommend)
|
|
295
|
+
|
|
296
|
+
### **Specialized Features (5 tools)**
|
|
297
|
+
30. **manage_hyperlinks** - Complete hyperlink management (add/remove/list/update)
|
|
298
|
+
31. **manage_slide_masters** - Access and manage slide master properties and layouts
|
|
299
|
+
32. **add_connector** - Add connector lines/arrows between points on slides
|
|
300
|
+
33. **update_chart_data** - Replace existing chart data with new categories and series
|
|
301
|
+
34. **manage_slide_transitions** - Basic slide transition management
|
|
302
|
+
|
|
303
|
+
## 🌟 Key Unified Tools
|
|
304
|
+
|
|
305
|
+
### **`manage_text`** - All-in-One Text Management
|
|
306
|
+
```python
|
|
307
|
+
# Add text box
|
|
308
|
+
manage_text(slide_index=0, operation="add", text="Hello World", font_size=24)
|
|
309
|
+
|
|
310
|
+
# Format existing text
|
|
311
|
+
manage_text(slide_index=0, operation="format", shape_index=0, bold=True, color=[255,0,0])
|
|
312
|
+
|
|
313
|
+
# Validate text fit with auto-fix
|
|
314
|
+
manage_text(slide_index=0, operation="validate", shape_index=0, validation_only=False)
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### **`manage_image`** - Complete Image Handling
|
|
318
|
+
```python
|
|
319
|
+
# Add image with enhancement
|
|
320
|
+
manage_image(slide_index=0, operation="add", image_source="logo.png",
|
|
321
|
+
enhancement_style="presentation")
|
|
322
|
+
|
|
323
|
+
# Enhance existing image
|
|
324
|
+
manage_image(slide_index=0, operation="enhance", image_source="photo.jpg",
|
|
325
|
+
brightness=1.2, contrast=1.1, saturation=1.3)
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### **`apply_picture_effects`** - Multiple Effects in One Call
|
|
329
|
+
```python
|
|
330
|
+
# Apply combined effects
|
|
331
|
+
apply_picture_effects(slide_index=0, shape_index=0, effects={
|
|
332
|
+
"shadow": {"blur_radius": 4.0, "color": [128,128,128]},
|
|
333
|
+
"glow": {"size": 5.0, "color": [0,176,240]},
|
|
334
|
+
"rotation": {"rotation": 15.0}
|
|
335
|
+
})
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### **`apply_professional_design`** - Theme & Design Management
|
|
339
|
+
```python
|
|
340
|
+
# Add professional slide
|
|
341
|
+
apply_professional_design(operation="slide", slide_type="title_content",
|
|
342
|
+
color_scheme="modern_blue", title="My Presentation")
|
|
343
|
+
|
|
344
|
+
# Apply theme to entire presentation
|
|
345
|
+
apply_professional_design(operation="theme", color_scheme="corporate_gray")
|
|
346
|
+
|
|
347
|
+
# Enhance existing slide
|
|
348
|
+
apply_professional_design(operation="enhance", slide_index=0, color_scheme="elegant_green")
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
## Examples
|
|
352
|
+
|
|
353
|
+
### Creating a New Presentation
|
|
354
|
+
|
|
355
|
+
```python
|
|
356
|
+
# Create a new presentation
|
|
357
|
+
result = use_mcp_tool(
|
|
358
|
+
server_name="ppt",
|
|
359
|
+
tool_name="create_presentation",
|
|
360
|
+
arguments={}
|
|
361
|
+
)
|
|
362
|
+
presentation_id = result["presentation_id"]
|
|
363
|
+
|
|
364
|
+
# Add a title slide
|
|
365
|
+
result = use_mcp_tool(
|
|
366
|
+
server_name="ppt",
|
|
367
|
+
tool_name="add_slide",
|
|
368
|
+
arguments={
|
|
369
|
+
"layout_index": 0, # Title slide layout
|
|
370
|
+
"title": "My Presentation",
|
|
371
|
+
"presentation_id": presentation_id
|
|
372
|
+
}
|
|
373
|
+
)
|
|
374
|
+
slide_index = result["slide_index"]
|
|
375
|
+
|
|
376
|
+
# Populate subtitle placeholder
|
|
377
|
+
result = use_mcp_tool(
|
|
378
|
+
server_name="ppt",
|
|
379
|
+
tool_name="populate_placeholder",
|
|
380
|
+
arguments={
|
|
381
|
+
"slide_index": slide_index,
|
|
382
|
+
"placeholder_idx": 1, # Subtitle placeholder
|
|
383
|
+
"text": "Created with PowerPoint MCP Server",
|
|
384
|
+
"presentation_id": presentation_id
|
|
385
|
+
}
|
|
386
|
+
)
|
|
387
|
+
|
|
388
|
+
# Save the presentation
|
|
389
|
+
result = use_mcp_tool(
|
|
390
|
+
server_name="ppt",
|
|
391
|
+
tool_name="save_presentation",
|
|
392
|
+
arguments={
|
|
393
|
+
"file_path": "my_presentation.pptx",
|
|
394
|
+
"presentation_id": presentation_id
|
|
395
|
+
}
|
|
396
|
+
)
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
### Creating a Professional Presentation with v2.0
|
|
400
|
+
|
|
401
|
+
```python
|
|
402
|
+
# Create a professional slide with modern styling - CONSOLIDATED TOOL
|
|
403
|
+
result = use_mcp_tool(
|
|
404
|
+
server_name="ppt",
|
|
405
|
+
tool_name="apply_professional_design",
|
|
406
|
+
arguments={
|
|
407
|
+
"operation": "slide",
|
|
408
|
+
"slide_type": "title_content",
|
|
409
|
+
"color_scheme": "modern_blue",
|
|
410
|
+
"title": "Quarterly Business Review",
|
|
411
|
+
"content": [
|
|
412
|
+
"Revenue increased by 15% compared to last quarter",
|
|
413
|
+
"Customer satisfaction scores reached all-time high of 94%",
|
|
414
|
+
"Successfully launched 3 new product features",
|
|
415
|
+
"Expanded team by 12 new talented professionals"
|
|
416
|
+
]
|
|
417
|
+
}
|
|
418
|
+
)
|
|
419
|
+
|
|
420
|
+
# Apply professional theme to entire presentation - SAME TOOL, DIFFERENT OPERATION
|
|
421
|
+
result = use_mcp_tool(
|
|
422
|
+
server_name="ppt",
|
|
423
|
+
tool_name="apply_professional_design",
|
|
424
|
+
arguments={
|
|
425
|
+
"operation": "theme",
|
|
426
|
+
"color_scheme": "modern_blue",
|
|
427
|
+
"apply_to_existing": True
|
|
428
|
+
}
|
|
429
|
+
)
|
|
430
|
+
|
|
431
|
+
# Add slide with gradient background - ENHANCED ADD_SLIDE
|
|
432
|
+
result = use_mcp_tool(
|
|
433
|
+
server_name="ppt",
|
|
434
|
+
tool_name="add_slide",
|
|
435
|
+
arguments={
|
|
436
|
+
"layout_index": 0,
|
|
437
|
+
"background_type": "professional_gradient",
|
|
438
|
+
"color_scheme": "modern_blue",
|
|
439
|
+
"gradient_direction": "diagonal"
|
|
440
|
+
}
|
|
441
|
+
)
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
### Working with Built-in Slide Templates (New in v2.0)
|
|
445
|
+
|
|
446
|
+
```python
|
|
447
|
+
# List all available slide templates with their features
|
|
448
|
+
result = use_mcp_tool(
|
|
449
|
+
server_name="ppt",
|
|
450
|
+
tool_name="list_slide_templates",
|
|
451
|
+
arguments={}
|
|
452
|
+
)
|
|
453
|
+
|
|
454
|
+
# Apply a professional template to an existing slide
|
|
455
|
+
result = use_mcp_tool(
|
|
456
|
+
server_name="ppt",
|
|
457
|
+
tool_name="apply_slide_template",
|
|
458
|
+
arguments={
|
|
459
|
+
"slide_index": 0,
|
|
460
|
+
"template_id": "title_slide",
|
|
461
|
+
"color_scheme": "modern_blue",
|
|
462
|
+
"content_mapping": {
|
|
463
|
+
"title": "Quarterly Business Review",
|
|
464
|
+
"subtitle": "Q4 2024 Results",
|
|
465
|
+
"author": "Leadership Team"
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
)
|
|
469
|
+
|
|
470
|
+
# Create a new slide using a template
|
|
471
|
+
result = use_mcp_tool(
|
|
472
|
+
server_name="ppt",
|
|
473
|
+
tool_name="create_slide_from_template",
|
|
474
|
+
arguments={
|
|
475
|
+
"template_id": "text_with_image",
|
|
476
|
+
"color_scheme": "elegant_green",
|
|
477
|
+
"content_mapping": {
|
|
478
|
+
"title": "Our Revolutionary Solution",
|
|
479
|
+
"content": "• 250% increase in efficiency\n• 98% customer satisfaction\n• Industry-leading performance"
|
|
480
|
+
},
|
|
481
|
+
"image_paths": {
|
|
482
|
+
"supporting": "path/to/product_image.jpg"
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
)
|
|
486
|
+
|
|
487
|
+
# Generate a complete presentation from multiple templates
|
|
488
|
+
result = use_mcp_tool(
|
|
489
|
+
server_name="ppt",
|
|
490
|
+
tool_name="create_presentation_from_templates",
|
|
491
|
+
arguments={
|
|
492
|
+
"template_sequence": [
|
|
493
|
+
{
|
|
494
|
+
"template_id": "title_slide",
|
|
495
|
+
"content": {
|
|
496
|
+
"title": "2024 Annual Report",
|
|
497
|
+
"subtitle": "Growth and Innovation",
|
|
498
|
+
"author": "Executive Team"
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"template_id": "key_metrics_dashboard",
|
|
503
|
+
"content": {
|
|
504
|
+
"metric_1_value": "94%",
|
|
505
|
+
"metric_2_value": "$2.4M",
|
|
506
|
+
"metric_3_value": "247"
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"template_id": "before_after_comparison",
|
|
511
|
+
"content": {
|
|
512
|
+
"content_left": "Manual processes taking hours",
|
|
513
|
+
"content_right": "Automated workflows in minutes"
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
],
|
|
517
|
+
"color_scheme": "modern_blue"
|
|
518
|
+
}
|
|
519
|
+
)
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
### Enhanced Image Management with v2.0
|
|
523
|
+
|
|
524
|
+
```python
|
|
525
|
+
# Add image with automatic enhancement - CONSOLIDATED TOOL
|
|
526
|
+
result = use_mcp_tool(
|
|
527
|
+
server_name="ppt",
|
|
528
|
+
tool_name="manage_image",
|
|
529
|
+
arguments={
|
|
530
|
+
"slide_index": 1,
|
|
531
|
+
"operation": "add",
|
|
532
|
+
"image_source": "company_logo.png",
|
|
533
|
+
"left": 1.0,
|
|
534
|
+
"top": 1.0,
|
|
535
|
+
"width": 3.0,
|
|
536
|
+
"height": 2.0,
|
|
537
|
+
"enhancement_style": "presentation"
|
|
538
|
+
}
|
|
539
|
+
)
|
|
540
|
+
|
|
541
|
+
# Apply multiple picture effects at once - CONSOLIDATED TOOL
|
|
542
|
+
result = use_mcp_tool(
|
|
543
|
+
server_name="ppt",
|
|
544
|
+
tool_name="apply_picture_effects",
|
|
545
|
+
arguments={
|
|
546
|
+
"slide_index": 1,
|
|
547
|
+
"shape_index": 0,
|
|
548
|
+
"effects": {
|
|
549
|
+
"shadow": {
|
|
550
|
+
"shadow_type": "outer",
|
|
551
|
+
"blur_radius": 4.0,
|
|
552
|
+
"distance": 3.0,
|
|
553
|
+
"direction": 315.0,
|
|
554
|
+
"color": [128, 128, 128],
|
|
555
|
+
"transparency": 0.6
|
|
556
|
+
},
|
|
557
|
+
"glow": {
|
|
558
|
+
"size": 5.0,
|
|
559
|
+
"color": [0, 176, 240],
|
|
560
|
+
"transparency": 0.4
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
)
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
### Advanced Text Management with v2.0
|
|
568
|
+
|
|
569
|
+
```python
|
|
570
|
+
# Add and format text in one operation - CONSOLIDATED TOOL
|
|
571
|
+
result = use_mcp_tool(
|
|
572
|
+
server_name="ppt",
|
|
573
|
+
tool_name="manage_text",
|
|
574
|
+
arguments={
|
|
575
|
+
"slide_index": 0,
|
|
576
|
+
"operation": "add",
|
|
577
|
+
"left": 1.0,
|
|
578
|
+
"top": 2.0,
|
|
579
|
+
"width": 8.0,
|
|
580
|
+
"height": 1.5,
|
|
581
|
+
"text": "Welcome to Our Quarterly Review",
|
|
582
|
+
"font_size": 32,
|
|
583
|
+
"font_name": "Segoe UI",
|
|
584
|
+
"bold": True,
|
|
585
|
+
"color": [0, 120, 215],
|
|
586
|
+
"alignment": "center",
|
|
587
|
+
"auto_fit": True
|
|
588
|
+
}
|
|
589
|
+
)
|
|
590
|
+
|
|
591
|
+
# Validate and fix text fit issues - SAME TOOL, DIFFERENT OPERATION
|
|
592
|
+
result = use_mcp_tool(
|
|
593
|
+
server_name="ppt",
|
|
594
|
+
tool_name="manage_text",
|
|
595
|
+
arguments={
|
|
596
|
+
"slide_index": 0,
|
|
597
|
+
"operation": "validate",
|
|
598
|
+
"shape_index": 0,
|
|
599
|
+
"validation_only": False, # Auto-fix enabled
|
|
600
|
+
"min_font_size": 10,
|
|
601
|
+
"max_font_size": 48
|
|
602
|
+
}
|
|
603
|
+
)
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
### Creating a Presentation from Template
|
|
607
|
+
|
|
608
|
+
```python
|
|
609
|
+
# First, inspect a template to see its layouts and properties
|
|
610
|
+
result = use_mcp_tool(
|
|
611
|
+
server_name="ppt",
|
|
612
|
+
tool_name="get_template_info",
|
|
613
|
+
arguments={
|
|
614
|
+
"template_path": "company_template.pptx"
|
|
615
|
+
}
|
|
616
|
+
)
|
|
617
|
+
template_info = result
|
|
618
|
+
|
|
619
|
+
# Create a new presentation from the template
|
|
620
|
+
result = use_mcp_tool(
|
|
621
|
+
server_name="ppt",
|
|
622
|
+
tool_name="create_presentation_from_template",
|
|
623
|
+
arguments={
|
|
624
|
+
"template_path": "company_template.pptx"
|
|
625
|
+
}
|
|
626
|
+
)
|
|
627
|
+
presentation_id = result["presentation_id"]
|
|
628
|
+
|
|
629
|
+
# Add a slide using one of the template's layouts
|
|
630
|
+
result = use_mcp_tool(
|
|
631
|
+
server_name="ppt",
|
|
632
|
+
tool_name="add_slide",
|
|
633
|
+
arguments={
|
|
634
|
+
"layout_index": 1, # Use layout from template
|
|
635
|
+
"title": "Quarterly Report",
|
|
636
|
+
"presentation_id": presentation_id
|
|
637
|
+
}
|
|
638
|
+
)
|
|
639
|
+
|
|
640
|
+
# Save the presentation
|
|
641
|
+
result = use_mcp_tool(
|
|
642
|
+
server_name="ppt",
|
|
643
|
+
tool_name="save_presentation",
|
|
644
|
+
arguments={
|
|
645
|
+
"file_path": "quarterly_report.pptx",
|
|
646
|
+
"presentation_id": presentation_id
|
|
647
|
+
}
|
|
648
|
+
)
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
### Adding Advanced Charts and Data Visualization
|
|
652
|
+
|
|
653
|
+
```python
|
|
654
|
+
# Add a chart slide
|
|
655
|
+
result = use_mcp_tool(
|
|
656
|
+
server_name="ppt",
|
|
657
|
+
tool_name="add_slide",
|
|
658
|
+
arguments={
|
|
659
|
+
"layout_index": 1, # Content slide layout
|
|
660
|
+
"title": "Sales Data",
|
|
661
|
+
"presentation_id": presentation_id
|
|
662
|
+
}
|
|
663
|
+
)
|
|
664
|
+
slide_index = result["slide_index"]
|
|
665
|
+
|
|
666
|
+
# Add a column chart with comprehensive customization
|
|
667
|
+
result = use_mcp_tool(
|
|
668
|
+
server_name="ppt",
|
|
669
|
+
tool_name="add_chart",
|
|
670
|
+
arguments={
|
|
671
|
+
"slide_index": slide_index,
|
|
672
|
+
"chart_type": "column",
|
|
673
|
+
"left": 1.0,
|
|
674
|
+
"top": 2.0,
|
|
675
|
+
"width": 8.0,
|
|
676
|
+
"height": 4.5,
|
|
677
|
+
"categories": ["Q1", "Q2", "Q3", "Q4"],
|
|
678
|
+
"series_names": ["2023", "2024"],
|
|
679
|
+
"series_values": [
|
|
680
|
+
[100, 120, 140, 160],
|
|
681
|
+
[110, 130, 150, 170]
|
|
682
|
+
],
|
|
683
|
+
"has_legend": True,
|
|
684
|
+
"legend_position": "bottom",
|
|
685
|
+
"has_data_labels": True,
|
|
686
|
+
"title": "Quarterly Sales Performance",
|
|
687
|
+
"presentation_id": presentation_id
|
|
688
|
+
}
|
|
689
|
+
)
|
|
690
|
+
```
|
|
691
|
+
|
|
692
|
+
### Text Validation and Optimization with v2.0
|
|
693
|
+
|
|
694
|
+
```python
|
|
695
|
+
# Validate text fit and get optimization suggestions - USING CONSOLIDATED TOOL
|
|
696
|
+
result = use_mcp_tool(
|
|
697
|
+
server_name="ppt",
|
|
698
|
+
tool_name="manage_text",
|
|
699
|
+
arguments={
|
|
700
|
+
"slide_index": 0,
|
|
701
|
+
"operation": "validate",
|
|
702
|
+
"shape_index": 0,
|
|
703
|
+
"text": "This is a very long title that might not fit properly in the designated text box area",
|
|
704
|
+
"font_size": 24,
|
|
705
|
+
"validation_only": True
|
|
706
|
+
}
|
|
707
|
+
)
|
|
708
|
+
|
|
709
|
+
# Comprehensive slide validation with automatic fixes - SAME TOOL, AUTO-FIX ENABLED
|
|
710
|
+
result = use_mcp_tool(
|
|
711
|
+
server_name="ppt",
|
|
712
|
+
tool_name="manage_text",
|
|
713
|
+
arguments={
|
|
714
|
+
"slide_index": 0,
|
|
715
|
+
"operation": "validate",
|
|
716
|
+
"shape_index": 0,
|
|
717
|
+
"validation_only": False, # Auto-fix enabled
|
|
718
|
+
"min_font_size": 10,
|
|
719
|
+
"max_font_size": 48
|
|
720
|
+
}
|
|
721
|
+
)
|
|
722
|
+
```
|
|
723
|
+
|
|
724
|
+
### Reading Slide Content with New Text Extraction Tools (v2.1)
|
|
725
|
+
|
|
726
|
+
```python
|
|
727
|
+
# Extract text content from a specific slide - NEW TOOL
|
|
728
|
+
result = use_mcp_tool(
|
|
729
|
+
server_name="ppt",
|
|
730
|
+
tool_name="extract_slide_text",
|
|
731
|
+
arguments={
|
|
732
|
+
"slide_index": 0,
|
|
733
|
+
"presentation_id": presentation_id
|
|
734
|
+
}
|
|
735
|
+
)
|
|
736
|
+
|
|
737
|
+
# The result includes:
|
|
738
|
+
{
|
|
739
|
+
"success": True,
|
|
740
|
+
"slide_index": 0,
|
|
741
|
+
"text_content": {
|
|
742
|
+
"slide_title": "Quarterly Business Review",
|
|
743
|
+
"placeholders": [
|
|
744
|
+
{
|
|
745
|
+
"shape_index": 1,
|
|
746
|
+
"shape_name": "Subtitle Placeholder 2",
|
|
747
|
+
"text": "Q4 2024 Results",
|
|
748
|
+
"placeholder_type": "SUBTITLE",
|
|
749
|
+
"placeholder_idx": 1
|
|
750
|
+
}
|
|
751
|
+
],
|
|
752
|
+
"text_shapes": [
|
|
753
|
+
{
|
|
754
|
+
"shape_index": 3,
|
|
755
|
+
"shape_name": "TextBox 4",
|
|
756
|
+
"text": "Revenue increased by 15%"
|
|
757
|
+
}
|
|
758
|
+
],
|
|
759
|
+
"table_text": [],
|
|
760
|
+
"all_text_combined": "Quarterly Business Review\nQ4 2024 Results\nRevenue increased by 15%"
|
|
761
|
+
},
|
|
762
|
+
"total_text_shapes": 2,
|
|
763
|
+
"has_title": True,
|
|
764
|
+
"has_tables": False
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
# Extract text from all slides in the presentation - NEW TOOL
|
|
768
|
+
result = use_mcp_tool(
|
|
769
|
+
server_name="ppt",
|
|
770
|
+
tool_name="extract_presentation_text",
|
|
771
|
+
arguments={
|
|
772
|
+
"presentation_id": presentation_id,
|
|
773
|
+
"include_slide_info": True
|
|
774
|
+
}
|
|
775
|
+
)
|
|
776
|
+
|
|
777
|
+
# The result includes comprehensive text extraction:
|
|
778
|
+
{
|
|
779
|
+
"success": True,
|
|
780
|
+
"presentation_id": "pres_123",
|
|
781
|
+
"total_slides": 5,
|
|
782
|
+
"slides_with_text": 4,
|
|
783
|
+
"total_text_shapes": 12,
|
|
784
|
+
"slides_with_titles": 3,
|
|
785
|
+
"slides_with_tables": 1,
|
|
786
|
+
"slides_text": [...], # Detailed per-slide text content
|
|
787
|
+
"all_presentation_text_combined": "=== SLIDE 1 ===\nTitle Here\nContent here..."
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
# Extract text without additional slide metadata for cleaner output
|
|
791
|
+
result = use_mcp_tool(
|
|
792
|
+
server_name="ppt",
|
|
793
|
+
tool_name="extract_presentation_text",
|
|
794
|
+
arguments={
|
|
795
|
+
"presentation_id": presentation_id,
|
|
796
|
+
"include_slide_info": False
|
|
797
|
+
}
|
|
798
|
+
)
|
|
799
|
+
```
|
|
800
|
+
|
|
801
|
+
## Template Support
|
|
802
|
+
|
|
803
|
+
### Working with Templates
|
|
804
|
+
|
|
805
|
+
The PowerPoint MCP Server provides comprehensive template support for creating presentations from existing template files. This feature enables:
|
|
806
|
+
|
|
807
|
+
- **Corporate branding** with predefined themes, layouts, and styles
|
|
808
|
+
- **Consistent presentations** across teams and projects
|
|
809
|
+
- **Custom slide masters** and specialized layouts
|
|
810
|
+
- **Pre-configured properties** and document settings
|
|
811
|
+
- **Flexible template discovery** with configurable search paths
|
|
812
|
+
|
|
813
|
+
### Template File Requirements
|
|
814
|
+
|
|
815
|
+
- **Supported formats**: `.pptx` and `.potx` files
|
|
816
|
+
- **Existing content**: Templates can contain existing slides (preserved during creation)
|
|
817
|
+
- **Layout availability**: All custom layouts and slide masters are accessible
|
|
818
|
+
- **Search locations**: Configurable via `PPT_TEMPLATE_PATH` environment variable
|
|
819
|
+
- **Default search paths**: Current directory, `./templates`, `./assets`, `./resources`
|
|
820
|
+
|
|
821
|
+
### Template Configuration
|
|
822
|
+
|
|
823
|
+
Set the `PPT_TEMPLATE_PATH` environment variable to specify custom template directories:
|
|
824
|
+
|
|
825
|
+
```bash
|
|
826
|
+
# Unix/Linux/macOS
|
|
827
|
+
export PPT_TEMPLATE_PATH="/path/to/templates:/another/path"
|
|
828
|
+
|
|
829
|
+
# Windows
|
|
830
|
+
set PPT_TEMPLATE_PATH="C:\templates;C:\company_templates"
|
|
831
|
+
```
|
|
832
|
+
|
|
833
|
+
### Template Workflow
|
|
834
|
+
|
|
835
|
+
1. **Inspect Template**: Use `get_template_info` to analyze available layouts and properties
|
|
836
|
+
2. **Create from Template**: Use `create_presentation_from_template` with automatic theme preservation
|
|
837
|
+
3. **Use Template Layouts**: Reference layout indices from template analysis when adding slides
|
|
838
|
+
4. **Maintain Branding**: Template themes, fonts, and colors are automatically applied to new content
|
|
839
|
+
|
|
840
|
+
### Professional Color Schemes
|
|
841
|
+
|
|
842
|
+
The server includes 4 built-in professional color schemes:
|
|
843
|
+
- **Modern Blue**: Microsoft-inspired blue theme with complementary colors
|
|
844
|
+
- **Corporate Gray**: Professional grayscale theme with blue accents
|
|
845
|
+
- **Elegant Green**: Forest green theme with cream and light green accents
|
|
846
|
+
- **Warm Red**: Deep red theme with orange and yellow accents
|
|
847
|
+
|
|
848
|
+
Each scheme includes primary, secondary, accent, light, and text colors optimized for business presentations.
|
|
849
|
+
|
|
850
|
+
## 🎨 Built-in Slide Templates (New in v2.0)
|
|
851
|
+
|
|
852
|
+
The PowerPoint MCP Server now includes **25 professional slide templates** with advanced dynamic features. All templates support:
|
|
853
|
+
|
|
854
|
+
### **Dynamic Features**
|
|
855
|
+
- **Automatic text sizing** based on content length and container dimensions
|
|
856
|
+
- **Intelligent text wrapping** to fit within specified areas
|
|
857
|
+
- **Visual effects** including shadows, glows, and outlines
|
|
858
|
+
- **Gradient backgrounds** with multi-layer compositions
|
|
859
|
+
- **Professional animations** ready for presentation delivery
|
|
860
|
+
- **Interactive hover effects** for enhanced user experience
|
|
861
|
+
- **Smart content overflow handling** with automatic adjustments
|
|
862
|
+
|
|
863
|
+
### **Available Template Categories**
|
|
864
|
+
|
|
865
|
+
#### **Title & Introduction Slides**
|
|
866
|
+
- `title_slide` - Dynamic title slide with gradient background and text effects
|
|
867
|
+
- `chapter_intro` - Section divider with chapter numbering and styling
|
|
868
|
+
- `thank_you_slide` - Closing slide with contact information and effects
|
|
869
|
+
|
|
870
|
+
#### **Content Layout Slides**
|
|
871
|
+
- `text_with_image` - Text content with stylized image and interactive elements
|
|
872
|
+
- `two_column_text` - Two equal columns of text with dynamic sizing
|
|
873
|
+
- `two_column_text_images` - Two columns with text and corresponding images
|
|
874
|
+
- `three_column_layout` - Three equal columns with text and images
|
|
875
|
+
- `full_image_slide` - Large background image with text overlay
|
|
876
|
+
|
|
877
|
+
#### **Business & Analytics Slides**
|
|
878
|
+
- `key_metrics_dashboard` - Interactive metrics dashboard with animated counters
|
|
879
|
+
- `before_after_comparison` - Dynamic comparison layout with visual dividers
|
|
880
|
+
- `chart_comparison` - Two charts side by side for performance comparison
|
|
881
|
+
- `data_table_slide` - Slide focused on tabular data with professional styling
|
|
882
|
+
- `timeline_slide` - Horizontal timeline with milestones and effects
|
|
883
|
+
|
|
884
|
+
#### **Process & Flow Slides**
|
|
885
|
+
- `process_flow` - Step-by-step process visualization with enhanced effects
|
|
886
|
+
- `agenda_slide` - Table of contents or agenda overview with styling
|
|
887
|
+
- `quote_testimonial` - Featured quote or customer testimonial with effects
|
|
888
|
+
|
|
889
|
+
#### **Team & Organization Slides**
|
|
890
|
+
- `team_introduction` - Team member showcase with photos and roles
|
|
891
|
+
|
|
892
|
+
### **Template Usage Examples**
|
|
893
|
+
|
|
894
|
+
```python
|
|
895
|
+
# Browse all available templates
|
|
896
|
+
templates = use_mcp_tool("ppt", "list_slide_templates", {})
|
|
897
|
+
|
|
898
|
+
# Key templates with their features:
|
|
899
|
+
{
|
|
900
|
+
"title_slide": {
|
|
901
|
+
"features": ["Dynamic text sizing", "Gradient backgrounds", "Text effects"],
|
|
902
|
+
"elements": ["title", "subtitle", "author", "decorative_accent"]
|
|
903
|
+
},
|
|
904
|
+
"key_metrics_dashboard": {
|
|
905
|
+
"features": ["Animated counters", "Gradient containers", "Trend visualization"],
|
|
906
|
+
"elements": ["3 metric containers", "trend chart", "insights callout"]
|
|
907
|
+
},
|
|
908
|
+
"before_after_comparison": {
|
|
909
|
+
"features": ["Split gradient background", "VS divider", "Improvement arrow"],
|
|
910
|
+
"elements": ["before/after headers", "comparison content", "improvement metrics"]
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
```
|
|
914
|
+
|
|
915
|
+
### **Color Scheme Integration**
|
|
916
|
+
All templates work seamlessly with the 4 professional color schemes:
|
|
917
|
+
- **modern_blue**: Microsoft-inspired theme with dynamic gradients
|
|
918
|
+
- **corporate_gray**: Professional grayscale with blue accents
|
|
919
|
+
- **elegant_green**: Forest green with cream and light accents
|
|
920
|
+
- **warm_red**: Deep red with orange and yellow highlights
|
|
921
|
+
|
|
922
|
+
### **Dynamic Content Adaptation**
|
|
923
|
+
Templates automatically adjust to content:
|
|
924
|
+
- **Font sizes** scale based on text length (8pt - 44pt range)
|
|
925
|
+
- **Line spacing** adjusts for readability (1.0x - 1.4x)
|
|
926
|
+
- **Text wrapping** intelligently breaks lines at optimal points
|
|
927
|
+
- **Container sizing** adapts to content overflow
|
|
928
|
+
- **Visual effects** scale appropriately with element sizes
|
|
929
|
+
|
|
930
|
+
## 📁 File Structure
|
|
931
|
+
|
|
932
|
+
```
|
|
933
|
+
Office-PowerPoint-MCP-Server/
|
|
934
|
+
├── ppt_mcp_server.py # Main consolidated server (v2.0)
|
|
935
|
+
├── slide_layout_templates.json # 25+ professional slide templates with dynamic features
|
|
936
|
+
├── tools/ # 11 specialized tool modules (32 tools total)
|
|
937
|
+
│ ├── __init__.py
|
|
938
|
+
│ ├── presentation_tools.py # Presentation management (7 tools)
|
|
939
|
+
│ ├── content_tools.py # Content & slides (6 tools)
|
|
940
|
+
│ ├── template_tools.py # Template operations (7 tools)
|
|
941
|
+
│ ├── structural_tools.py # Tables, shapes, charts (4 tools)
|
|
942
|
+
│ ├── professional_tools.py # Themes, effects, fonts (3 tools)
|
|
943
|
+
│ ├── hyperlink_tools.py # Hyperlink management (1 tool)
|
|
944
|
+
│ ├── chart_tools.py # Advanced chart operations (1 tool)
|
|
945
|
+
│ ├── connector_tools.py # Connector lines/arrows (1 tool)
|
|
946
|
+
│ ├── master_tools.py # Slide master management (1 tool)
|
|
947
|
+
│ └── transition_tools.py # Slide transitions (1 tool)
|
|
948
|
+
├── utils/ # 7 organized utility modules (68+ functions)
|
|
949
|
+
│ ├── __init__.py
|
|
950
|
+
│ ├── core_utils.py # Error handling & safe operations
|
|
951
|
+
│ ├── presentation_utils.py # Presentation management utilities
|
|
952
|
+
│ ├── content_utils.py # Content & slide operations
|
|
953
|
+
│ ├── design_utils.py # Themes, colors, effects & fonts
|
|
954
|
+
│ ├── template_utils.py # Template management & dynamic features
|
|
955
|
+
│ └── validation_utils.py # Text & layout validation
|
|
956
|
+
├── setup_mcp.py # Interactive setup script
|
|
957
|
+
├── pyproject.toml # Updated for v2.0
|
|
958
|
+
└── README.md # This documentation
|
|
959
|
+
```
|
|
960
|
+
|
|
961
|
+
## 🏗️ Architecture Benefits
|
|
962
|
+
|
|
963
|
+
### **Modular Design**
|
|
964
|
+
- **7 focused utility modules** with clear responsibilities
|
|
965
|
+
- **11 organized tool modules** for comprehensive coverage
|
|
966
|
+
- **68+ utility functions** organized by functionality
|
|
967
|
+
- **32 MCP tools** covering all PowerPoint manipulation needs
|
|
968
|
+
- **Clear separation of concerns** for easier development
|
|
969
|
+
|
|
970
|
+
### **Code Organization**
|
|
971
|
+
- **Logical grouping** of related functionality across modules
|
|
972
|
+
- **Better discoverability** with organized tool categories
|
|
973
|
+
- **Improved testability** with isolated modules
|
|
974
|
+
- **Future extensibility** through modular structure
|
|
975
|
+
|
|
976
|
+
### **Comprehensive Coverage**
|
|
977
|
+
- **Complete PowerPoint lifecycle** from creation to presentation
|
|
978
|
+
- **Advanced template system** with auto-generation capabilities
|
|
979
|
+
- **Professional design tools** with multiple effects and styling options
|
|
980
|
+
- **Specialized features** including hyperlinks, connectors, and slide masters
|
|
981
|
+
|
|
982
|
+
### **Developer Experience**
|
|
983
|
+
- **Clear responsibility boundaries** between modules
|
|
984
|
+
- **Easier debugging** with smaller, focused files
|
|
985
|
+
- **Simpler testing** with isolated functionality
|
|
986
|
+
- **Enhanced maintainability** through separation of concerns
|
|
987
|
+
|
|
988
|
+
## 🔄 What's New in Version 2.0
|
|
989
|
+
|
|
990
|
+
**Enhanced functionality with comprehensive tool coverage!** The updated server provides:
|
|
991
|
+
|
|
992
|
+
### **New Specialized Tools Added:**
|
|
993
|
+
- **`manage_hyperlinks`** - Complete hyperlink management for text elements
|
|
994
|
+
- **`update_chart_data`** - Advanced chart data replacement and updating
|
|
995
|
+
- **`add_connector`** - Connector lines and arrows between slide elements
|
|
996
|
+
- **`manage_slide_masters`** - Access to slide master properties and layouts
|
|
997
|
+
- **`manage_slide_transitions`** - Basic slide transition management
|
|
998
|
+
- **`auto_generate_presentation`** - AI-powered presentation generation
|
|
999
|
+
- **`optimize_slide_text`** - Text optimization for better readability
|
|
1000
|
+
|
|
1001
|
+
### **Enhanced Existing Tools:**
|
|
1002
|
+
- **`manage_text`** - Now supports text run formatting with `format_runs` operation
|
|
1003
|
+
- **`create_presentation_from_templates`** - Enhanced template sequence processing
|
|
1004
|
+
- **`apply_picture_effects`** - Expanded effect combinations and options
|
|
1005
|
+
|
|
1006
|
+
## 🔄 What's New in Version 2.1
|
|
1007
|
+
|
|
1008
|
+
**Text extraction capabilities added!** Now you can read content from existing presentations:
|
|
1009
|
+
|
|
1010
|
+
### **New Text Extraction Tools Added:**
|
|
1011
|
+
- **`extract_slide_text`** - Extract all text content from a specific slide including titles, placeholders, text shapes, and tables
|
|
1012
|
+
- **`extract_presentation_text`** - Extract text content from all slides in a presentation with comprehensive statistics and combined output
|
|
1013
|
+
|
|
1014
|
+
### **Key Features of Text Extraction:**
|
|
1015
|
+
- **Complete text coverage** - Extracts from titles, placeholders, text boxes, and table cells
|
|
1016
|
+
- **Structured output** - Organized by content type (titles, placeholders, shapes, tables)
|
|
1017
|
+
- **Presentation-wide analysis** - Statistics on text distribution across slides
|
|
1018
|
+
- **Flexible output options** - Individual slide content or combined presentation text
|
|
1019
|
+
- **Error handling** - Graceful handling of slides that cannot be processed
|
|
1020
|
+
|
|
1021
|
+
## License
|
|
1022
|
+
|
|
1023
|
+
MIT
|