此服务器通过模型上下文协议(MCP)允许AI助手生成专业的PowerPoint、Word、Excel和EML电子邮件草稿。
output/ – 用于保存本地策略下的文件custom_templates/ – 可选的自定义Office/电子邮件模板config/ – 配置(例如,email_templates.yaml,凭证)curl -L -o docker-compose.yml https://raw.githubusercontent.com/dvejsada/mcp-ms-office-docs/main/docker-compose.yml
(如果您已经克隆了此仓库,可以直接复制现有的docker-compose.yml。)
.env.example复制为.env.env:
LOG_LEVEL=INFO|DEBUGUPLOAD_STRATEGY=LOCAL|S3|GCS|AZUREdocker-compose up -d
http://localhost:8958/mcp该服务器公开了以下MCP工具:
create_powerpoint_presentation
4:3(默认)或16:9create_word_from_markdown
create_excel_from_markdown
=B[0],T1.SUM(B[0]:E[0]))create_email_draft
动态电子邮件工具(可选):
如果config/email_templates.yaml存在,则每个条目在启动时注册为独立的电子邮件草稿工具。详情如下。
简短说明:动态电子邮件模板是在config/email_templates.yaml中定义的可重用、参数化的HTML电子邮件布局。服务器在启动时将每个模板注册为单独的MCP工具,并自动添加标准字段(主题、收件人、抄送、密送、优先级、语言)。模板特定参数(如first_name或promo_code)作为工具参数暴露出来,以便AI助手可以调用一个强类型工具来生成一致且生产就绪的电子邮件,而无需编写完整的HTML正文。
输出:
output/并报告SIGNED_URL_EXPIRES_IN设置)您可以提供自定义模板用于PowerPoint、Word和电子邮件。
将文件放置在custom_templates/中。
PowerPoint:custom_pptx_template_4_3.pptx,custom_pptx_template_16_9.pptx
Word:custom_docx_template.docx
电子邮件包装器:custom_email_template.html - 基于default_templates/default_email_template.html创建您的模板
动态电子邮件模板(可选):
config/email_templates.yaml并仅通过文件名引用HTML文件(不带路径)。templates:
- name: welcome_email
description: 欢迎邮件,可选促销码
html_path: welcome_email.html # 文件必须存在于custom_templates/或default_templates/中
annotations:
title: 欢迎邮件
args:
- name: subject
type: string
required: true
- name: first_name
type: string
required: true
- name: promo_code
type: string
required: false
custom_templates/welcome_email.html中):<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>{{subject}}</title>
</head>
<body>
<h2>Welcome {{first_name}}!</h2>
<p>We’re excited to have you on board.</p>
{{{promo_code_block}}}
<p>Regards,<br/>Support Team</p>
</body>
</html>
{{variable}}进行转义文本;使用{{{variable}}}进行原始HTML