cy-excel-mcp
Parses WeChat order messages from chat text, merges follow-up updates, and writes structured orders into a OneDrive Excel workbook.
Click on "Install 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., "@cy-excel-mcpingest order: 单号26.3.13-7 客户A 产品2000支105元"
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.
cy-excel-mcp
MCP server for parsing WeChat order messages, merging follow-up updates, and writing structured orders into a OneDrive Excel workbook.
Field mapping: docs/FIELD_MAPPING.md OpenClaw integration: docs/OPENCLAW_INTEGRATION.md Project roadmap: TODO.md
Overview
cy-excel-mcp is built for order-entry workflows where salespeople send order details through chat, sometimes as plain text, sometimes as follow-up updates after an image or partial draft.
The server converts those messages into structured JSON, merges updates into the same order, and writes the final result into a OneDrive Excel table through Microsoft Graph.
Related MCP server: OneDrive/SharePoint MCP Server
Typical Use Cases
A salesperson sends a full text order and it should be recorded directly
A salesperson sends part of an order first, then later sends the address, phone number, or payment info
An OpenClaw Agent needs a stable MCP endpoint instead of relying on free-form chat reasoning
Example Input
单号:26.3.13-7
测试客户A
示例产品2000支105元
收件人: 测试联系人
手机号码: 13800000000
收货地址:测试省测试市测试区示例路88号Example Output
{
"日期": "2026-03-13",
"单号": "26.3.13-7",
"销售员": "业务员A",
"客户": "测试客户A",
"货品名称": "示例产品",
"数量": "2000",
"数量单位": "支",
"销售金额": "105",
"总货款": "105",
"已收": "105",
"未收": "0",
"收货联系人": "测试联系人",
"收货人电话": "13800000000",
"收货地址": "测试省测试市测试区示例路88号"
}Flow
OpenClaw sends chat text into
ingest_order_messageThe server parses the text into a normalized order object
If this is a follow-up message, it merges the update into the existing draft
The final order is matched against recent Excel rows
The server updates an existing row or creates a new one
Privacy Note
This repository should only contain desensitized sample text and JSON. Do not commit real customer names, phone numbers, addresses, order screenshots, or payment details.
Features
Parse order text from chat messages
Merge follow-up text into an existing draft order
Match recent orders by salesperson and customer from bottom to top
Standardize product names against a OneDrive product catalog with local caching
Write or update OneDrive Excel rows through Microsoft Graph
Expose tools over Streamable HTTP for OpenClaw
Tools
ingest_order_messageparse_wechat_order_messagemerge_order_updateprocess_excel_ordercheck_product_catalog_statusrefresh_product_catalogresolve_product_nameanalyze_product_catalog_patterns
Requirements
Python 3.10+
A Microsoft Azure app registration with OneDrive permission
An Excel workbook stored in OneDrive with a named table
Quick Start
git clone <your-repo-url> cy-excel-mcp
cd cy-excel-mcp
./bootstrap.sh
cp .env.example .envEdit .env:
OC_OD_TENANT_ID=consumers
OC_OD_CLIENT_ID=your_microsoft_app_client_id
OC_OD_FILE_PATH=YourFolder/订单汇总.xlsx
OC_OD_TABLE_NAME=表1
OC_OD_CACHE_FILE=onedrive_token_cache.bin
OC_OD_PRODUCT_FILE_PATH=众一/2026诚亿报表.xlsx
OC_OD_PRODUCT_SHEET_NAME=产品明细
OC_OD_PRODUCT_CODE_COLUMN=A
OC_OD_PRODUCT_NAME_COLUMN=B
OC_OD_PRODUCT_CATEGORY_COLUMN=C
CY_PRODUCT_CACHE_FILE=product_catalog_cache.json
CY_PRODUCT_ALIAS_FILE=product_aliases.json
CY_EXCEL_MCP_HOST=127.0.0.1
CY_EXCEL_MCP_PORT=18061
CY_EXCEL_MCP_TRANSPORT=streamable-httpStart the server:
./start_cy_excel_mcp_http.shThe default MCP endpoint is:
http://127.0.0.1:18061/mcpManual Installation
python3 -m venv .venv
. .venv/bin/activate
pip install --upgrade pip
pip install -e .Or run directly after installation:
cy-excel-mcp --transport streamable-http --host 127.0.0.1 --port 18061OpenClaw MCP Config
Example mcporter.json:
{
"mcpServers": {
"cy-excel-mcp": {
"baseUrl": "http://127.0.0.1:18061/mcp"
}
},
"imports": []
}An example file is also included at config/mcporter.json.example.
Detailed runtime notes are available in docs/RUNNING.md.
Chinese runtime notes are available in docs/RUNNING.zh-CN.md.
OpenClaw integration notes are available in docs/OPENCLAW_INTEGRATION.md.
OpenClaw Agent Flow
Full text order:
ingest_order_messageFollow-up text for an existing draft:
ingest_order_messagewithexisting_orderParse only:
parse_wechat_order_messageMerge only:
merge_order_updateWrite only:
process_excel_order
Why This Project
Keeps Excel write logic outside prompt-only workflows
Makes OpenClaw behavior more stable through explicit MCP tools
Supports salesperson-first matching and bottom-up order updates
Works well for chat-driven order entry teams using OneDrive Excel
Matching Rules
Prefer matching within the same salesperson
Search from the bottom of Excel upwards
Match priority:
单号客户匹配客户别名
Repository Layout
cy_excel_mcp.py: MCP server implementationstart_cy_excel_mcp_http.sh: local HTTP startup scriptbootstrap.sh: one-command local setup.env.example: environment variable templateconfig/mcporter.json.example: OpenClaw MCP config template
Notes
Personal OneDrive has been validated with
OC_OD_TENANT_ID=consumers.OC_OD_FILE_PATHcan include a nested folder path such asYourFolder/订单汇总.xlsx.OC_OD_TABLE_NAMEmust be the Excel table object name, not the worksheet name.Product name standardization reads the product-code, product-name, and category columns from
OC_OD_PRODUCT_SHEET_NAMEinOC_OD_PRODUCT_FILE_PATH.When a product name is matched, the matched product code is written to the order row field
编号if that column exists in the target order table.Cup products use segmented matching for diameter, mold/series,
oz,ml, color, and material before generic text similarity.Before each order write, the server checks product workbook metadata and uses
product_catalog_cache.jsonwhen the file has not changed.The first Microsoft login may require device-flow authorization in the terminal.
After the first successful sign-in, the token is cached in
onedrive_token_cache.binand reused on later runs.Empty values do not overwrite existing Excel values.
Keep
.envandonedrive_token_cache.binout of version control.Temporary files such as swap files and
__pycache__are already ignored by.gitignore.
License
MIT. See LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/flaltangyi/chat-order-excel-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server