Featured

Deploy OpenClaw in 60 seconds โ€” 20% off logoDeploy OpenClaw in 60 seconds โ€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger โ†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger โ†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free โ†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now โ†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data โ€” no proxies, no parsers, no maintenance.

Start building free โ†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4โ€“50+ employees): we install, harden, integrate your tools, and maintain it โ€” secured from day one.

Get it set up for you โ†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free โ†’
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here โ†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Beltran12138/wecom-docs-mcp-server MCP server](https://glama.ai/mcp/servers/Beltran12138/wecom-docs-mcp-server/badges/score.svg)](https://glama.ai/mcp/servers/Beltran12138/wecom-docs-mcp-server) ๐Ÿ ๐Ÿ  ๐ŸชŸ ๐Ÿง - WeCom (Enterprise WeChat) document operations...

README.md

wecom-docs-mcp-server

![MCP](https://modelcontextprotocol.io) ![Python](https://python.org) ![License: MIT](LICENSE) ![Tests](#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-doc | this server | |---|---|---| | Transport | HTTP (StreamableHttp) | stdio | | Tool schema | raw 25 tools | same 25, passthrough | | Cell format | [{"type":"text",...}] | unwrapped scalars (_rows) | | Timestamps | ms-epoch strings | ISO 8601 | | Error codes | 851003 only | + Chinese summary + fix hint | | apikey | required | required (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: ``bash git clone https://github.com/Beltran12138/wecom-docs-mcp-server cd wecom-docs-mcp-server pip install -e . ``

---

Configuration

| Variable | Required | Description | |---|---|---| | WECOM_MCP_APIKEY | yes | robot-doc apikey | | WECOM_MCP_BASE_URL | no | override 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:

| Domain | Read | Write | |---|---|---| | doc | get_doc_content | create_doc, edit_doc_content, upload_doc_image, upload_doc_file | | smartsheet (ๆ™บ่ƒฝ่กจ) | get_sheet, get_fields, get_records | add/update/delete ร— sheet/fields/records | | sheet (็”ตๅญ่กจๆ ผ) | get_info | add_sub, delete_sub, update_range_data, append_data | | smartpage (ๆ™บ่ƒฝ้กต้ข) | get_export_result | create, 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

| errcode | meaning | fix |
|---|---|---|
| 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

| Project | Focus |
|---|---|
| official robot-doc MCP | backend (HTTP, โ‰ฅ10 ไบบไผไธš) |
| [wecom-bot-mcp-server](https://github.com/loonghao/wecom-bot-mcp-server) | bot messaging via webhook |
| **this server** | **robot-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

See related servers & alternatives โ†’

Related MCP servers

Browse all โ†’

Related guides

Hand-picked reading to help you choose and use Communication servers.