kingdee-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_MODE | No | readonly(默认)或 readwrite | readonly |
| KD_ACCT_ID | Yes | 账套 ID | |
| KD_PASSWORD | No | 密码(ValidateUser 登录) | |
| KD_USERNAME | Yes | 集成用户账号 | |
| MCP_API_KEY | No | SSE/HTTP Bearer Token;不设则不鉴权 | |
| FASTMCP_HOST | No | SSE 监听地址;Docker/CLB 用 0.0.0.0 | |
| FASTMCP_PORT | No | SSE 端口,默认 8181 | 8181 |
| KD_SERVER_URL | Yes | 金蝶地址,建议以 /k3cloud/ 结尾 | |
| MCP_ISSUER_URL | No | 鉴权元数据对外 URL(启用 MCP_API_KEY 时) | |
| MCP_ALLOWED_HOSTS | No | SSE Host 白名单,逗号分隔;解决远程 421 Invalid Host header |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| query_billD | – |
| query_bill_jsonD | – |
| count_billA | 估算某查询条件下的数据行数(不返回数据内容)。用于大数据量查询前的探测。 返回 JSON 格式: {"estimated_rows": N, "is_exact": true/false, "hint": "..."} 当 is_exact=false 时,实际行数 ≥ estimated_rows,建议按月/周分片查询。 Args: form_id: 表单ID。如 SAL_SaleOrder、PUR_PurchaseOrder、BD_MATERIAL 等 filter_string: 过滤条件。如 "FDate >= '2025-01-01' AND FDate < '2026-01-01'" |
| query_bill_allA | 自动翻页查询直到拉完或达到 max_rows 安全上限。 适合估算 ≤ 数千行的场景。大数据量(> 5000 行)请用 query_bill_to_file(落盘) 或 query_bill_range(日期分片),避免超过 MCP 1 MB 返回限制。 返回格式: {"rows": [...], "row_count": N, "exhausted": true/false, "next_start_row": N, # 仅 exhausted=false 时 "hint": "..."} # 仅 exhausted=false 时 Args: form_id: 表单ID。如 SAL_SaleOrder、PUR_PurchaseOrder、BD_MATERIAL 等 field_keys: 查询字段,逗号分隔。如 "FBillNo,FDate,FAmount" filter_string: 过滤条件。如 "FDate >= '2025-01-01'" order_string: 排序字段。如 "FDate ASC" max_rows: 安全上限,默认 20000;超过则提前终止并返回 exhausted=false page_size: 每页行数,默认 2000,建议不超过 2000 |
| query_bill_to_fileA | 自动翻页并流式写入本地文件,适合大数据量导出(万行以上)。 不在内存中累积数据,写入完成后返回文件路径和统计信息。 文件可用 Read 工具抽检,或交由 pandas/polars 处理。 返回格式: {"path": "...", "row_count": N, "bytes": M, "format": "ndjson"} 若中途出错:{"error": "...", "path": "...", "row_count": <已写入>, "bytes": M} Args: form_id: 表单ID。如 SAL_SaleOrder、PUR_PurchaseOrder、BD_MATERIAL 等 field_keys: 查询字段,逗号分隔。如 "FBillNo,FDate,FAmount" filter_string: 过滤条件。如 "FDate >= '2025-01-01'" output_path: 输出文件绝对路径。如 "/tmp/orders.ndjson" format: 输出格式,ndjson(每行一个 JSON 对象)或 csv,默认 ndjson page_size: 每页行数,默认 2000 max_rows: 最大写入行数,默认 500000;超过则截断并正常返回 |
| query_bill_rangeA | 按日期自动切片 + 翻页,适合跨月/跨年查询。 将 [date_from, date_to) 按 chunk 切成 N 段,每段独立翻页拉取。 output_path 为空时内联返回(受 MCP 1 MB 限制,适合小跨度); 非空时流式落盘,适合大跨度(年级)查询。 返回格式(内联): {"rows": [...], "row_count": N, "chunks": K, "exhausted": true} 返回格式(落盘): {"path": "...", "row_count": N, "bytes": M, "chunks": K, "format": "ndjson"} 若中途出错:{"error": "...", "path": "...", "row_count": <已写入>, "bytes": M} Args: form_id: 表单ID。如 SAL_SaleOrder、PUR_PurchaseOrder 等 field_keys: 查询字段,逗号分隔 date_field: 日期字段名。通常是 FDate 或 FCreateDate date_from: 起始日期(含),YYYY-MM-DD date_to: 结束日期(不含),YYYY-MM-DD extra_filter: 额外过滤条件(与日期条件 AND 拼接) chunk: 切片粒度,month(默认)/ week / day output_path: 落盘路径(绝对路径)。空=内联返回 page_size: 每页行数,默认 2000 |
| view_billA | 查看金蝶云星空单条记录的完整详情。 通过编号或内码查看单条记录的所有字段信息。 Args: form_id: 表单ID。如 BD_MATERIAL、SAL_SaleOrder 等 number: 单据编号。如 "MATERIAL001"(number 和 bill_id 二选一) bill_id: 单据内码ID(number 和 bill_id 二选一) |
| query_metadataA | 查询金蝶云星空表单的元数据(字段结构信息)。 用于获取某个表单有哪些字段、字段类型等信息,便于构造查询和保存参数。 Args: form_id: 表单ID。如 SUB_ReqChange(委外订单变更单)、SUB_SubReqOrder(委外订单)、 SAL_SaleOrder、PUR_PurchaseOrder、BD_MATERIAL 等 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/YanSir1999/kingdee-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server