Office Mcp Skill
Overview
This skill wraps Office document operations as MCP tools, allowing Claude to create, edit, and manipulate Word, Excel, and PowerPoint files with standardized interfaces.
How to Use
- Describe what you want to accomplish
- Provide any required input data or files
- I'll execute the appropriate operations
Example prompts:
- "Create Word documents with AI-generated content"
- "Build Excel spreadsheets with formulas"
- "Generate PowerPoint presentations"
- "Batch edit Office documents"
Domain Knowledge
Office MCP Tools
| Tool |
Input |
Output |
create_docx |
Title, sections, styles |
.docx file |
edit_docx |
Path, changes |
Updated .docx |
create_xlsx |
Data, formulas |
.xlsx file |
create_pptx |
Slides, layout |
.pptx file |
Integration with Claude Skills
# Example: Combining Skills + MCP
User: "Create a sales report from this data"
1. Data Analysis Skill → Analyze data
2. office-mcp/create_docx → Generate Word report
3. office-mcp/create_xlsx → Generate Excel summary
4. office-mcp/create_pptx → Generate PowerPoint deck
MCP Server Implementation
from mcp import Server
from docx import Document
from openpyxl import Workbook
server = Server("office-mcp")
@server.tool("create_docx")
async def create_docx(title: str, content: str, output_path: str):
doc = Document()
doc.add_heading(title, 0)
doc.add_paragraph(content)
doc.save(output_path)
return {"status": "success", "path": output_path}
@server.tool("create_xlsx")
async def create_xlsx(data: list, output_path: str):
wb = Workbook()
ws = wb.active
for row in data:
ws.append(row)
wb.save(output_path)
return {"status": "success", "path": output_path}
Best Practices
- Validate inputs before document operations
- Use temp files for large documents
- Return structured responses with file paths
- Handle errors gracefully with meaningful messages
Installation
# Install required dependencies
pip install python-docx openpyxl python-pptx reportlab jinja2
Resources
1---
2name: office-mcp
3description: MCP server for Word, Excel, PowerPoint operations via AI
4author: claude-office-skills
5version: "1.0"
6tags: ['mcp', 'office', 'word', 'excel', 'powerpoint']
7models: [claude-sonnet-4, claude-opus-4]
8tools: [computer, code_execution, file_operations]
9library:
10 name: Office MCP
11 url: https://github.com/anthropics/skills
12 stars: N/A
13metadata:
14 source: https://skillmd.com/skills/modbender/office-mcp
15---
16
17# Office Mcp Skill
18
19## Overview
20
21This skill wraps Office document operations as MCP tools, allowing Claude to create, edit, and manipulate Word, Excel, and PowerPoint files with standardized interfaces.
22
23## How to Use
24
251. Describe what you want to accomplish
262. Provide any required input data or files
273. I'll execute the appropriate operations
28
29**Example prompts:**
30- "Create Word documents with AI-generated content"
31- "Build Excel spreadsheets with formulas"
32- "Generate PowerPoint presentations"
33- "Batch edit Office documents"
34
35## Domain Knowledge
36
37
38### Office MCP Tools
39
40| Tool | Input | Output |
41|------|-------|--------|
42| `create_docx` | Title, sections, styles | .docx file |
43| `edit_docx` | Path, changes | Updated .docx |
44| `create_xlsx` | Data, formulas | .xlsx file |
45| `create_pptx` | Slides, layout | .pptx file |
46
47### Integration with Claude Skills
48
49```markdown
50# Example: Combining Skills + MCP
51
52User: "Create a sales report from this data"
53
541. Data Analysis Skill → Analyze data
552. office-mcp/create_docx → Generate Word report
563. office-mcp/create_xlsx → Generate Excel summary
574. office-mcp/create_pptx → Generate PowerPoint deck
58```
59
60### MCP Server Implementation
61
62```python
63from mcp import Server
64from docx import Document
65from openpyxl import Workbook
66
67server = Server("office-mcp")
68
69@server.tool("create_docx")
70async def create_docx(title: str, content: str, output_path: str):
71 doc = Document()
72 doc.add_heading(title, 0)
73 doc.add_paragraph(content)
74 doc.save(output_path)
75 return {"status": "success", "path": output_path}
76
77@server.tool("create_xlsx")
78async def create_xlsx(data: list, output_path: str):
79 wb = Workbook()
80 ws = wb.active
81 for row in data:
82 ws.append(row)
83 wb.save(output_path)
84 return {"status": "success", "path": output_path}
85```
86
87
88## Best Practices
89
901. **Validate inputs before document operations**
912. **Use temp files for large documents**
923. **Return structured responses with file paths**
934. **Handle errors gracefully with meaningful messages**
94
95## Installation
96
97```bash
98# Install required dependencies
99pip install python-docx openpyxl python-pptx reportlab jinja2
100```
101
102## Resources
103
104- [Office MCP Repository](https://github.com/anthropics/skills)
105- [Claude Office Skills Hub](https://github.com/claude-office-skills/skills)