@casys/mcp-erpnext 3.1.0-beta.8 → 3.1.0
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/LICENSE +21 -0
- package/README.md +64 -73
- package/THIRD_PARTY_NOTICES.txt +1589 -0
- package/mcp-erpnext.mjs +1579 -2994
- package/package.json +4 -2
- package/ui-dist/chart-viewer/index.html +99 -58
- package/ui-dist/doclist-viewer/index.html +82 -44
- package/ui-dist/funnel-viewer/index.html +41 -42
- package/ui-dist/invoice-viewer/index.html +86 -42
- package/ui-dist/kanban-viewer/index.html +80 -42
- package/ui-dist/kpi-viewer/index.html +41 -42
- package/ui-dist/stock-viewer/index.html +80 -42
- package/ui-dist/doc-viewer/index.html +0 -116
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Casys AI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -9,15 +9,6 @@ English | [繁體中文](README.zh-TW.md)
|
|
|
9
9
|
[](https://m8ven.ai/mcp/casys-ai-mcp-erpnext-1kev4k)
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
|
|
12
|
-
> [!IMPORTANT]
|
|
13
|
-
> **Installing the 3.1 beta:** for npm/Node use
|
|
14
|
-
> `npx -y @casys/mcp-erpnext@next`; for Deno use
|
|
15
|
-
> `deno run -A jsr:@casys/mcp-erpnext@^3.1.0-beta/server`. Both follow the
|
|
16
|
-
> current prerelease — JSR has no dist-tags, hence the range there. Exact
|
|
17
|
-
> versions are in the [CHANGELOG](CHANGELOG.md). The beta adds the generic
|
|
18
|
-
> document viewer and attachment workflows, so test it with the MCP host your
|
|
19
|
-
> users actually run before replacing a stable deployment.
|
|
20
|
-
|
|
21
12
|
Let any MCP-compatible AI agent operate your [ERPNext](https://erpnext.com) /
|
|
22
13
|
Frappe instance — documents, workflows, and interactive viewers inside the host
|
|
23
14
|
(Claude Desktop, Claude Code, VS Code Copilot, or custom).
|
|
@@ -78,16 +69,20 @@ results.
|
|
|
78
69
|
|
|
79
70
|
## What's New
|
|
80
71
|
|
|
72
|
+
**3.1.0 is the stable release.** KPI and funnel viewers now use the refreshed
|
|
73
|
+
interface and support selecting context for the next conversation turn.
|
|
74
|
+
Recognized creation errors include recovery guidance in the existing tools. The
|
|
75
|
+
other five viewers keep their existing interactions.
|
|
76
|
+
|
|
77
|
+
For stable npm installations use `@casys/mcp-erpnext@latest`; for Deno use
|
|
78
|
+
`jsr:@casys/mcp-erpnext@3.1.0/server`. The separate 3.2 beta remains on npm
|
|
79
|
+
`@next` and includes the generic document viewer, attachment workflows and Buy
|
|
80
|
+
evidence features.
|
|
81
|
+
|
|
81
82
|
See the [CHANGELOG](CHANGELOG.md) for the full release history, or the
|
|
82
83
|
[latest release](https://github.com/Casys-AI/mcp-erpnext/releases/latest) for
|
|
83
84
|
the current version's highlights.
|
|
84
85
|
|
|
85
|
-
> **3.1 beta preview:** the beta keeps the 3.0 tool surface and adds a generic
|
|
86
|
-
> document viewer, child tables, document attachments, in-view navigation, and
|
|
87
|
-
> active context. Features remain capability-gated by the MCP host. In
|
|
88
|
-
> particular, downloads require both proxied server tools and the MCP Apps
|
|
89
|
-
> `downloadFile` capability.
|
|
90
|
-
|
|
91
86
|
## Documentation
|
|
92
87
|
|
|
93
88
|
Organised by what you are doing, following [Diátaxis](https://diataxis.fr):
|
|
@@ -192,52 +187,52 @@ until it exists. See
|
|
|
192
187
|
|
|
193
188
|
## UI Viewers
|
|
194
189
|
|
|
195
|
-
|
|
190
|
+
Seven interactive [MCP Apps](https://github.com/modelcontextprotocol/ext-apps)
|
|
196
191
|
viewers, registered as `ui://mcp-erpnext/{name}`:
|
|
197
192
|
|
|
198
|
-
| Viewer | Description
|
|
199
|
-
| ---------------- |
|
|
200
|
-
| `
|
|
201
|
-
| `
|
|
202
|
-
| `
|
|
203
|
-
| `
|
|
204
|
-
| `
|
|
205
|
-
| `
|
|
206
|
-
| `
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
193
|
+
| Viewer | Description | Interactive Features |
|
|
194
|
+
| ---------------- | ----------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
195
|
+
| `doclist-viewer` | Generic document table with sort, filter, pagination, CSV export | Row click → inline detail panel with Submit/Cancel + sendMessage navigation. Chip filters for status columns. Max 6 columns, rest in detail panel. |
|
|
196
|
+
| `invoice-viewer` | Sales/Purchase Invoice with parties, items, totals | Item click → stock balance + item info panel. Submit/Cancel/Payment actions. sendMessage to payment entries and customer invoices. |
|
|
197
|
+
| `stock-viewer` | Stock balance table with color-coded qty badges | Row click → item info + recent movements. sendMessage to stock chart, item details, stock entries. |
|
|
198
|
+
| `chart-viewer` | Universal chart renderer (12 types via Recharts) | Click bar/pie/line data points → sendMessage drill-down into underlying documents. |
|
|
199
|
+
| `kanban-viewer` | Read-write kanban for Task, Opportunity, Issue | Drag-and-drop moves, inline edit (priority, progress, dates), sendMessage to Timesheets/Quotations/Related docs. |
|
|
200
|
+
| `kpi-viewer` | Responsive KPI card with delta and monthly trend | Select trend data/months as context; double-click or Enter requests details in the conversation. Scalar-only KPIs have no selection control. |
|
|
201
|
+
| `funnel-viewer` | Responsive sales funnel with stage counts, amounts and conversion rates | Click/Space selects or removes a stage from context; double-click, Enter or the explicit Ask button requests details in the conversation. |
|
|
202
|
+
|
|
203
|
+
### Context selection in KPI and funnel
|
|
204
|
+
|
|
205
|
+
On hosts that support `app.updateModelContext()`, selecting an element prepares
|
|
206
|
+
context for the next conversation turn. It does not send a chat message. Click
|
|
207
|
+
again or use the Context control to remove a selection or clear the basket.
|
|
208
|
+
Pending and rejected updates are shown separately from confirmed selections.
|
|
209
|
+
Refreshing keeps the selections that still exist and updates their values.
|
|
210
|
+
|
|
211
|
+
KPI and funnel use the new Preact/Tailwind interface. The other five viewers
|
|
212
|
+
retain their existing React interface and interactions. Detail requests in these
|
|
213
|
+
two viewers use the conversation; they do not open nested document editors.
|
|
214
|
+
|
|
215
|
+
### Cross-viewer navigation
|
|
216
|
+
|
|
217
|
+
Viewers communicate via `app.sendMessage()` — clicking a button in one viewer
|
|
218
|
+
sends a request to the conversation for the assistant to open the requested
|
|
219
|
+
data.
|
|
220
|
+
|
|
221
|
+
The server auto-injects navigation metadata into tool results:
|
|
222
|
+
|
|
223
|
+
- `_rowAction` — which tool to call when a row is clicked
|
|
224
|
+
- `_sendMessageHints` — navigation buttons shown in detail panels (e.g.
|
|
225
|
+
"Orders", "Invoices")
|
|
226
|
+
- `_drillDown` / `_trendDrillDown` — sendMessage templates for KPI and chart
|
|
227
|
+
click-through
|
|
231
228
|
|
|
232
229
|
### Refresh model
|
|
233
230
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
as stale; each marker is removed only when that surface has actually been read
|
|
240
|
-
again. Separate MCP Apps are not synchronized automatically in the 3.1 beta.
|
|
231
|
+
All viewers carry a `refreshRequest` payload for safe revalidation via
|
|
232
|
+
`app.callServerTool()`:
|
|
233
|
+
|
|
234
|
+
- `kanban-viewer` revalidates after mutations and on focus
|
|
235
|
+
- All other viewers support focus refresh + manual refresh button
|
|
241
236
|
|
|
242
237
|
### Building UI viewers
|
|
243
238
|
|
|
@@ -249,11 +244,8 @@ node build-all.mjs
|
|
|
249
244
|
|
|
250
245
|
## Tools
|
|
251
246
|
|
|
252
|
-
|
|
253
|
-
click, inline detail, and cross-viewer navigation.
|
|
254
|
-
`erpnext_file_list` tool does not render doclist-viewer. Generic and dedicated
|
|
255
|
-
document reads use `doc-viewer`, except Sales Order, Sales Invoice, and
|
|
256
|
-
Quotation, which retain the specialized invoice surface.
|
|
247
|
+
Each `_list` tool returns interactive results via the doclist-viewer with row
|
|
248
|
+
click, inline detail, and cross-viewer navigation.
|
|
257
249
|
|
|
258
250
|
- **Sales** — Customers, Sales Orders, Invoices, and Quotations with full CRUD,
|
|
259
251
|
Submit, and Cancel.
|
|
@@ -268,9 +260,9 @@ Quotation, which retain the specialized invoice surface.
|
|
|
268
260
|
- **Manufacturing** — BOMs, Work Orders, and Job Cards.
|
|
269
261
|
- **CRM** — Leads, Opportunities, Contacts, and Campaigns.
|
|
270
262
|
- **Assets** — Assets, Movements, Maintenance records, and Categories.
|
|
271
|
-
- **Operations** — Generic CRUD, native assignment,
|
|
272
|
-
|
|
273
|
-
|
|
263
|
+
- **Operations** — Generic CRUD, native assignment, file upload, and
|
|
264
|
+
deny-by-default Frappe method calls (`erpnext_doc_*`, `erpnext_file_upload`,
|
|
265
|
+
`erpnext_method_call`).
|
|
274
266
|
- **Kanban** — Read-write boards for Task, Opportunity, and Issue with
|
|
275
267
|
drag-and-drop.
|
|
276
268
|
- **Analytics** — Charts (bar, area, treemap, radar, scatter, P&L…), KPIs with
|
|
@@ -281,15 +273,14 @@ Full per-tool reference with parameters: [`docs/tools.md`](docs/tools.md).
|
|
|
281
273
|
|
|
282
274
|
## Environment Variables
|
|
283
275
|
|
|
284
|
-
| Variable
|
|
285
|
-
|
|
|
286
|
-
| `ERPNEXT_URL`
|
|
287
|
-
| `ERPNEXT_API_KEY`
|
|
288
|
-
| `ERPNEXT_API_SECRET`
|
|
289
|
-
| `ERPNEXT_MAX_UPLOAD_BYTES`
|
|
290
|
-
| `
|
|
291
|
-
| `
|
|
292
|
-
| `MCP_MRTR_SIGNING_KEY` | No | Exactly 64 lowercase hex characters; enables signed ambiguous-link elicitation. **Single-instance deployments only** — see below |
|
|
276
|
+
| Variable | Required | Description |
|
|
277
|
+
| -------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
278
|
+
| `ERPNEXT_URL` | Yes | ERPNext base URL — self-hosted (e.g. `http://localhost:8000`) or cloud (e.g. `https://mycompany.erpnext.com`) |
|
|
279
|
+
| `ERPNEXT_API_KEY` | Yes | API Key from User Settings |
|
|
280
|
+
| `ERPNEXT_API_SECRET` | Yes | API Secret from User Settings |
|
|
281
|
+
| `ERPNEXT_MAX_UPLOAD_BYTES` | No | Maximum decoded file-upload size in bytes (positive integer; default: 10 MiB) |
|
|
282
|
+
| `ERPNEXT_METHOD_ALLOWLIST` | No | Comma-separated exact method paths or `prefix.*`; unset means `erpnext_method_call` denies every method, while `*` allows all |
|
|
283
|
+
| `MCP_MRTR_SIGNING_KEY` | No | Exactly 64 lowercase hex characters; enables signed ambiguous-link elicitation. **Single-instance deployments only** — see below |
|
|
293
284
|
|
|
294
285
|
MRTR is opt-in. Without this key, or when the client does not advertise
|
|
295
286
|
elicitation, ambiguous links keep returning the existing actionable ambiguity
|