@casys/mcp-erpnext 2.4.2 → 2.6.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 +53 -37
- package/mcp-erpnext.mjs +1604 -646
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
English | [繁體中文](README.zh-TW.md)
|
|
2
|
+
|
|
1
3
|
# @casys/mcp-erpnext
|
|
2
4
|
|
|
3
5
|
[](https://jsr.io/@casys/mcp-erpnext)
|
|
@@ -6,7 +8,7 @@
|
|
|
6
8
|
[](https://modelcontextprotocol.io)
|
|
7
9
|
[](LICENSE)
|
|
8
10
|
|
|
9
|
-
MCP server for [ERPNext](https://erpnext.com) / Frappe ERP — **
|
|
11
|
+
MCP server for [ERPNext](https://erpnext.com) / Frappe ERP — **124 tools**
|
|
10
12
|
across **14 categories**, with **7 interactive UI viewers**.
|
|
11
13
|
|
|
12
14
|
Connect any MCP-compatible AI agent (Claude Desktop, Claude Code, VS Code
|
|
@@ -15,6 +17,10 @@ Copilot, custom) to your ERPNext instance via the
|
|
|
15
17
|
|
|
16
18
|
Works with **self-hosted** and **ERPNext Cloud** (frappe.cloud) instances.
|
|
17
19
|
|
|
20
|
+
> Built on **[@casys/mcp-server](https://github.com/Casys-AI/mcp-server)** — the
|
|
21
|
+
> MCP server framework (concurrency, auth, MCP Apps, observability) that powers
|
|
22
|
+
> this project.
|
|
23
|
+
|
|
18
24
|
## Screenshots
|
|
19
25
|
|
|
20
26
|
Interactive viewers rendered inside an MCP host, driven entirely by tool
|
|
@@ -101,8 +107,6 @@ Generate API credentials in ERPNext:
|
|
|
101
107
|
> (e.g. `https://mycompany.erpnext.com` or `https://mysite.frappe.cloud`). API
|
|
102
108
|
> key authentication works the same way on self-hosted and cloud instances.
|
|
103
109
|
|
|
104
|
-
> Zero dependencies — single self-contained bundle. Requires Node >= 20.
|
|
105
|
-
|
|
106
110
|
### VS Code Copilot
|
|
107
111
|
|
|
108
112
|
Add to `.vscode/mcp.json`:
|
|
@@ -151,6 +155,9 @@ ERPNEXT_API_SECRET=xxx \
|
|
|
151
155
|
npx -y @casys/mcp-erpnext --http --port=3012
|
|
152
156
|
```
|
|
153
157
|
|
|
158
|
+
> **Note:** HTTP mode binds to `127.0.0.1` (loopback) by default as of v2.4.2.
|
|
159
|
+
> For Docker or multi-host setups, add `--hostname=0.0.0.0`.
|
|
160
|
+
|
|
154
161
|
### Deno (HTTP mode)
|
|
155
162
|
|
|
156
163
|
```bash
|
|
@@ -208,8 +215,7 @@ viewers, registered as `ui://mcp-erpnext/{name}`:
|
|
|
208
215
|
|
|
209
216
|
Viewers communicate via `app.sendMessage()` — clicking a button in one viewer
|
|
210
217
|
injects a message into the conversation, which triggers the AI to call the right
|
|
211
|
-
tool and open the appropriate viewer.
|
|
212
|
-
experience without leaving the chat.
|
|
218
|
+
tool and open the appropriate viewer.
|
|
213
219
|
|
|
214
220
|
The server auto-injects navigation metadata into tool results:
|
|
215
221
|
|
|
@@ -235,38 +241,43 @@ npm install
|
|
|
235
241
|
node build-all.mjs
|
|
236
242
|
```
|
|
237
243
|
|
|
238
|
-
## Tools (
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
244
|
+
## Tools (124)
|
|
245
|
+
|
|
246
|
+
124 tools across 14 categories. Each `_list` tool returns interactive results
|
|
247
|
+
via the doclist-viewer with row click, inline detail, and cross-viewer
|
|
248
|
+
navigation.
|
|
249
|
+
|
|
250
|
+
- **Sales** (17) — Customers, Sales Orders, Invoices, and Quotations with full
|
|
251
|
+
CRUD, Submit, and Cancel.
|
|
252
|
+
- **Purchasing** (11) — Suppliers, Purchase Orders, Purchase Invoices, Receipts,
|
|
253
|
+
and Supplier Quotations.
|
|
254
|
+
- **Inventory** (9) — Items, Stock Balance, Warehouses, and Stock Entries.
|
|
255
|
+
- **Accounting** (6) — Chart of Accounts, Journal Entries, and Payment Entries.
|
|
256
|
+
- **HR** (12) — Employees, Attendance, Leave Applications, Salary Slips, Payroll
|
|
257
|
+
Entries, and Expense Claims.
|
|
258
|
+
- **Project** (9) — Projects, Tasks (with native assignment), and Timesheets.
|
|
259
|
+
- **Delivery** (5) — Delivery Notes and Shipments.
|
|
260
|
+
- **Manufacturing** (7) — BOMs, Work Orders, and Job Cards.
|
|
261
|
+
- **CRM** (8) — Leads, Opportunities, Contacts, and Campaigns.
|
|
262
|
+
- **Assets** (8) — Assets, Movements, Maintenance records, and Categories.
|
|
263
|
+
- **Operations** (10) — Generic CRUD, native assignment, and file upload for any
|
|
264
|
+
DocType (`erpnext_doc_*`, `erpnext_file_upload`).
|
|
265
|
+
- **Kanban** (2) — Read-write boards for Task, Opportunity, and Issue with
|
|
266
|
+
drag-and-drop.
|
|
267
|
+
- **Analytics** (17) — 11 analytics charts (bar, area, treemap, radar, scatter,
|
|
268
|
+
P&L…), 5 KPIs with sparklines, and a sales funnel.
|
|
269
|
+
- **Setup** (3) — Company creation and assignable user listing.
|
|
270
|
+
|
|
271
|
+
Full per-tool reference with parameters: [`docs/tools.md`](docs/tools.md).
|
|
262
272
|
|
|
263
273
|
## Environment Variables
|
|
264
274
|
|
|
265
|
-
| Variable
|
|
266
|
-
|
|
|
267
|
-
| `ERPNEXT_URL`
|
|
268
|
-
| `ERPNEXT_API_KEY`
|
|
269
|
-
| `ERPNEXT_API_SECRET`
|
|
275
|
+
| Variable | Required | Description |
|
|
276
|
+
| -------------------------- | -------- | ------------------------------------------------------------------------------------------------------------- |
|
|
277
|
+
| `ERPNEXT_URL` | Yes | ERPNext base URL — self-hosted (e.g. `http://localhost:8000`) or cloud (e.g. `https://mycompany.erpnext.com`) |
|
|
278
|
+
| `ERPNEXT_API_KEY` | Yes | API Key from User Settings |
|
|
279
|
+
| `ERPNEXT_API_SECRET` | Yes | API Secret from User Settings |
|
|
280
|
+
| `ERPNEXT_MAX_UPLOAD_BYTES` | No | Maximum decoded file-upload size in bytes (positive integer; default: 10 MiB) |
|
|
270
281
|
|
|
271
282
|
## Architecture
|
|
272
283
|
|
|
@@ -293,8 +304,8 @@ src/
|
|
|
293
304
|
manufacturing.ts # 7 manufacturing tools
|
|
294
305
|
crm.ts # 8 CRM tools
|
|
295
306
|
assets.ts # 8 asset tools
|
|
296
|
-
operations.ts #
|
|
297
|
-
setup.ts #
|
|
307
|
+
operations.ts # 10 generic operations tools
|
|
308
|
+
setup.ts # 3 company/setup tools
|
|
298
309
|
kanban.ts # 2 read-write kanban tools
|
|
299
310
|
analytics.ts # 17 analytics tools (charts, KPIs, funnel)
|
|
300
311
|
ui-refresh.ts # Auto-inject _rowAction, _sendMessageHints, _drillDown
|
|
@@ -322,7 +333,7 @@ docs/
|
|
|
322
333
|
## npm Package
|
|
323
334
|
|
|
324
335
|
The npm package (`@casys/mcp-erpnext`) is a single self-contained bundle with
|
|
325
|
-
zero runtime dependencies. UI viewers are embedded.
|
|
336
|
+
zero runtime dependencies. UI viewers are embedded. Requires Node >= 20.
|
|
326
337
|
|
|
327
338
|
## Development
|
|
328
339
|
|
|
@@ -349,6 +360,11 @@ deno task release:check
|
|
|
349
360
|
cd src/ui && npm run dev:kanban
|
|
350
361
|
```
|
|
351
362
|
|
|
363
|
+
## Contributing
|
|
364
|
+
|
|
365
|
+
Contributions are welcome — see **[CONTRIBUTING.md](CONTRIBUTING.md)** to get
|
|
366
|
+
started, and [AGENTS.md](AGENTS.md) for the full architecture and conventions.
|
|
367
|
+
|
|
352
368
|
## Release Flow
|
|
353
369
|
|
|
354
370
|
Releases are manual and explicit:
|