kingdee_star
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., "@kingdee_starCalculate the tax deduction for my train ticket"
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.
kingdee_star — Kingdee Cloud Star MCP Server
GC032 Financial Agent · Kingdee side (the DingTalk side is already connected via DingTalk MCP; this repo only handles Kingdee). Aligned with requirement v2.1: Phase 1 read-only + invoice tax calculation + reimbursement form pending-entry message generation.
v0.2.0 Important changes: Authentication, endpoints, and the tax engine have all been rewritten per the official docs and sandbox testing. The endpoint constants from v0.1.0 (like
/finance/expense) do not exist on the real gateway; do not reuse them.
Table of Contents
kingdee_star/
├── kingdee_star/
│ ├── config.py # 环境/凭据(两层:ISV + 租户),只读/写开关
│ ├── signer.py # jdy 网关签名(X-Api-Signature / app_signature)
│ ├── models.py # Invoice / ExpenseDraft / ExpenseLine
│ ├── tax_engine.py # 发票税额决策树(专票/铁路/航空/旅客运输/公路水路/其他)
│ ├── guards.py # 只读守卫 + 受控写入守卫(白名单+默认拒绝)+ 审计
│ └── star_client.py # 鉴权 + 只读查询 + 报销报文生成
├── test_connection.py # 分层联调测试(配置→网络→鉴权→只读→dry-run)
├── run_test.bat # Windows 一键跑:装依赖 + 单测 + 联调
├── tests/ # pytest:税额引擎 + 签名算法
└── .env.example # 配置模板Related MCP server: QuickBooks Online MCP Server
Authentication (two layers of credentials, don't mix them up)
Layer | Value | Purpose |
ISV app |
|
|
Tenant account set |
| Compute |
Flow:
POST /jdyconnector/app_management/push_app_authorize?outerInstanceId=...
→ data[0].appKey / appSecret
GET /jdyconnector/app_management/kingdee_auth_token?app_key=..&app_signature=..
→ data['app-token'](有效期约 2h)
GET /jdy/v2/{module}/{object}
→ 头带 app-token + X-Api-* 签名 + X-GW-Router-AddrThree easy pitfalls (already handled in signer.py; read the comments before changing anything):
hash_hmac(..., raw_output=false)returns a hex string; the base64 input is this hex, not the raw digest.Header names in the string to sign are lowercase, and nonce comes first, timestamp last — the reverse of the order declared in
X-Api-SignHeaders; there is also a trailing newline.X-GW-Router-Addr(taken from thedomainin the push message, e.g.https://tf.jdy.com) is a globally required header; all 370 endpoints in the official docs mark it as required.
Quick Start
pip install -r requirements.txt
cp .env.example .env # 填入凭据
pytest -q # 单测应全绿
python test_connection.py # 联调:配置→网络→鉴权→只读→dry-runOn Windows, just double-click run_test.bat (results are written to connection_test_result.txt).
Using as an MCP Server
python -m kingdee_star.server # stdioMerge kingdee-star from mcp.config.json into the client's mcpServers config (adjust cwd and env).
Compatible with both mcp 1.x and 2.x major versions.
Tool List (17)
Category | Tools | Endpoint |
Meta/Auth |
| — |
Probe |
|
|
Read-only · Accounts |
|
|
Read-only · Vouchers |
|
|
Read-only · Invoices |
|
|
Read-only · Receipts/Payments |
|
|
Read-only · Transactions |
|
|
Read-only · Reimbursement |
|
|
Calculation |
| Local, does not call Kingdee |
Message generation |
| dry-run only, see below |
Sales/output and purchase/input invoices are not two separate endpoints; filter via
bill_type/invoice_typeonfi/invoice_fp.
⚠ Real-world constraints on reimbursement writes
The official open platform has 370 endpoints in total; the ebx module has only one GET — "reimbursement detail",
with neither a reimbursement list nor any reimbursement save endpoint.
Therefore, the "auto-fill reimbursement draft from invoice" in requirement v2.1 cannot be persisted via the open API:
kdy_fill_reimbursementonly produces pending-entry messages with tax already computed and compliance checks passed,dry_run=Falseis explicitly rejected.To actually write automatically, you can only go through non-open-API channels (RPA / frontend APIs / asking Kingdee for a custom endpoint).
Security Boundary
JDY_READONLY=true→ pure read-only.The guard layer is whitelist + deny by default: path variations (trailing slashes, sub-paths, case changes) cannot bypass it.
Payment/voucher/account writes and reimbursement submission for approval → permanently forbidden (
FORBID_ENDPOINTS), executed manually.Full audit:
kingdee_star.auditlog.
Tax Engine
Ticket type | Rule |
Special VAT invoice | Use the face tax amount and the amount excluding tax |
Passenger transport (tax shown) | Use the face tax amount; if |
Railway | ÷1.09×9% |
Air | (fare + fuel surcharge)÷1.09×9%; validate with |
Road/waterway | ÷1.03×3% |
Other ordinary invoices | Not deductible; if tax is already shown on the face, raise a prompt asking for manual confirmation of the ticket type |
Passenger transport deduction missing the traveler → compliance check marks it as non-deductible. Negative (red-letter) invoices are rejected outright.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables querying SAP SuccessFactors OData API metadata and managing Role-Based Permission (RBP) configurations. It provides tools for retrieving entity metadata, listing permission roles, and inspecting user-specific access rights through MCP-compatible clients.2911MIT
- AlicenseBqualityAmaintenanceEnables interaction with the QuickBooks Online Accounting API to manage customers, invoices, expenses, and payments through MCP-compatible clients. It supports comprehensive financial workflows and the generation of reports like Profit and Loss or Balance Sheets.1332Apache 2.0
- AlicenseBqualityBmaintenanceEnables AI assistants to operate Kingdee Cloud Star ERP via natural language, including querying, creating, submitting, auditing, and deleting business documents.8157MIT
- FlicenseNot gradedqualityBmaintenanceExposes enterprise WeChat approval, report, and check-in data reading capabilities through the MCP protocol, enabling WorkBuddy and CodeBuddy to read historical business data.7
Related MCP Connectors
A paid remote MCP for AI SDK data query MCP, built to return verdicts, receipts, usage logs, and aud
PayPal MCP Pack — read-only access to PayPal transactions, orders, invoices, and disputes.
Remote MCP for Japan's EDINET DB — 3,800 listed companies' financials & filings (OAuth)
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/adambbhe/kingdee-star-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server