- Home
- MCP servers
- PowerPoint and Excel
PowerPoint and Excel
- python
26
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"jenstangen1-pptx-xlsx-mcp": {
"command": "uv",
"args": [
"run",
"mcp_powerpoint_server_win32.py"
]
}
}
}You can run two MCP servers on Windows to control PowerPoint and Excel through AI assistance. These servers automate Office applications via COM using Python and pywin32, enabling you to create, modify, and analyze presentations and workbooks with natural language commands processed by your MCP client.
How to use
You run two local MCP servers and connect your MCP client to them. Start both servers from a workspace where you keep your scripts, then interact with PowerPoint and Excel through your client by issuing natural language requests. You can perform tasks like creating slides, adding text and charts, formatting elements, reading cell values, and updating workbooks. The servers operate on running instances of Office applications, so ensure Office is open or can be launched by the script.
How to install
Prerequisites: you need a Windows machine, Microsoft Office installed (PowerPoint and/or Excel), Python 3.7 or newer, and the pywin32 package.
# 1) Clone the project
git clone https://github.com/jenstangen1/pptx-xlsx-mcp.git
cd pptx-xlsx-mcp
# 2) Install Python dependencies (via the UC runner)
uv pip install pywin32
# 3) Run the pywin32 post-install script with administrator privileges
python C:\path\to\your\env\Scripts\pywin32_postinstall.py -install
To configure how your MCP client should launch the servers, use the following settings. This defines two stdio-based MCP servers that your client can start and connect to from the workspace path you specify.
{
"mcpServers": {
"powerpoint_mcp_win32": {
"command": "uv",
"args": [
"run",
"mcp_powerpoint_server_win32.py"
],
"cwd": "C:\\path\\to\\your\\workspace"
},
"excel_mcp_win32": {
"command": "uv",
"args": [
"run",
"mcp_excel_server_win32.py"
],
"cwd": "C:\\path\\to\\your\\workspace"
}
}
}
Additional setup notes
Note that you may need to adjust the workspace paths to match your installation location. The two servers rely on running instances of PowerPoint and Excel, so ensure Office is available and that COM automation can initialize properly. If you encounter COM-related errors, re-run the post-install script with administrator privileges.
Security and maintenance
Keep your Office applications updated and grant the MCP servers the necessary permissions to automate COM objects. Only run these servers in trusted environments and avoid exposing the local MCP endpoints to untrusted clients.
Troubleshooting tips
If a server fails to start, verify that Python and pywin32 were installed correctly, and that the post-install script completed without errors. Confirm that the specified working directory exists and that the script names match the actual files in your workspace.
Example workflows
Open a presentation, add slides, insert a chart, and apply styling through natural language prompts processed by your MCP client. For Excel, connect to a running workbook, read specific cell ranges, perform calculations, and write results back to cells.
Available tools
list_presentations
List all PowerPoint presentations in the workspace.
upload_presentation
Upload a new presentation to the workspace.
save_presentation
Save the current presentation.
add_slide
Add a new slide to the current presentation.
delete_slide
Delete a slide from the presentation.
get_slide_count
Return the total number of slides in the presentation.
analyze_slide
Analyze the content of a slide to provide insights.
set_background_color
Set the background color of a slide.
add_text
Add text to a slide.
add_shape
Add a shape to a slide.
edit_element
Edit an element's properties on a slide.
style_element
Apply styling to an element.
connect_shapes
Connect two shapes with a connector line.
find_element
Find elements on a slide based on criteria.
get_company_financials
Retrieve financial data for a company (currently dummy data).
create_financial_chart
Create a financial chart on a slide.
create_comparison_table
Create a comparison table for companies.
list_templates
List available templates.
apply_template
Apply a template to a presentation.
create_slide_from_template
Create a new slide from a template.
save_as_template
Save a slide as a template.
debug_element_mappings
Inspect element mappings for a slide to aid debugging.