query_billLABSCO SUMMARY
The generic form_id design is why this covers your ERP rather than a handful of hard-coded documents.
K3Cloud has hundreds of form types, and a server that named each one would always be missing yours; here one parameter selects the form and query_metadata tells the model what fields it has, so a document nobody anticipated still works. The high-level query primitives are the practical part — automatic paging, date sharding and streaming to file mean an export of a whole month does not become a loop the model has to drive and get wrong. Set the read-only mode unless you actually want approvals and deletions available; the write tools include audit, unaudit and delete.
What it is
A Python server over the Kingdee Cloud Cosmic (K3Cloud) Web API that exposes ERP documents through one generic form_id parameter, so the same tools work for materials, customers, sales orders and purchase orders alike.
What you get
- query_bill and query_bill_json — a document query against any form, returned as structured data
- query_bill_all — paging handled for you, so the model does not have to loop
- query_bill_range — a query sharded by date, for periods too large for one call
- query_bill_to_file — results streamed straight to a file, for exports that would not fit in a response
- count_bill and query_metadata — how many records match, and what fields a form actually has
- The write side: save_bill, submit_bill, audit_bill, unaudit_bill, delete_bill, push_bill and execute_operation
- view_bill for a single document
- A read-only mode that stops an assistant from changing anything
- Automatic session recovery, so a long-running server survives K3Cloud session timeouts
- Stdio locally, or SSE and streamable HTTP when the server is shared
- Parameter validation on every tool before the call reaches Kingdee
Requirements
Five environment variables from your Kingdee instance — KD_SERVER_URL ending in /k3cloud/, KD_ACCT_ID, KD_USERNAME, KD_APP_ID and KD_APP_SEC — obtained by registering a third-party login authorization in the Kingdee admin console. The server exits at startup if any are missing. Python 3.10 or higher; installed with pip as kingdee-k3cloud-mcp or run with uvx. The repository recommends a dedicated integration user with only the module permissions it needs, rather than an administrator account.
Setup effort
One command plus credentials — uvx kingdee-k3cloud-mcp, then supply credentials
USE CASES
Asking where a material's stock actually sits
Query the form in plain language and get the per-warehouse figures back, without the ERP web client.
Exporting a month of documents
Shard the query by date and stream the result to a file rather than trying to fit it in a response.
Reviewing orders before an approval round
Pull the matching documents with paging handled, then read the individual ones that need attention.
Pushing a document through its workflow
Save, submit and audit in sequence — or unaudit when something has to go back.
Letting the team ask questions without risking the data
Run in read-only mode, so queries answer and every write tool refuses.
15 tools
Listed in project docs. Your client may show a different list.
query_bill_jsoncount_billquery_bill_allquery_bill_to_filequery_bill_rangeview_billquery_metadatasave_billsubmit_billaudit_billunaudit_billdelete_billexecute_operationpush_billBEFORE YOU INSTALL
What to know first
Tools you get
15 tools named in the project's documentation.
Requires
- uvx on PATH
- KD_APP_ID in your environment
- KD_SERVER_URL in your environment
- KD_ACCT_ID in your environment
- KD_USERNAME in your environment
- KD_APP_SEC in your environment
INSTALLATION
Connect your client
Server setup
uvx kingdee-k3cloud-mcpMCP Clients
Claude Desktop, Claude Code, Cursor, Windsurf
{
"mcpServers": {
"kingdee-k3cloud": {
"command": "uvx",
"args": [
"kingdee-k3cloud-mcp"
],
"env": {
"KD_SERVER_URL": "https://<YOUR_SERVER>/k3cloud/",
"KD_ACCT_ID": "<YOUR_KD_ACCT_ID>",
"KD_USERNAME": "<YOUR_KD_USERNAME>",
"KD_APP_ID": "<YOUR_KD_APP_ID>",
"KD_APP_SEC": "<YOUR_KD_APP_SEC>",
"KD_LCID": "2052"
}
}
}
}Cline, Continue, Other MCP clients
{
"mcpServers": {
"kingdee-k3cloud": {
"command": "uvx",
"args": [
"kingdee-k3cloud-mcp"
],
"env": {
"KD_SERVER_URL": "https://<YOUR_SERVER>/k3cloud/",
"KD_ACCT_ID": "<YOUR_KD_ACCT_ID>",
"KD_USERNAME": "<YOUR_KD_USERNAME>",
"KD_APP_ID": "<YOUR_KD_APP_ID>",
"KD_APP_SEC": "<YOUR_KD_APP_SEC>"
}
}
}
}Any MCP client — read-only
{
"mcpServers": {
"kingdee-k3cloud": {
"command": "uvx",
"args": [
"kingdee-k3cloud-mcp",
"--mode",
"readonly"
],
"env": {
"KD_SERVER_URL": "https://<YOUR_SERVER>/k3cloud/",
"KD_ACCT_ID": "<YOUR_KD_ACCT_ID>",
"KD_USERNAME": "<YOUR_KD_USERNAME>",
"KD_APP_ID": "<YOUR_KD_APP_ID>",
"KD_APP_SEC": "<YOUR_KD_APP_SEC>"
}
}
}
}The standard configuration with --mode readonly added to args. Only the 8 query tools are registered, so the assistant cannot save, submit, audit or delete documents.
Any MCP client — SSE
{
"mcpServers": {
"kingdee-k3cloud-mcp": {
"url": "http://<YOUR_SERVER>:8080/sse"
}
}
}