@casys/mcp-erpnext 3.2.0-beta.1 → 3.2.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/README.md +76 -38
- package/THIRD_PARTY_NOTICES.txt +934 -58
- package/mcp-erpnext.mjs +1323 -269
- package/package.json +1 -1
- package/ui-dist/buy-evidence-viewer/index.html +40 -40
- package/ui-dist/chart-viewer/index.html +32 -32
- package/ui-dist/doc-viewer/index.html +41 -41
- package/ui-dist/doclist-viewer/index.html +32 -32
- package/ui-dist/funnel-viewer/index.html +30 -30
- package/ui-dist/invoice-viewer/index.html +40 -40
- package/ui-dist/kanban-viewer/index.html +40 -40
- package/ui-dist/kpi-viewer/index.html +41 -41
- package/ui-dist/stock-viewer/index.html +29 -29
package/README.md
CHANGED
|
@@ -4,20 +4,19 @@ English | [繁體中文](README.zh-TW.md)
|
|
|
4
4
|
|
|
5
5
|
[](https://jsr.io/@casys/mcp-erpnext)
|
|
6
6
|
[](https://www.npmjs.com/package/@casys/mcp-erpnext)
|
|
7
|
-
[](https://github.com/Casys-AI/mcp-erpnext/actions/workflows/test.yml)
|
|
8
8
|
[](https://modelcontextprotocol.io)
|
|
9
9
|
[](https://m8ven.ai/mcp/casys-ai-mcp-erpnext-1kev4k)
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
|
|
12
12
|
> [!IMPORTANT]
|
|
13
|
-
> **Installing
|
|
14
|
-
> `
|
|
15
|
-
>
|
|
16
|
-
>
|
|
17
|
-
>
|
|
18
|
-
>
|
|
19
|
-
>
|
|
20
|
-
> deployment. See the [CHANGELOG](CHANGELOG.md) for release history.
|
|
13
|
+
> **Installing 3.2:** for npm/Node use `npx -y @casys/mcp-erpnext@latest`; for
|
|
14
|
+
> Deno use `deno run -A jsr:@casys/mcp-erpnext@3.2.0/server`. 3.2.0 is the
|
|
15
|
+
> stable release and carries npm's `latest` tag; prereleases, when published,
|
|
16
|
+
> use the `next` tag. 3.2 adds the generic document viewer and attachment
|
|
17
|
+
> workflows, so test it with the MCP host your users actually run before
|
|
18
|
+
> replacing an existing deployment. See the [CHANGELOG](CHANGELOG.md) for
|
|
19
|
+
> release history.
|
|
21
20
|
|
|
22
21
|
Let any MCP-compatible AI agent operate your [ERPNext](https://erpnext.com) /
|
|
23
22
|
Frappe instance — documents, workflows, and interactive viewers inside the host
|
|
@@ -80,28 +79,44 @@ results.
|
|
|
80
79
|
|
|
81
80
|
## What's New
|
|
82
81
|
|
|
82
|
+
**3.2.0 is the stable release.** All nine viewers navigate inside the view with
|
|
83
|
+
back and breadcrumb navigation, and a confirmed document change marks the
|
|
84
|
+
derived levels stale until they are read again. Active-context selection covers
|
|
85
|
+
the interactive viewers, and chart, KPI and nested-chart details open from a
|
|
86
|
+
visible button on touch screens. The generic document viewer, child tables and
|
|
87
|
+
attachment workflows follow ERPNext's own DocType metadata. Tool-selection
|
|
88
|
+
filters (`ERPNEXT_CATEGORIES`, `ERPNEXT_EXCLUDE_CATEGORIES`,
|
|
89
|
+
`ERPNEXT_EXCLUDE_TOOLS`) limit what a deployment exposes, attachment downloads
|
|
90
|
+
are refused to clients that do not announce MCP Apps, and errors are structured.
|
|
91
|
+
Viewer enrichment (refresh requests, navigation jumps, tool manifests) travels
|
|
92
|
+
in `_meta`, out of the model's context, instead of the result text.
|
|
93
|
+
|
|
94
|
+
3.2.0 also carries the creation-error guidance, ERPNext 16 Opportunity
|
|
95
|
+
compatibility, calendar-date, KPI percentage and funnel currency fixes of the
|
|
96
|
+
stable 3.0.5 and 3.1.0 releases. Features remain capability-gated by the MCP
|
|
97
|
+
host; Buy evidence does not purchase or qualify a live ERP.
|
|
98
|
+
|
|
99
|
+
For stable npm installations use `@casys/mcp-erpnext@latest`; for Deno use
|
|
100
|
+
`jsr:@casys/mcp-erpnext@3.2.0/server`.
|
|
101
|
+
|
|
83
102
|
See the [CHANGELOG](CHANGELOG.md) for the full release history, or the
|
|
84
|
-
[latest release](https://github.com/
|
|
85
|
-
|
|
103
|
+
[latest release](https://github.com/Casys-AI/mcp-erpnext/releases/latest) for
|
|
104
|
+
the current version's highlights.
|
|
86
105
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
> attachments, in-view navigation and recorded Buy evidence. KPI percentage
|
|
91
|
-
> changes, funnel currencies and context clearing on unsupported hosts are also
|
|
92
|
-
> corrected. Features remain capability-gated by the MCP host; Buy evidence does
|
|
93
|
-
> not purchase or qualify a live ERP.
|
|
106
|
+
See the [3.0 to 3.1 migration guide](docs/migration-3.0-to-3.1.md) for the
|
|
107
|
+
source contracts, host requirements, and deployment limits carried into 3.2; it
|
|
108
|
+
applies when upgrading from 3.0 or from stable 3.1.0.
|
|
94
109
|
|
|
95
110
|
## Documentation
|
|
96
111
|
|
|
97
112
|
Organised by what you are doing, following [Diátaxis](https://diataxis.fr):
|
|
98
113
|
|
|
99
|
-
| |
|
|
100
|
-
| ------------------------------------- |
|
|
101
|
-
| **Learning** — never used this before | [Your first tool call](docs/tutorial-first-tool-call.md) — from nothing to a working response in four steps
|
|
102
|
-
| **Doing** — you have a specific goal | [Seed a blank ERPNext instance](docs/fresh-instance-setup.md) · [Run the HTTP server](docs/http-deployment.md) · [Set up OAuth](docs/oauth-setup.md) · [Migrate to 2026-07-28](docs/migration-mcp-spec-2026-07-28.md) |
|
|
103
|
-
| **Looking something up** | [Tools](docs/tools.md) · [Environment variables](docs/environment-variables.md) · [DocType coverage](docs/coverage.md)
|
|
104
|
-
| **Understanding why** | [Concepts](docs/concepts.md) — link resolution, transports, MRTR, and which cache does what · [ERPNext quirks](docs/erpnext-quirks.md)
|
|
114
|
+
| | |
|
|
115
|
+
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
116
|
+
| **Learning** — never used this before | [Your first tool call](docs/tutorial-first-tool-call.md) — from nothing to a working response in four steps |
|
|
117
|
+
| **Doing** — you have a specific goal | [Seed a blank ERPNext instance](docs/fresh-instance-setup.md) · [Run the HTTP server](docs/http-deployment.md) · [Set up OAuth](docs/oauth-setup.md) · [Migrate from 3.0 to 3.1](docs/migration-3.0-to-3.1.md) · [Migrate to 2026-07-28](docs/migration-mcp-spec-2026-07-28.md) |
|
|
118
|
+
| **Looking something up** | [Tools](docs/tools.md) · [Environment variables](docs/environment-variables.md) · [DocType coverage](docs/coverage.md) |
|
|
119
|
+
| **Understanding why** | [Concepts](docs/concepts.md) — link resolution, transports, MRTR, and which cache does what · [ERPNext quirks](docs/erpnext-quirks.md) |
|
|
105
120
|
|
|
106
121
|
## Quick Start
|
|
107
122
|
|
|
@@ -188,6 +203,19 @@ Load only the categories you need:
|
|
|
188
203
|
npx -y @casys/mcp-erpnext --categories=sales,inventory
|
|
189
204
|
```
|
|
190
205
|
|
|
206
|
+
Category and individual-tool exclusions are also supported, with
|
|
207
|
+
environment-variable equivalents:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
deno run -A server.ts --categories=sales,inventory,operations --exclude-tools=erpnext_file_upload,erpnext_doc_delete
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
CLI values override `ERPNEXT_CATEGORIES`, `ERPNEXT_EXCLUDE_CATEGORIES`, and
|
|
214
|
+
`ERPNEXT_EXCLUDE_TOOLS` individually. Excluded tools disappear from calls,
|
|
215
|
+
viewer actions, and cache warm-up. Use `--flag=value`; invalid exclusions or an
|
|
216
|
+
empty server selection fail startup. Full rules:
|
|
217
|
+
[tool selection](docs/environment-variables.md#tool-selection).
|
|
218
|
+
|
|
191
219
|
## Fresh Instance Setup
|
|
192
220
|
|
|
193
221
|
A blank ERPNext instance has no master data, so business tools fail validation
|
|
@@ -211,6 +239,15 @@ viewers, registered as `ui://mcp-erpnext/{name}`:
|
|
|
211
239
|
| `funnel-viewer` | Trapezoid sales funnel with conversion rates | Period-aware stage navigation and bounded active-context selection. |
|
|
212
240
|
| `buy-evidence-viewer` | Immutable sealed Buy evidence (recorded session only) | Complete, partial, unresolved, and unavailable projections; no live ERP refresh or mutation. |
|
|
213
241
|
|
|
242
|
+
Viewers and Buy result fields use the host locale: English, French, Simplified
|
|
243
|
+
Chinese, Traditional Chinese, Hindi, Bengali, Tamil and Urdu. Chinese script
|
|
244
|
+
tags take precedence over region tags; `zh-TW`, `zh-HK` and `zh-MO` select
|
|
245
|
+
Traditional Chinese when no script is specified. Urdu uses right-to-left
|
|
246
|
+
document direction, and a later host locale change updates the language and
|
|
247
|
+
direction without reloading the viewer. App-level waiting and rejection screens
|
|
248
|
+
retain English labels in 3.2; host-context support for those shared surface
|
|
249
|
+
screens remains an upstream MCP View follow-up.
|
|
250
|
+
|
|
214
251
|
### Navigation and active context
|
|
215
252
|
|
|
216
253
|
Viewers progressively select the best interaction supported by the host:
|
|
@@ -219,8 +256,9 @@ Viewers progressively select the best interaction supported by the host:
|
|
|
219
256
|
viewer through `app.callServerTool()`. Back and breadcrumb navigation restore
|
|
220
257
|
the state of each level.
|
|
221
258
|
- `downloadFile` lets the host confirm and save an attachment returned as a
|
|
222
|
-
bounded embedded resource. The
|
|
223
|
-
|
|
259
|
+
bounded embedded resource. The server also requires the MCP client to announce
|
|
260
|
+
the MCP Apps extension and HTML MIME type before serving file bytes. The
|
|
261
|
+
viewer never opens an ERPNext file URL directly.
|
|
224
262
|
- `updateModelContext` lets chart, KPI, and funnel selections join a bounded
|
|
225
263
|
active-context snapshot. The compact context chip keeps up to eight items and
|
|
226
264
|
lets users remove one item or clear them all. The snapshot contains selected
|
|
@@ -244,7 +282,7 @@ tool is never replayed automatically. Overlapping or stale responses are ignored
|
|
|
244
282
|
when a newer host payload or mutation has already won. A confirmed document
|
|
245
283
|
change marks every potentially derived snapshot in the current navigation stack
|
|
246
284
|
as stale; each marker is removed only when that surface has actually been read
|
|
247
|
-
again. Separate MCP Apps are not synchronized automatically in
|
|
285
|
+
again. Separate MCP Apps are not synchronized automatically in 3.2.
|
|
248
286
|
|
|
249
287
|
### Building UI viewers
|
|
250
288
|
|
|
@@ -254,6 +292,14 @@ npm ci
|
|
|
254
292
|
node build-all.mjs
|
|
255
293
|
```
|
|
256
294
|
|
|
295
|
+
For local iteration, run `deno task ui:dev-host` from the repository root. The
|
|
296
|
+
[local test host](src/ui/dev-host/README.md) uses the actual local MCP server
|
|
297
|
+
and its built viewers, rebuilding and reloading them without restarting the
|
|
298
|
+
desktop client. Open `http://127.0.0.1:5177/?viewer=doclist` for the real
|
|
299
|
+
Company list. The host records viewer context updates but has no connected model
|
|
300
|
+
or conversation; model consumption and conversational actions require a desktop
|
|
301
|
+
host check.
|
|
302
|
+
|
|
257
303
|
## Buy evidence capture
|
|
258
304
|
|
|
259
305
|
**One** read-only tool and **one** recorded App. They do not purchase, create a
|
|
@@ -267,8 +313,9 @@ live ERPNext instance.
|
|
|
267
313
|
caller cannot pass `sourceInstance`, URL, credentials, `capturedAt`, or a
|
|
268
314
|
digest. Digital Thread stores those bytes in its own CAS; this server does not
|
|
269
315
|
keep a second CAS.
|
|
270
|
-
- App: `io.casys.mcp-erpnext.buy-evidence
|
|
271
|
-
`ui://mcp-erpnext/buy-evidence-viewer`
|
|
316
|
+
- App: `io.casys.mcp-erpnext.buy-evidence`, App version `3.1.0` (independent of
|
|
317
|
+
the package version), resource `ui://mcp-erpnext/buy-evidence-viewer`
|
|
318
|
+
(`text/html;profile=mcp-app`), manifest
|
|
272
319
|
`ui://mcp-erpnext/buy-evidence-manifest` (`application/json`),
|
|
273
320
|
`acceptedActions` = `viewer.session.apply` only. Complete, partial,
|
|
274
321
|
unresolved, and unavailable projections stay labelled. No live DocViewer
|
|
@@ -375,12 +422,3 @@ started, and [AGENTS.md](AGENTS.md) for the full architecture and conventions.
|
|
|
375
422
|
## License
|
|
376
423
|
|
|
377
424
|
MIT
|
|
378
|
-
|
|
379
|
-
Viewers and Buy result fields use the host locale: English, French, Simplified
|
|
380
|
-
Chinese, Traditional Chinese, Hindi, Bengali, Tamil and Urdu. Chinese script
|
|
381
|
-
tags take precedence over region tags; `zh-TW`, `zh-HK` and `zh-MO` select
|
|
382
|
-
Traditional Chinese when no script is specified. Urdu uses right-to-left
|
|
383
|
-
document direction, and a later host locale change updates the language and
|
|
384
|
-
direction without reloading the viewer. App-level waiting and rejection screens
|
|
385
|
-
retain English labels in this beta; host-context support for those shared
|
|
386
|
-
surface screens remains an upstream MCP View follow-up.
|