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