office-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@office-mcp-serverCreate a business proposal with business theme and add a mermaid diagram"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@erliban/office-mcp-server
🔥 AI-Powered Professional Document Generation MCP Server
🔥 AI 驱动的专业文档生成 MCP 服务
8 Document Themes | 6 Mermaid Chart Styles | China National Standards Compliant
支持 8 种文档风格主题 | 6 种 Mermaid 图表配色 | 符合国家标准规范
English
✨ Core Features
Feature | Description |
🎯 Professional Documents | Compliant with GB/T 9704-2012 (Government), GB/T 8567-2006 (Software) standards |
🎨 Multiple Themes | 8 document themes + 6 Mermaid chart color schemes |
📊 Mermaid Diagrams | Auto-convert flowcharts, sequence diagrams to PNG images |
🤖 AI Native | Designed for Claude, ChatGPT via MCP protocol |
⚡ Ready to Use | One command to start |
📦 Quick Start
Installation
npm install -g @erliban/office-mcp-serverClaude Desktop Configuration
Add to claude_desktop_config.json:
{
"mcpServers": {
"office": {
"command": "npx",
"args": ["@erliban/office-mcp-server"]
}
}
}Config file location:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
🎨 Document Themes
Standard Themes
Theme | Name | Use Case | Standard |
| Government | Official documents | GB/T 9704-2012 |
| Academic | Thesis, research | Academic standards |
| Software | Requirements, design docs | GB/T 8567-2006 |
| Business | Reports, proposals | Enterprise standards |
Brand Themes
Theme | Name | Color | Industry |
| Alibaba | Orange | E-commerce |
| Tencent | Green | Social, Finance |
| ByteDance | Black | Tech, Media |
| Minimal | B&W | Universal |
📊 Mermaid Chart Themes
Theme | Name | Color | Best For |
| Professional | Blue #4a90d9 | Technical docs |
| Fresh | Green #52c41a | Flowcharts |
| Business | Gray #595959 | Formal reports |
| Tech | Purple #722ed1 | Product docs |
| Warm | Orange #fa8c16 | Proposals |
| Default | Mermaid default | General |
🛠️ Available Tools
Word Tools
Tool | Description |
| Create Word document |
| Add heading |
| Add paragraph |
| Add table |
| Add list |
| Add code block |
| Add Mermaid diagram |
| Save document |
Excel Tools
Tool | Description |
| Create workbook |
| Add worksheet |
| Write data |
| Write chart data |
| Save workbook |
Related MCP server: MCP-OPENAPI-DOCX
中文
✨ 核心优势
特性 | 描述 |
🎯 专业级文档 | 严格遵循 GB/T 9704-2012(公文)、GB/T 8567-2006(软件文档)等国家标准 |
🎨 多主题支持 | 8 种预设文档风格 + 6 种 Mermaid 图表配色,覆盖政府、学术、企业全场景 |
📊 Mermaid 图表 | AI 自动识别并将流程图、时序图等转换为专业 PNG 图片嵌入文档 |
🤖 AI 原生 | 专为 Claude、ChatGPT 等 AI 设计,通过 MCP 协议无缝集成 |
⚡ 开箱即用 | 无需复杂配置,一行命令即可启动服务 |
📦 快速开始
安装
npm install -g @erliban/office-mcp-serverClaude Desktop 配置
将以下配置添加到 claude_desktop_config.json:
{
"mcpServers": {
"office": {
"command": "npx",
"args": ["@erliban/office-mcp-server"]
}
}
}配置文件位置:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
🎯 推荐 Prompt
将以下内容添加到 Claude 的系统提示或项目 CLAUDE.md 中:
## Office 文档生成规范
使用 @erliban/office-mcp-server 生成专业文档时遵循以下规则:
### 文档主题选择
- **党政公文** → theme: "government" (GB/T 9704-2012 标准)
- **学术论文/研究报告** → theme: "academic"
- **软件需求/设计文档** → theme: "software" (GB/T 8567-2006 标准)
- **商业计划书/工作汇报** → theme: "business"
- **电商/零售行业** → theme: "alibaba"
- **社交/金融行业** → theme: "tencent"
- **科技/媒体行业** → theme: "bytedance"
- **通用正式文档** → theme: "minimal"
### Mermaid 图表转换
当文档中包含架构图、流程图时:
1. 使用 word_add_diagram 工具将 Mermaid 语法转为图片
2. 根据文档类型选择合适的图表主题:
- 技术文档 → diagramTheme: "professional"
- 流程图 → diagramTheme: "fresh"
- 正式报告 → diagramTheme: "business"
- 产品文档 → diagramTheme: "tech"
- 产品方案 → diagramTheme: "warm"
### 生成流程
1. word_create → 创建文档(指定主题)
2. word_add_heading → 添加标题层级
3. word_add_paragraph → 添加正文内容
4. word_add_table → 添加数据表格
5. word_add_diagram → 添加 Mermaid 图表
6. word_add_list → 添加列表
7. word_save → 保存文档🎨 文档主题一览
标准规范主题
主题 | 名称 | 适用场景 | 参考标准 |
| 党政公文 | 政府机关、国企公文 | GB/T 9704-2012 |
| 学术论文 | 毕业论文、研究报告 | 学术论文规范 |
| 软件文档 | 需求规格、设计文档 | GB/T 8567-2006 |
| 商务报告 | 商业计划书、工作汇报 | 企业文档规范 |
企业品牌主题
主题 | 名称 | 主色调 | 适用行业 |
| 阿里风格 | 橙色系 | 电商、零售 |
| 腾讯风格 | 绿色系 | 社交、金融 |
| 字节风格 | 黑色系 | 科技、媒体 |
| 简约黑白 | 黑白 | 通用正式场合 |
📊 Mermaid 图表主题
AI 可自动识别文档中的 Mermaid 语法并转换为专业图片:
主题 | 名称 | 主色调 | 推荐场景 |
| 专业蓝 | 蓝色 #4a90d9 | 技术文档、API 文档 |
| 清新绿 | 绿色 #52c41a | 流程图、状态图 |
| 商务灰 | 灰色 #595959 | 正式报告、提案 |
| 科技紫 | 紫色 #722ed1 | 产品文档、架构图 |
| 暖橙色 | 橙色 #fa8c16 | 产品方案、营销文档 |
| 默认 | Mermaid 默认 | 通用场景 |
支持的 Mermaid 图表类型:
flowchart- 流程图sequenceDiagram- 时序图stateDiagram- 状态图classDiagram- 类图erDiagram- ER 图gantt- 甘特图pie- 饼图
🛠️ 可用工具
Word 文档工具
工具名 | 描述 | 关键参数 |
| 创建 Word 文档 |
|
| 添加标题 |
|
| 添加段落 |
|
| 添加表格 |
|
| 添加列表 |
|
| 添加代码块 |
|
| 添加 Mermaid 图表 |
|
| 保存文档 |
|
Excel 表格工具
工具名 | 描述 | 关键参数 |
| 创建工作簿 |
|
| 添加工作表 |
|
| 写入数据 |
|
| 写入图表数据 |
|
| 添加公式 |
|
| 保存工作簿 |
|
💡 使用示例
示例 1:生成软件需求文档
帮我生成一份用户管理模块的需求规格说明书,使用软件文档主题。包含:
1. 功能概述
2. 用户角色和权限表格
3. 用例流程图(使用 Mermaid)
4. 接口定义示例 2:生成产品分析报告
帮我写一份 AI 智能音箱的产品方案分析,使用字节风格。需要包含:
- 产品架构图
- 技术选型对比表
- 成本估算🔧 Development | 开发
# Clone | 克隆
git clone https://github.com/jiahuidegit/office-mcp-server.git
cd office-mcp-server
# Install | 安装依赖
npm install
# Dev mode | 开发模式
npm run dev
# Build | 构建
npm run build
# Test | 测试
npm test📄 License
MIT © Erliban
Available Tools
16 toolsexcel_add_chartA
写入图表数据到指定位置(exceljs 不支持直接创建图表对象,数据写入后可在 Excel 中手动创建图表)
Inputs: series (required), chartType (required), sheetName (required), categories (required), +3 more.
excel_add_formulaCIdempotent
添加公式
Inputs: cell (required), formula (required), sheetName (required), workbookId (required).
excel_add_sheetC
添加工作表
Inputs: sheetName (required), workbookId (required), tabColor.
excel_createC
创建 Excel 工作簿
Inputs: title (required), outputPath (required), theme, template.
excel_merge_cellsCIdempotent
合并单元格
Inputs: range (required), sheetName (required), workbookId (required).
excel_saveBIdempotent
保存工作簿
Inputs: workbookId (required).
excel_set_column_widthCIdempotent
设置列宽
Inputs: columns (required), sheetName (required), workbookId (required).
excel_write_dataC
写入表格数据
Inputs: rows (required), headers (required), sheetName (required), workbookId (required), +4 more.
word_add_codeC
添加代码块
Inputs: code (required), docId (required), language.
word_add_diagramA
添加 Mermaid 流程图/架构图(自动转换为图片插入)
Inputs: docId (required), mermaid (required), theme, width, +1 more.
word_add_headingC
添加标题(支持1-6级)
Inputs: text (required), docId (required), level (required), numbering.
word_add_listB
添加有序/无序列表
Inputs: docId (required), items (required), ordered.
word_add_paragraphC
添加正文段落
Inputs: text (required), docId (required), bold, style, +1 more.
word_add_tableC
添加表格
Inputs: rows (required), docId (required), headers (required), style.
word_createB
创建一个新的 Word 文档
Inputs: title (required), outputPath (required), theme, author, +1 more.
word_saveCIdempotent
保存文档
Inputs: docId (required), addFooter, addHeader, addPageNumbers.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
TDQS
Scored across 16 tools
Word and Excel tools are clearly separated by prefixes, and each add_* operation targets a distinct content type. The only minor ambiguity is between excel_add_chart and excel_write_data, since both involve writing data, but descriptions clarify the purpose.
All tools follow a consistent verb_noun pattern with resource prefixes (word_, excel_), using lowercase snake_case throughout. The verbs are descriptive and predictable across both document types.
16 tools is slightly above the typical 3-15 range, but each tool serves a distinct purpose for Word and Excel document generation. The count feels reasonable for covering two office formats without being bloated.
The tool set covers the full lifecycle of creating and saving Word and Excel documents, with comprehensive content-adding operations. Minor gaps include lack of editing existing files, cell styling, and true chart creation, but these are outside the core generation scope.
Maintenance
Related MCP Connectors
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Use your own Word templates to convert Markdown → DOCX/PDF/HTML from any MCP-compatible AI.
Automate enterprise-grade documents from templates, merge and 100+ conversions: PDF, Office, HTML.
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAI-powered Office automation server that enables creating, editing, and processing Word, Excel, and PowerPoint documents through natural language instructions using Python-based libraries.1MIT
- AlicenseNot gradedqualityDmaintenanceEnterprise-grade document editing and management server that enables AI-powered operations on Microsoft Word DOCX files, including creating, editing, formatting, and exporting documents through both MCP protocol and RESTful API.3MIT
- AlicenseAqualityDmaintenanceA multi-format MCP server that enables reading and generating Office, PDF, text, EPUB, and presentation documents. It provides unified tools for document processing and creation through AI assistants.411MIT
- FlicenseBqualityDmaintenanceMCP server for Office document automation, enabling AI assistants to create, read, and clone Word/Excel/PPT templates while preserving formatting.41-