office-mcp
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOffice MCP Server
Office MCP服务器
Overview
概述
A complete MCP (Model Context Protocol) server providing 39 tools for Office document operations. Implemented in TypeScript/Node.js with real functionality (not placeholders).
一款完整的MCP(Model Context Protocol)服务器,提供39种工具用于Office文档操作。基于TypeScript/Node.js实现,具备实际功能(非占位符)。
Tool Categories
工具分类
PDF Tools (10)
PDF工具(10种)
| Tool | Description |
|---|---|
| Extract text content, supports page selection |
| Extract table data from PDFs |
| Merge multiple PDFs into one |
| Split PDF by page ranges |
| Reduce PDF file size |
| Add text/image watermarks |
| Fill PDF form fields |
| Get PDF properties and metadata |
| OCR on scanned PDFs (multi-language) |
| OCR on image files (PNG, JPG, TIFF, etc.) |
| 工具 | 描述 |
|---|---|
| 提取文本内容,支持页面选择 |
| 从PDF中提取表格数据 |
| 将多个PDF合并为一个文件 |
| 按页面范围拆分PDF |
| 减小PDF文件体积 |
| 添加文字/图片水印 |
| 填充PDF表单字段 |
| 获取PDF属性及元数据 |
| 对扫描版PDF进行OCR识别(多语言支持) |
| 对图片文件进行OCR识别(支持PNG、JPG、TIFF等格式) |
Spreadsheet Tools (7)
电子表格工具(7种)
| Tool | Description |
|---|---|
| Read Excel files with sheet/range selection |
| Create multi-sheet Excel files |
| Statistical analysis (min/max/mean/median) |
| Apply Excel formulas to cells |
| Generate chart configurations |
| Create pivot tables with aggregation |
| Convert Excel to JSON |
| 工具 | 描述 |
|---|---|
| 读取Excel文件,支持工作表/范围选择 |
| 创建多工作表Excel文件 |
| 统计分析(最小值/最大值/平均值/中位数) |
| 对单元格应用Excel公式 |
| 生成图表配置 |
| 创建带聚合功能的数据透视表 |
| 将Excel转换为JSON格式 |
Document Tools (6)
文档工具(6种)
| Tool | Description |
|---|---|
| Extract text from Word documents |
| Create DOCX with headings, lists, tables |
| Fill templates with {{placeholders}} |
| Analyze headings, tables, word count |
| Insert tables into documents |
| Merge multiple Word documents |
| 工具 | 描述 |
|---|---|
| 从Word文档中提取文本 |
| 创建包含标题、列表、表格的DOCX文档 |
| 使用{{占位符}}填充模板 |
| 分析标题、表格、字数等文档结构信息 |
| 向文档中插入表格 |
| 合并多个Word文档 |
Conversion Tools (9)
格式转换工具(9种)
| Tool | Description |
|---|---|
| Convert Excel to CSV |
| Convert CSV to Excel |
| Convert JSON arrays to Excel |
| Convert Word to Markdown |
| Convert Markdown to Word |
| Convert PDF to Word (text extraction) |
| Convert Word to PDF (external tool required) |
| Convert HTML to PDF (external tool required) |
| Batch convert multiple files |
| 工具 | 描述 |
|---|---|
| 将Excel转换为CSV格式 |
| 将CSV转换为Excel格式 |
| 将JSON数组转换为Excel格式 |
| 将Word转换为Markdown格式 |
| 将Markdown转换为Word格式 |
| 将PDF转换为Word(基于文本提取) |
| 将Word转换为PDF(需依赖外部工具) |
| 将HTML转换为PDF(需依赖外部工具) |
| 批量转换多个文件 |
Presentation Tools (7)
演示文稿工具(7种)
| Tool | Description |
|---|---|
| Create PowerPoint with themes |
| Extract text and images from PPTX |
| Convert Markdown to slides |
| Add slides to existing presentations |
| Update slide content |
| Convert to reveal.js HTML |
| Get presentation structure |
| 工具 | 描述 |
|---|---|
| 创建带主题的PowerPoint演示文稿 |
| 从PPTX中提取文本和图片 |
| 将Markdown转换为幻灯片 |
| 向现有演示文稿中添加幻灯片 |
| 更新幻灯片内容 |
| 转换为reveal.js格式的HTML |
| 获取演示文稿结构大纲 |
Installation
安装步骤
1. Clone and Build
1. 克隆并构建
bash
cd mcp-servers/office-mcp
npm install
npm run buildbash
cd mcp-servers/office-mcp
npm install
npm run build2. Configure Claude Desktop
2. 配置Claude桌面端
Add to :
~/Library/Application Support/Claude/claude_desktop_config.jsonjson
{
"mcpServers": {
"office-mcp": {
"command": "/usr/local/bin/node",
"args": ["/path/to/claude-office-skills/mcp-servers/office-mcp/dist/index.js"]
}
}
}将以下内容添加到:
~/Library/Application Support/Claude/claude_desktop_config.jsonjson
{
"mcpServers": {
"office-mcp": {
"command": "/usr/local/bin/node",
"args": ["/path/to/claude-office-skills/mcp-servers/office-mcp/dist/index.js"]
}
}
}3. Restart Claude Desktop
3. 重启Claude桌面端
Example Prompts
示例提示词
- "Read the Excel file at ~/Documents/sales.xlsx"
- "Create a PowerPoint with 5 slides about AI trends"
- "Extract text from this PDF and convert to Markdown"
- "Merge these 3 Word documents into one"
- "Analyze the data in this spreadsheet"
- "读取~/Documents/sales.xlsx路径下的Excel文件"
- "创建一份包含5页幻灯片的AI趋势主题PowerPoint"
- "提取这份PDF的文本内容并转换为Markdown格式"
- "将这3份Word文档合并为一个文件"
- "分析这份电子表格中的数据"
Dependencies
依赖项
pdf-parse, pdf-lib - PDF operations
tesseract.js - OCR (pure JavaScript, no native binary needed)
xlsx - Excel operations
mammoth, docx - Word operations
docxtemplater, pizzip - Template filling
pptxgenjs, jszip - PowerPoint operations
turndown, marked - Markdown conversionpdf-parse, pdf-lib - PDF操作
tesseract.js - OCR(纯JavaScript实现,无需本地二进制文件)
xlsx - Excel操作
mammoth, docx - Word操作
docxtemplater, pizzip - 模板填充
pptxgenjs, jszip - PowerPoint操作
turndown, marked - Markdown转换Supported OCR Languages
支持的OCR语言
- - English
eng - - Simplified Chinese
chi_sim - - Traditional Chinese
chi_tra - - Japanese
jpn - - Korean
kor - - French
fra - - German
deu - - Spanish
spa
- - 英文
eng - - 简体中文
chi_sim - - 繁体中文
chi_tra - - 日语
jpn - - 韩语
kor - - 法语
fra - - 德语
deu - - 西班牙语
spa
Resources
资源链接
- MCP Server Code
- Implementation Plan
- Claude Office Skills Hub