Skip to main content
Glama

MCP 服务器 — 会议记录

Enterprise S.A. | 内部使用与机密

基于 Azure Functions Python 构建的 MCP 服务器。公开 MCP 工具以管理会议记录的完整流程:捕获、验证、草稿生成、编辑、批准及最终转换为 Word。


可用的工具

Tool

描述

ActaWizard

管理会话创建、数据捕获、回答保存及后续问题。

ValidateActa

验证会议记录的必填字段是否完整。

GenerateDraft

使用捕获的数据生成 Markdown 格式的会议记录草稿。

UpdateDraft

允许在批准前修改草稿。

ApproveDraft

记录草稿的正式批准。

GenerateDocx

将已批准的草稿转换成 Word 文档(以 base64 形式返回)。

业务流程

ActaWizard → ValidateActa → GenerateDraft → 显示草稿 → UpdateDraft(0 次或多次) → ApproveDraft → GenerateDocx


Related MCP server: office-mcp-server

前提条件

  • Python 3.10+(推荐 3.12)

  • Azure Functions Core Tools v4

  • Azurite(存储模拟器 — 即使在本地也需要,MCP 扩展使用它进行 SSE 传输)

  • azure-functions>=1.24.0(旧版本不支持 mcp_tool_trigger)


1. 安装依赖

python3 -m venv .venv
. .venv/bin/activate       # en Windows: .venv\Scripts\activate
pip install --upgrade pip
pip install -r requirements.txt

2. 运行测试(无需启动服务器)

tests/test_tools.py 中的测试直接调用每个工具的逻辑,无需经过 Azure Functions 运行时或 Azurite。这是验证业务逻辑是否正常工作的最快方式:

pytest -v

应通过 5 个测试,涵盖:会话创建、完整流程直到生成 DOCX、缺失字段验证、以及已批准的草稿无法编辑。

3. 启动真实的 MCP 服务器

# En otra terminal, arrancar el emulador de storage:
azurite --silent --location .azurite --debug .azurite/debug.log
# o, en VS Code: Ctrl+Shift+P -> "Azurite: Start"

func start

MCP 服务器暴露的 Webhook 位于:

http://localhost:7071/runtime/webhooks/mcp

4. 端到端测试工具

两种方式:

a) MCP Inspector(推荐,使用实际协议):

npx @modelcontextprotocol/inspector

连接到 http://localhost:7071/runtime/webhooks/mcp/sse,列出工具并逐一调用,查看 JSON 响应。

b) Postman: 导入 tests/Actas_MCP_Postman.json,按顺序(01 到 07)运行请求。前两个请求会自动将 session_id 和 draft_id 保存为集合变量,供后续请求使用。


重要说明

  • local.settings.json 在 .gitignore 中。不要将凭据提交到仓库。

  • 状态(会话、草稿)保存在项目目录下的 .data/*.json 文件中。 这对于本地开发来说足够,但不适用于生产环境: 在 Azure Functions 中,本地文件系统既不持久也不在实例间共享。 在部署多个实例之前,将 tools/storage.py 替换为 Azure Table Storage、Cosmos DB 或 Blob Storage。

  • host.json 中 system.webhookAuthorizationLevel 设为 "Anonymous" 以便于本地测试。部署到 Azure 之前,应改为 "Function" 或 "System" 以要求 mcp_extension 键。

  • UpdateDraft 根据简单规则(替换/删除/添加)解释西班牙语指令;模糊的指令会追加到草稿末尾,而非精确应用。这是一个已知的限制,而非错误。


快速提示

  • ActaWizard 返回 sessionId、status、nextField 和 question。

  • ValidateActa 返回 complete 和 missingFields。

  • GenerateDraft 使用 draftId 和 draftMarkdown 创建草稿。

  • UpdateDraft 不能编辑已批准的草稿。

  • GenerateDocx 仅在草稿已批准时有效,并将文件以 fileBase64 形式返回(解码后获得 .docx 文件)。

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    An MCP server that automates extraction of structured financial data from investment memorandums and generates standardized PowerPoint presentations through a RESTful API.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server that converts videos, audio, and meeting recordings into structured transcripts and summaries with multi-backend ASR and automatic fallback.
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    MCP server providing governed access to board meeting data, with tools to query meetings, motions, and documents, automatically applying anonymity policies before returning answers.
    6
    -