@casys/mcp-erpnext 3.0.1 → 3.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -57
- package/mcp-erpnext.mjs +31299 -23400
- package/package.json +1 -1
- package/ui-dist/chart-viewer/index.html +57 -99
- package/ui-dist/doclist-viewer/index.html +43 -82
- package/ui-dist/funnel-viewer/index.html +41 -80
- package/ui-dist/invoice-viewer/index.html +41 -80
- package/ui-dist/kanban-viewer/index.html +41 -80
- package/ui-dist/kpi-viewer/index.html +41 -80
- package/ui-dist/stock-viewer/index.html +41 -80
package/README.md
CHANGED
|
@@ -8,12 +8,9 @@ English | [繁體中文](README.zh-TW.md)
|
|
|
8
8
|
[](https://modelcontextprotocol.io)
|
|
9
9
|
[](LICENSE)
|
|
10
10
|
|
|
11
|
-
MCP
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Connect any MCP-compatible AI agent (Claude Desktop, Claude Code, VS Code
|
|
15
|
-
Copilot, custom) to your ERPNext instance via the
|
|
16
|
-
[Model Context Protocol](https://modelcontextprotocol.io).
|
|
11
|
+
Let any MCP-compatible AI agent operate your [ERPNext](https://erpnext.com) /
|
|
12
|
+
Frappe instance — documents, workflows, and interactive viewers inside the host
|
|
13
|
+
(Claude Desktop, Claude Code, VS Code Copilot, or custom).
|
|
17
14
|
|
|
18
15
|
Works with **self-hosted** and **ERPNext Cloud** (frappe.cloud) instances.
|
|
19
16
|
|
|
@@ -75,6 +72,11 @@ See the [CHANGELOG](CHANGELOG.md) for the full release history, or the
|
|
|
75
72
|
[latest release](https://github.com/Casys-AI/mcp-erpnext/releases/latest) for
|
|
76
73
|
the current version's highlights.
|
|
77
74
|
|
|
75
|
+
> **3.1 beta preview:** install with `npx -y @casys/mcp-erpnext@next`. The beta
|
|
76
|
+
> remains compatible with the 3.0 tool surface and progressively enables in-view
|
|
77
|
+
> navigation and active context according to the capabilities advertised by the
|
|
78
|
+
> MCP host.
|
|
79
|
+
|
|
78
80
|
## Documentation
|
|
79
81
|
|
|
80
82
|
Organised by what you are doing, following [Diátaxis](https://diataxis.fr):
|
|
@@ -182,72 +184,77 @@ until it exists. See
|
|
|
182
184
|
Seven interactive [MCP Apps](https://github.com/modelcontextprotocol/ext-apps)
|
|
183
185
|
viewers, registered as `ui://mcp-erpnext/{name}`:
|
|
184
186
|
|
|
185
|
-
| Viewer | Description | Interactive Features
|
|
186
|
-
| ---------------- | ---------------------------------------------------------------- |
|
|
187
|
-
| `doclist-viewer` | Generic document table with sort, filter, pagination, CSV export |
|
|
188
|
-
| `invoice-viewer` | Sales/Purchase
|
|
189
|
-
| `stock-viewer` | Stock balance table with color-coded qty badges |
|
|
190
|
-
| `chart-viewer` | Universal chart renderer (12 types via Recharts) |
|
|
191
|
-
| `kanban-viewer` | Read-write kanban for Task, Opportunity, Issue | Drag-and-drop
|
|
192
|
-
| `kpi-viewer` | Big number card with delta, sparkline, trend |
|
|
193
|
-
| `funnel-viewer` | Trapezoid sales funnel with conversion rates |
|
|
194
|
-
|
|
195
|
-
###
|
|
196
|
-
|
|
197
|
-
Viewers
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
- `
|
|
207
|
-
|
|
187
|
+
| Viewer | Description | Interactive Features |
|
|
188
|
+
| ---------------- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
189
|
+
| `doclist-viewer` | Generic document table with sort, filter, pagination, CSV export | Inline details, typed nested navigation, Submit/Cancel, and compact status filters. |
|
|
190
|
+
| `invoice-viewer` | Sales/Purchase documents with parties, items, totals | Item, stock, party, and payment navigation plus guarded Submit/Cancel actions. |
|
|
191
|
+
| `stock-viewer` | Stock balance table with color-coded qty badges | Item details, recent movements, stock charts, and stock-entry navigation. |
|
|
192
|
+
| `chart-viewer` | Universal chart renderer (12 types via Recharts) | Exact point/series navigation and active-context selection across simple and composed charts. |
|
|
193
|
+
| `kanban-viewer` | Read-write kanban for Task, Opportunity, Issue | Drag-and-drop, inline editing, serialized saves, and typed related-document navigation. |
|
|
194
|
+
| `kpi-viewer` | Big number card with delta, sparkline, trend | Number and trend navigation with bounded active-context selection. |
|
|
195
|
+
| `funnel-viewer` | Trapezoid sales funnel with conversion rates | Period-aware stage navigation and bounded active-context selection. |
|
|
196
|
+
|
|
197
|
+
### Navigation and active context
|
|
198
|
+
|
|
199
|
+
Viewers progressively select the best interaction supported by the host:
|
|
200
|
+
|
|
201
|
+
- `serverTools` opens typed list, record, and chart targets inside the current
|
|
202
|
+
viewer through `app.callServerTool()`. Back and breadcrumb navigation restore
|
|
203
|
+
the state of each level.
|
|
204
|
+
- `updateModelContext` lets chart, KPI, and funnel selections join a bounded
|
|
205
|
+
active-context snapshot. The compact context chip keeps up to eight items and
|
|
206
|
+
lets users remove one item or clear them all. The snapshot contains selected
|
|
207
|
+
values, never hidden instructions for the model.
|
|
208
|
+
- `message.text` keeps `app.sendMessage()` as a conversational fallback when
|
|
209
|
+
direct navigation or context replacement is unavailable.
|
|
210
|
+
- Without these capabilities, local inspection remains available and unsupported
|
|
211
|
+
remote actions are omitted.
|
|
212
|
+
|
|
213
|
+
The server supplies typed navigation metadata and the exact `_availableTools`
|
|
214
|
+
allowed for each viewer, so category-filtered deployments do not expose tools
|
|
215
|
+
that are not loaded.
|
|
208
216
|
|
|
209
217
|
### Refresh model
|
|
210
218
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
- All other viewers support focus refresh + manual refresh button
|
|
219
|
+
Read-only viewers revalidate on focus and through their refresh control.
|
|
220
|
+
Mutations use an explicit read-only request to fetch committed state; a mutating
|
|
221
|
+
tool is never replayed automatically. Overlapping or stale responses are ignored
|
|
222
|
+
when a newer host payload or mutation has already won.
|
|
216
223
|
|
|
217
224
|
### Building UI viewers
|
|
218
225
|
|
|
219
226
|
```bash
|
|
220
227
|
cd src/ui
|
|
221
|
-
npm
|
|
228
|
+
npm ci
|
|
222
229
|
node build-all.mjs
|
|
223
230
|
```
|
|
224
231
|
|
|
225
|
-
## Tools
|
|
232
|
+
## Tools
|
|
226
233
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
navigation.
|
|
234
|
+
Each `_list` tool returns interactive results via the doclist-viewer with row
|
|
235
|
+
click, inline detail, and cross-viewer navigation.
|
|
230
236
|
|
|
231
|
-
- **Sales**
|
|
232
|
-
|
|
233
|
-
- **Purchasing**
|
|
234
|
-
|
|
235
|
-
- **Inventory**
|
|
236
|
-
- **Accounting**
|
|
237
|
-
- **HR**
|
|
237
|
+
- **Sales** — Customers, Sales Orders, Invoices, and Quotations with full CRUD,
|
|
238
|
+
Submit, and Cancel.
|
|
239
|
+
- **Purchasing** — Suppliers, Purchase Orders, Purchase Invoices, Receipts, and
|
|
240
|
+
Supplier Quotations.
|
|
241
|
+
- **Inventory** — Items, Stock Balance, Warehouses, and Stock Entries.
|
|
242
|
+
- **Accounting** — Chart of Accounts, Journal Entries, and Payment Entries.
|
|
243
|
+
- **HR** — Employees, Attendance, Leave Applications, Salary Slips, Payroll
|
|
238
244
|
Entries, and Expense Claims.
|
|
239
|
-
- **Project**
|
|
240
|
-
- **Delivery**
|
|
241
|
-
- **Manufacturing**
|
|
242
|
-
- **CRM**
|
|
243
|
-
- **Assets**
|
|
244
|
-
- **Operations**
|
|
245
|
-
DocType (`erpnext_doc_*`, `
|
|
246
|
-
|
|
245
|
+
- **Project** — Projects, Tasks (with native assignment), and Timesheets.
|
|
246
|
+
- **Delivery** — Delivery Notes and Shipments.
|
|
247
|
+
- **Manufacturing** — BOMs, Work Orders, and Job Cards.
|
|
248
|
+
- **CRM** — Leads, Opportunities, Contacts, and Campaigns.
|
|
249
|
+
- **Assets** — Assets, Movements, Maintenance records, and Categories.
|
|
250
|
+
- **Operations** — Generic CRUD, native assignment, and attachment listing or
|
|
251
|
+
upload for any DocType (`erpnext_doc_*`, `erpnext_file_list`,
|
|
252
|
+
`erpnext_file_upload`).
|
|
253
|
+
- **Kanban** — Read-write boards for Task, Opportunity, and Issue with
|
|
247
254
|
drag-and-drop.
|
|
248
|
-
- **Analytics**
|
|
249
|
-
|
|
250
|
-
- **Setup**
|
|
255
|
+
- **Analytics** — Charts (bar, area, treemap, radar, scatter, P&L…), KPIs with
|
|
256
|
+
sparklines, and a sales funnel.
|
|
257
|
+
- **Setup** — Company creation and assignable user listing.
|
|
251
258
|
|
|
252
259
|
Full per-tool reference with parameters: [`docs/tools.md`](docs/tools.md).
|
|
253
260
|
|