Beltran12138/wecom-docs-mcp-server

๐Ÿ’ฌ Communication๐ŸŸข Verified Active
0 Views
0 Installs

๐Ÿ ๐Ÿ  ๐ŸชŸ ๐Ÿง - WeCom (Enterprise WeChat) document operations via MCP: create, read, and edit Docs and Smartsheets (9 tools). Fills the doc-CRUD gap โ€” existing WeCom MCP servers only support webhook messaging.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "beltran12138-wecom-docs-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "beltran12138-wecom-docs-mcp-server"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

wecom-docs-mcp-server

MCP Python License: MIT Tests

An ergonomic stdio MCP facade over WeCom's official robot-doc MCP backend. It proxies all 25 backend tools verbatim and adds a transform layer that makes the raw output usable by LLM agents:

  • Schema passthrough โ€” the tool list is fetched from the backend at startup, so it auto-tracks official updates. Zero schema maintenance.
  • Cell unwrap โ€” smartsheet values[field] = [{"type":"text","text":...}] cells become plain scalars (in a _rows view).
  • ms โ†’ ISO โ€” 13-digit ms-epoch timestamps (create_time, update_time) convert to ISO 8601.
  • Chinese error hints โ€” errcode 851003 etc. get _error_summary + _error_hint so the agent learns the fix, not just the code.

Relationship to the backend: This server requires the official robot-doc MCP backend (an apikey from WeCom admin โ†’ ๆ™บ่ƒฝๆ–‡ๆกฃๆœบๅ™จไบบ โ†’ API). It is a thin proxy + ergonomics layer, not a replacement.


Why this exists

The official robot-doc backend is an HTTP (StreamableHttp) MCP server. Two friction points: (1) many MCP clients and dev workflows prefer stdio; (2) its raw output is agent-hostile โ€” nested cell format, ms-epoch strings, opaque error codes. This server bridges both:

official robot-docthis server
TransportHTTP (StreamableHttp)stdio
Tool schemaraw 25 toolssame 25, passthrough
Cell format[{"type":"text",...}]unwrapped scalars (_rows)
Timestampsms-epoch stringsISO 8601
Error codes851003 only+ Chinese summary + fix hint
apikeyrequiredrequired (proxied)

Requirements

  • Python 3.9+
  • A WeCom ๆ™บ่ƒฝๆ–‡ๆกฃๆœบๅ™จไบบ (Smart Doc Bot) with its API key โ€” available to enterprises (โ‰ฅ10 members) via WeCom admin โ†’ ๅบ”็”จ็ฎก็† โ†’ ๆ™บ่ƒฝๆ–‡ๆกฃๆœบๅ™จไบบ โ†’ API.

Install

pip install wecom-docs-mcp-server

Or clone + editable:

git clone https://github.com/Beltran12138/wecom-docs-mcp-server
cd wecom-docs-mcp-server
pip install -e .

Configuration

VariableRequiredDescription
WECOM_MCP_APIKEYyesrobot-doc apikey
WECOM_MCP_BASE_URLnooverride backend URL (default https://qyapi.weixin.qq.com/mcp/robot-doc)

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "wecom-doc": {
      "command": "wecom-docs-mcp-server",
      "env": { "WECOM_MCP_APIKEY": "your_apikey_here" }
    }
  }
}

Tools

All 25 backend tools are exposed verbatim (fetched live at startup). By domain:

DomainReadWrite
docget_doc_contentcreate_doc, edit_doc_content, upload_doc_image, upload_doc_file
smartsheet (ๆ™บ่ƒฝ่กจ)get_sheet, get_fields, get_recordsadd/update/delete ร— sheet/fields/records
sheet (็”ตๅญ่กจๆ ผ)get_infoadd_sub, delete_sub, update_range_data, append_data
smartpage (ๆ™บ่ƒฝ้กต้ข)get_export_resultcreate, export_task

Permission model (empirically observed 2026-07): get_doc_content and smartsheet_get_* use independent permission scopes. A bot may read a smartsheet via smartsheet_get_records (errcode 0) yet get 851003 no authority from get_doc_content on the same doc. Route reads by doc type.


Transforms (the value-add)

Applied automatically on every tools/call response:

  1. _rows on smartsheet_get_records โ€” a flattened view where cells are unwrapped to scalars and top-level record fields (record_id, create_time, โ€ฆ) are preserved. The original records array is kept intact.
  2. ms โ†’ ISO on all successful dict payloads โ€” 13-digit ms-epoch strings โ†’ ISO 8601. Alphanumeric IDs (q979lj) are untouched.
  3. _error_summary + _error_hint on any non-zero errcode โ€” Chinese explanation + concrete fix.

Usage

Read a smartsheet end-to-end:

User: read https://doc.weixin.qq.com/smartsheet/s3_xxx?scode=yyy

Agent:
1. smartsheet_get_sheet(url=...)          โ†’ sheet_id (e.g. "q979lj")
2. smartsheet_get_fields(sheet_id, url)   โ†’ field schema (types, IDs)
3. smartsheet_get_records(sheet_id, url)  โ†’ records + _rows (cells unwrapped, timestamps ISO)

Pass the full url (with ?scode=) rather than guessing docid โ€” the backend resolves it. Manually extracting docid by stripping prefixes is error-prone (empirically: 301085 invalid docid).


Troubleshooting

errcodemeaningfix
851000ๆ–‡ๆกฃ้“พๆŽฅๆœ‰่ฏฏcheck url + scode, or use docid
851002ๆ–‡ๆกฃ็ฑปๅž‹ไธŽๅทฅๅ…ทไธๅ…ผๅฎนsmartsheet โ†’ use smartsheet_get_*
851003ๆ— ๆ–‡ๆกฃๆƒ้™smartsheet ็”จ smartsheet_get_*๏ผ›ๆ™ฎ้€šๆ–‡ๆกฃๆŸฅๅŽๅฐๆƒ้™
851008็ผบๆ–‡ๆกฃๅ†…ๅฎน่ฏปๅ–ๆƒ้™ไผๅพฎๅŽๅฐ โ†’ ๆœบๅ™จไบบ โ†’ API ๆƒ้™
301085ๆ— ๆ•ˆ docid็”จๅฎŒๆ•ด url ๅซ scode
40058ๅ‚ๆ•ฐ็ผบๅคฑsmartsheet ้œ€ sheet_id๏ผˆๅ…ˆ get_sheet๏ผ‰

Related

ProjectFocus
official robot-doc MCPbackend (HTTP, โ‰ฅ10 ไบบไผไธš)
wecom-bot-mcp-serverbot messaging via webhook
this serverrobot-doc stdio proxy + ergonomics

Tests

pip install -e ".[dev]"  # or: pip install pytest httpx
pytest

25 unit tests cover SSE/JSON parsing, ms-timestamp normalization, cell unwrap, error humanizing, and server routing/post-processing โ€” all offline (httpx mocked).


License

MIT

Related MCP Servers

AbdelStark/nostr-mcp

โ˜๏ธ - A Nostr MCP server that allows to interact with Nostr, enabling posting notes, and more.

๐Ÿ’ฌ Communication0 views
adhikasp/mcp-twikit

๐Ÿ โ˜๏ธ - Interact with Twitter search and timeline

๐Ÿ’ฌ Communication0 views
aeoess/mingle-mcp

๐Ÿ“‡ โ˜๏ธ - Agent-to-agent networking. Your AI publishes what you need, matches with other people's agents, both humans approve before connecting. 6 tools, Ed25519 signed, shared network at api.aeoess.com.

๐Ÿ’ฌ Communication0 views
agenticmail/agenticmail

๐Ÿ“‡ ๐Ÿ  ๐ŸŽ ๐ŸชŸ ๐Ÿง - Real email and SMS for AI agents. Run a local mail server with disposable inboxes, send/receive real email, fetch verification codes, and drive a real inbox โ€” all from your machine, no third-party email API. Install with npx @agenticmail/mcp.

๐Ÿ’ฌ Communication0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Active

Recent health check succeeded.

Last checked: 7/28/2026, 6:13:44 PM

Unclaimed listing (imported or pending owner verification). Claim it โ†’
โ˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.