Content
# Credit-AR MCP Server
Customer Credit and Accounts Receivable Management MCP Server. Suitable for Lingee, Claude Code, Dify, Coze, and other Agent platforms that support the MCP protocol.
## Features
Provides 10 MCP tools, covering scenarios such as credit evaluation, aging analysis, collection strategies, and order credit checks:
| Tool | Description |
|------|------|
| `get_customer_credit` | Query customer credit limit and usage |
| `get_ar_aging` | Accounts receivable aging analysis |
| `calculate_credit_score` | Credit score calculation |
| `update_credit_limit` | Update credit limit (requires confirmation) |
| `list_overdue_customers` | List of overdue customers |
| `generate_collection_strategy` | Generate collection strategy |
| `check_order_credit` | Sales order credit check |
| `create_collection_record` | Create collection record |
| `get_collection_history` | Collection history query |
| `batch_risk_report` | Batch risk report |
## Quick Start
```bash
npm install
npm run build
npm run init-db # Initialize example data
npm run start # STDIO mode (Claude Code and other local tools)
npm run http # HTTP mode (Lingee and other remote platforms)
npm run web # Web demo panel http://localhost:3721
```
## Architecture
```
Agent Platform (Lingee/Claude Code/Coze)
│ MCP Protocol
▼
┌──────────────────────┐
│ MCP Tools (10 tools) │
├──────────────────────┤
│ Rule Engine │
│ (Credit scoring/collection/checking) │
├──────────────────────┤
│ Data Adapter │
│ SQLite / Kingdee ERP │
└──────────────────────┘
```
The data adapter layer decouples business logic from the data source. In a production environment, replace it with the Kingdee ERP API adapter.
## Lingee Integration
Add an MCP server in Lingee Build mode:
- **Name**: Credit and Accounts Receivable Management
- **URL**: `https://your-server:3721/mcp`
- **Protocol**: Streamable HTTP
- **Authentication**: Bearer Token
## License
MIT