wemp-operator-mcp
Provides tools for operating a WeChat Official Account, including searching internal API/workflow catalog and executing tools for tasks like file uploads, draft management, and user data retrieval.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@wemp-operator-mcpsearch for available API workflows"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
wemp-operator-mcp
Public HTTP MCP server and agent Skill for operating a WeChat Official Account.
The server is designed for public deployment behind HTTPS. It keeps WeChat
credentials on the server, exchanges and caches access_token from a fixed
egress IP, and exposes only two MCP tools to agents:
tool_search: discover the internal API/workflow catalog.run_tool: execute one discovered internal tool.
The companion Skill configures a local agent to call your public MCP endpoint
through mcporter.
Languages
Related MCP server: mcp-server-wechat-mp
Why One Repository
The MCP server and Skill are versioned together in this repository because the
Skill documents the exact public contract exposed by the server. Keeping them
together prevents schema drift between file upload handling, tool_search
metadata, and run_tool examples.
Features
HTTP Streamable MCP endpoint at
/mcp.Bearer token authentication for every MCP and upload request.
Server-side WeChat
access_tokenexchange usingWEMP_WECHAT_APP_IDandWEMP_WECHAT_APP_SECRET.Token cache with early refresh, single-flight refresh, and one retry after WeChat token-expired responses.
Temporary file upload endpoint at
/uploadsfor remote MCP file tools.HTTPS URL file source support with SSRF protections.
Dangerous tools are disabled by default, including publish/delete/mass-send and blacklist operations.
Local CLI remains available for development and local automation.
Architecture
Local Agent + Skill
|
| mcporter HTTP MCP
v
HTTPS reverse proxy
|
v
wemp-operator-mcp container
|
| fixed public egress IP
v
WeChat Official Account APIsFor public deployment, add your server's public egress IP to the WeChat
Official Account API IP allowlist. Agents only need the MCP bearer token; they
do not receive your WeChat AppSecret or access_token.
Public API
MCP
POST /mcp
Authorization: Bearer <WEMP_MCP_TOKEN>Public MCP tools:
tool_search(query?: string, category?: string, limit?: number)
run_tool(name: string, arguments?: object)Example:
mcporter call wemp-operator-mcp.tool_search \
--args '{"query":"draft image","limit":10}' \
--output jsonmcporter call wemp-operator-mcp.run_tool \
--args '{"name":"get_user_summary","arguments":{"date":"2026-06-21"}}' \
--output jsonFile Upload
Remote MCP servers cannot read local paths from the caller machine. Upload the file first:
POST /uploads
Authorization: Bearer <WEMP_MCP_TOKEN>
Content-Type: multipart/form-dataThe form must contain exactly one file field. Successful response:
{
"uploadId": "cfa59bda-0d99-4ad7-9afe-77efb8b09c80",
"filename": "cover.png",
"mimeType": "image/png",
"size": 123456,
"expiresAt": "2026-06-21T12:00:00.000Z"
}Use the returned uploadId with file tools:
mcporter call wemp-operator-mcp.run_tool \
--args '{"name":"upload_article_image","arguments":{"source":{"uploadId":"cfa59bda-0d99-4ad7-9afe-77efb8b09c80"}}}' \
--output jsonOr pass a public HTTPS URL:
mcporter call wemp-operator-mcp.run_tool \
--args '{"name":"upload_article_image","arguments":{"source":{"url":"https://example.com/image.png","filename":"image.png"}}}' \
--output jsonFile source tools:
upload_temp_mediaupload_permanent_mediaupload_article_imagecreate_draft_from_file
MCP file tools intentionally do not accept filePath. Local CLI scripts may
still use local paths.
Quick Start: Docker
Clone the repository.
git clone https://github.com/xiaowangzhixiao/wemp-operator-mcp.git
cd wemp-operator-mcpCreate an environment file.
cp .env.example .envEdit .env:
WEMP_MCP_TOKEN=replace-with-a-random-token
WEMP_WECHAT_APP_ID=wx...
WEMP_WECHAT_APP_SECRET=replace-with-your-app-secret
WEMP_MCP_HOST=0.0.0.0
WEMP_MCP_PORT=3333
WEMP_MCP_ENABLE_DANGEROUS_TOOLS=0Generate a token:
openssl rand -hex 32Run the server.
docker compose up -d --build
curl --fail http://127.0.0.1:3333/healthzPut Nginx or another HTTPS reverse proxy in front of the container.
Use deploy/nginx.example.conf as a starting point. Replace
mcp.example.com with your own domain and set certificate paths for your
certificate provider.
Add your server public IP to the WeChat Official Account allowlist.
In the WeChat Official Account admin console, go to the developer settings and add the public egress IP of the server running this container.
Environment Variables
Required:
WEMP_MCP_TOKEN: bearer token for MCP and upload requests.WEMP_WECHAT_APP_ID: WeChat Official Account AppID.WEMP_WECHAT_APP_SECRET: WeChat Official Account AppSecret.
Optional:
WEMP_MCP_HOST: default127.0.0.1; use0.0.0.0in containers.WEMP_MCP_PORT: default3333.WEMP_WECHAT_TOKEN_REFRESH_SKEW_SECONDS: default300.WEMP_MCP_ENABLE_DANGEROUS_TOOLS: set1to enable dangerous tools.WEMP_MCP_UPLOAD_MAX_BYTES: default52428800(50 MiB).WEMP_MCP_UPLOAD_TOTAL_BYTES: default524288000(500 MiB).WEMP_MCP_UPLOAD_TTL_SECONDS: default900.
Do not log or commit .env, AppSecret, WeChat access_token, or MCP bearer
tokens.
Install The Agent Skill
The Skill lives at:
skills/wemp-operator-mcpFor Codex-style local skills:
npm run skill:installConfigure the MCP endpoint:
cd skills/wemp-operator-mcp
WEMP_MCP_URL='https://mcp.example.com/mcp' \
WEMP_MCP_TOKEN='<your-mcp-token>' \
node scripts/setup.mjsVerify:
mcporter list wemp-operator-mcp
mcporter call wemp-operator-mcp.tool_search --args '{"limit":10}' --output jsonUpload a local file through the Skill helper:
WEMP_MCP_URL='https://mcp.example.com/mcp' \
WEMP_MCP_TOKEN='<your-mcp-token>' \
node scripts/upload-file.mjs /absolute/path/to/cover.pngLocal Development
Use Node.js 20.12 or newer.
Install dependencies:
npm installRun tests:
npm testStart a local MCP server:
WEMP_MCP_TOKEN=dev-token \
WEMP_WECHAT_APP_ID=wx... \
WEMP_WECHAT_APP_SECRET=... \
npm run mcp:startLocal CLI mode can still use config/wemp.json through:
node scripts/init.mjsThat local config is not used in MCP context.
Deployment Guides
Security Defaults
MCP and upload routes require the same bearer token.
Only
tool_searchandrun_toolare public MCP tools.The server never exposes AppSecret or WeChat
access_tokenthrough MCP.Dangerous operations are disabled unless
WEMP_MCP_ENABLE_DANGEROUS_TOOLS=1.File uploads are temporary and are deleted after TTL.
Public URL fetching only allows HTTPS and rejects private, loopback, link-local, multicast, and cloud metadata network ranges.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server for China brand visibility, destination demand, and KOL discovery workflows.
Create, schedule, and publish social posts, manage accounts, and read analytics as MCP tools.
- OneOAuthai.withone
Search, document and execute authenticated API calls across 700+ apps via one MCP server
Remote MCP server to read and manage your Atako AI agents, messages, files, and integrations.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables management of WeChat Official Accounts by supporting draft creation, image uploads, and content publishing via the MCP protocol. It provides tools for interacting with the WeChat API, including secure token caching and draft list management.-
- FlicenseAqualityFmaintenanceEnables AI agents to publish articles to WeChat Official Account (微信公众号). Supports image upload, draft creation, and publishing via standardized MCP protocol.51-
- FlicenseAqualityCmaintenanceEnables management of WeChat Official Account content, including creating, publishing, and deleting drafts and materials, through MCP tools.527-
- FlicenseAqualityDmaintenanceEnables AI agents to control WeChat through MCP protocol, including sending messages, managing contacts, and searching messages.10-