Skip to main content
Glama

腾讯文档原生收集表 MCP

跨平台测试 License: MIT

让 WorkBuddy 等 MCP 客户端直接读取、编辑和发布腾讯文档原生收集表,不依赖浏览器点击自动化。

支持问答题、单选题、多选题和下拉选择。写入后会回读草稿核对,发布后会使用不带登录 Cookie 的请求检查公开版本。

这是社区项目,不是腾讯官方产品。题目保存和表单设置使用腾讯文档网页当前采用的未公开接口;腾讯改版后可能失效。

验证情况

环境或能力

状态

macOS + Chrome 登录、写入、发布

已实际验证

不带 Cookie 读取公开表单

已实际验证

Windows 安装、导入、MCP 工具协议

由 GitHub Actions 验证

Windows 读取腾讯文档真实登录态

尚未在 Windows 真机验证

访客免登录提交

不保证;腾讯文档权限策略可能要求登录

Related MCP server: Google Forms MCP

安装

需要 Python 3.10 或更高版本,并先在浏览器中登录 腾讯文档

macOS / Linux

git clone https://github.com/kakadamowanglaile/tencent-docs-form-mcp.git
cd tencent-docs-form-mcp
chmod +x install.sh run-mcp.sh
./install.sh

Windows

在 PowerShell 中执行:

git clone https://github.com/kakadamowanglaile/tencent-docs-form-mcp.git
cd tencent-docs-form-mcp
powershell -ExecutionPolicy Bypass -File .\install-windows.ps1

Windows 建议使用 Firefox 登录腾讯文档。新版 Chrome/Edge 的 Cookie 可能受 Windows 加密策略限制,第三方进程无法解密。

检查登录态

把链接换成你自己创建的腾讯文档原生收集表。

macOS:

.venv/bin/python auth_check.py \
  --form-url "https://docs.qq.com/form/page/你的表单TOKEN" \
  --browser chrome

Windows:

.\.venv\Scripts\python.exe .\auth_check.py `
  --form-url "https://docs.qq.com/form/page/你的表单TOKEN" `
  --browser firefox

该命令只显示登录和编辑权限状态,不输出 Cookie。

添加到 WorkBuddy

打开 WorkBuddy 的“设置 → MCP → 添加 MCP Server”,新增一个 stdio MCP。不要把整份示例文件覆盖到已有配置中,只添加 tencent-docs-form 这一项。

macOS 示例:

{
  "mcpServers": {
    "tencent-docs-form": {
      "command": "/你的路径/tencent-docs-form-mcp/.venv/bin/python",
      "args": [
        "/你的路径/tencent-docs-form-mcp/server.py"
      ],
      "env": {
        "TENCENT_DOCS_USE_BROWSER_COOKIES": "1",
        "TENCENT_DOCS_BROWSER": "chrome"
      }
    }
  }
}

Windows 示例:

{
  "mcpServers": {
    "tencent-docs-form": {
      "command": "C:\\你的路径\\tencent-docs-form-mcp\\.venv\\Scripts\\python.exe",
      "args": [
        "C:\\你的路径\\tencent-docs-form-mcp\\server.py"
      ],
      "env": {
        "TENCENT_DOCS_USE_BROWSER_COOKIES": "1",
        "TENCENT_DOCS_BROWSER": "firefox"
      }
    }
  }
}

可直接复制的配置模板位于 examples 目录。保存配置并重启 WorkBuddy 后,可以这样说:

检查这个腾讯文档收集表,然后把题目改成姓名、手机号、报名项目三个问题,确认后发布。表单链接是……

MCP 工具

  • tencent_docs_inspect_form:读取题目、发布状态和当前账号权限,不修改内容。

  • tencent_docs_replace_form_questions:完整替换题目但不发布。

  • tencent_docs_publish_form:发布现有草稿,并检查公开版本。

  • tencent_docs_build_and_publish_form:替换题目、设置匿名选项、发布并检查公开版本。

写入工具会完整替换现有题目。使用前建议先复制一份表单进行测试。

登录方式

MCP 默认不会扫描浏览器数据。只有配置以下环境变量后才会读取 docs.qq.com 的 Cookie:

TENCENT_DOCS_USE_BROWSER_COOKIES=1
TENCENT_DOCS_BROWSER=chrome

TENCENT_DOCS_BROWSER 支持 bravechromechromiumedgefirefoxvivaldi

也支持通过进程环境变量 TENCENT_DOCS_COOKIE 提供 Cookie header,但不要把 Cookie 写进仓库、配置示例或聊天消息。

作为 Skill 使用

SKILL.md 提供了 Agent 的调用规则。MCP 负责真正连接腾讯文档;Skill 只告诉 AI 应该何时调用哪个工具、如何检查结果。因此只复制 Skill、没有启动 MCP,不能编辑腾讯文档。

开发与测试

python -m pip install -r requirements.txt
python -m unittest discover -s tests -v

GitHub Actions 会在 Ubuntu、macOS、Windows,以及 Python 3.10 和 3.13 上执行测试。跨平台测试不包含真实腾讯账号,Windows 的真实浏览器登录仍需要用户本机检查。

安全说明

  • Cookie 只保留在 MCP 进程内存中,不会写入项目文件或工具返回值。

  • 仅表单创建者或管理员可以写入和发布。

  • 项目不会绕过腾讯文档登录、访问权限或提交限制。

  • 安全问题请参阅 SECURITY.md

许可证

MIT

Available Tools

4 tools
tencent_docs_build_and_publish_form生成并发布腾讯文档收集表A
Destructive

完整替换题目、保存匿名设置、发布,并以未登录请求验证公开版本。

适用于“建好后直接给我可预览链接”的完整流程。它会替换当前表单的所有题目。

ParametersJSON Schema
NameRequiredDescriptionDefault
specYes
form_urlYes要完整替换并发布的腾讯文档原生收集表链接。
anonymousNo是否隐藏填写者身份;这不等同于免登录填写。
response_formatNo返回 markdown 或 json。markdown

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructiveHint=true, idempotentHint=false, and openWorldHint=true, so the bar is lower, yet the description adds real context: it replaces ALL current questions, and it performs an unauthenticated request to verify the public version. The destructive scope is disclosed in prose, which is valuable beyond the boolean hint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences, front-loaded with the operation sequence and then the intended scenario. Nothing is wasted, although the second sentence's quotation of a user phrase is slightly loose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained. For a destructive multi-step tool the description adequately covers the operation sequence and the replace-all scope, leaving only minor gaps around per-step failure behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 75%, so the schema already documents form_url, anonymous, and response_format, including the anonymous-vs-login nuance. The description only echoes '保存匿名设置' and adds no format, syntax, or constraint detail beyond the schema, making the 3 baseline appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific composite verb set (replace questions, save anonymous setting, publish, verify public version) against a concrete resource (Tencent Docs collection form). It distinguishes itself as the 'complete workflow' variant, implying it differs from the narrower siblings, though it never names them explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'适用于"建好后直接给我可预览链接"的完整流程' clearly states the usage context that selects this tool over the step-by-step siblings. It stops short of explicit exclusions, e.g. telling the agent to use replace_form_questions or publish_form when only one step is wanted.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tencent_docs_inspect_form检查腾讯文档收集表B
Read-only

读取收集表标题、发布状态、题型和当前账号权限;不修改任何内容。

ParametersJSON Schema
NameRequiredDescriptionDefault
form_urlYes腾讯文档原生收集表公开链接。
response_formatNo返回 markdown 或 json。markdown

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, and the closing clause '不修改任何内容' largely restates that. The description adds the functional scope of the read, but omits openWorldHint implications (external link fetching), auth/permission requirements, and rate-limit behavior, so it adds only modest value beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single compact sentence with the read scope front-loaded and no filler. The trailing '不修改任何内容' clause is close to redundant with the readOnlyHint annotation, which slightly dilutes the value of the space it occupies.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values need not be explained, and the description covers the fields surfaced plus the no-modification guarantee. It falls short only on use context (when to inspect rather than publish) and external-fetch/auth caveats implied by openWorldHint.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%; both form_url (public link) and the response_format enum are fully documented in the schema, and the description adds no syntax, format, or linking detail beyond it. Baseline 3 is correct when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb (读取) and resource (收集表) and enumerates exactly what is returned: 标题、发布状态、题型、当前账号权限. An agent can distinguish this read-only inspector from the mutating siblings (publish/build/replace) without opening a schema, though no sibling is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use guidance, no named alternative, and no prerequisites or ordering advice (e.g. 'use before publish_form'). Usage is only faintly implied by the statement that nothing is modified.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tencent_docs_publish_form发布腾讯文档收集表A
Idempotent

立即发布当前草稿,然后在不带登录 Cookie 的情况下回读公开版本。

ParametersJSON Schema
NameRequiredDescriptionDefault
form_urlYes要立即发布的腾讯文档原生收集表链接。
response_formatNo返回 markdown 或 json。markdown

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=false, idempotentHint=true, destructiveHint=false, openWorldHint=true, already covering the safety and idempotency profile. The description adds the useful detail that it verifies the public version via a cookie-less read-back, which enriches the behavior beyond the annotations, but does not cover other behavioral aspects like preconditions or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single compact sentence front-loads the primary action (立即发布当前草稿) followed by the verification step. It is appropriately sized and wastes little, though it could be marginally clearer on the publishing target.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple two-parameter schema, one of which is required, and annotations covering the safety profile, the description is sufficient for an agent to invoke the tool. No output schema is provided, but the description notes the read-back behavior, which partly compensates. Minor gaps remain in usage conditions relative to siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%; both form_url and response_format are fully described in the schema. The description adds no parameter-specific detail beyond what the schema provides, so a baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (发布/publish) and resource (当前草稿/the current draft form), and adds a behavior: re-reading the public version without auth cookies. The distinction from sibling tencent_docs_build_and_publish_form is implied (this publishes an existing draft) but not explicit, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase '当前草稿' (current draft) implies the tool applies to an already-created draft, which is circumstantial usage guidance. However, there is no explicit when-to-use vs. when-to-use-the-siblings guidance (e.g., vs. tencent_docs_build_and_publish_form), so it remains implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tencent_docs_replace_form_questions替换腾讯文档收集表题目A
Destructive

完整替换一份已存在的腾讯文档收集表题目,但不发布。

只允许创建者或管理员执行。调用后会回读草稿并比对标题、题序和题型。

ParametersJSON Schema
NameRequiredDescriptionDefault
specYes
form_urlYes要修改的腾讯文档原生收集表链接。
response_formatNo返回 markdown 或 json。markdown

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds context beyond the annotations (destructiveHint=true already covers the replace semantics): the creator/admin authorization requirement and the post-call read-back that verifies title, question order, and question type. This read-back/verification behavior is a meaningful trait not captured by any structured field.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences: the action and its non-publishing limit are front-loaded, followed by the permission constraint and the verification behavior. No filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Authorization, non-publication, and read-back verification are covered, and an output schema exists so return values need not be described. The main residual gap is what happens to data on the existing form (full overwrite vs merge), which is relevant for a destructive replace.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 67% and the nested $defs (FormSpec, QuestionSpec, enum types) are well documented inline. The description adds no parameter-level detail, so the baseline of 3 for schema-doing-the-work is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: '完整替换一份已存在的腾讯文档收集表题目' (completely replace the questions of an existing form). The clause '但不发布' (but does not publish) cleanly distinguishes it from the publish_form and build_and_publish_form siblings without opening their schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Establishes usage context ('已存在' = must already exist) and a hard precondition ('只允许创建者或管理员执行'). The '但不发布' note implicitly routes the caller elsewhere to publish, but no sibling is named explicitly as an alternative for that next step, so it stops short of full when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.0
    • First observedtencent_docs_build_and_publish_form
    • First observedtencent_docs_inspect_form
    • First observedtencent_docs_publish_form
    • First observedtencent_docs_replace_form_questions

TDQS

A3.6/5.0

Scored across 4 tools

Disambiguation4/5

Each tool has a distinct action, but there is a triangle of overlap: replace_form_questions, publish_form, and build_and_publish_form (which combines replace + publish) could be confused when an agent wants to edit then publish. The descriptions do clarify that build_and_publish fully replaces questions while publish_form only publishes the current draft, keeping selections mostly predictable.

Naming Consistency4/5

All names use the tencent_docs_ prefix in snake_case with an action_noun structure (publish_form, inspect_form, replace_form_questions). build_and_publish_form is a compound verb but still fits the readable pattern, so consistency is high with only a minor deviation.

Tool Count4/5

Four tools is well-scoped for a focused form build/publish workflow and nothing feels trivial. However, build_and_publish_form is somewhat redundant as a convenience wrapper over replace_form_questions plus publish_form, so the set is slightly leaner than it needs to be.

Completeness3/5

The surface only supports editing/publishing existing forms, with no way to create a new form from scratch or delete one, and no tool to read submitted responses. Inspect and replace cover the core edit-publish lifecycle, but these notable gaps mean agents will hit dead ends for creation and response-reading tasks.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers