call_method
Call an ERPNext/Frappe whitelisted server-side API method. Can invoke any whitelisted method — use with caution. Args are passed as JSON body (POST) or query params (GET).
Read and write any ERPNext DocType, including the submit and cancel steps its document workflow insists on, without a tool per business object.
LABSCO SUMMARY
Because the eleven tools are DocType-generic, nothing has to be added when your instance grows a new document type — get_doctype_fields tells the assistant what that record accepts before it writes one. call_method is the escape hatch for everything CRUD does not name, reaching any whitelisted Frappe method on the server.
A generic ERPNext and Frappe client. Eleven tools operate over any DocType: discover which exist, read their fields, query documents, create and update them, and move them through the submit and cancel lifecycle.
A running ERPNext instance reachable at the address you put in ERPNEXT_URL, an API key and secret from it for ERPNEXT_API_KEY and ERPNEXT_API_SECRET (the project lists both as optional), and Node.js with npm to build the checkout the config points at.
Build from source
USE CASES
Find which DocTypes the instance has, read the fields on the one you want, then query documents with your own filters and field selection rather than through a report someone built earlier.
The field list says what the record actually accepts before anything is written, and the submit step is separate — a created document is a draft until docstatus moves to 1.
ERPNext will not let a submitted document be edited, so the sequence is cancel, then create the corrected copy — and deletion only becomes available after the cancel.
Reports run by name with their filters, and any row worth following up is fetched whole with its child tables and linked data attached.
Any whitelisted server-side method can be called directly with arguments as a JSON body or query parameters, which covers the business logic that lives in methods rather than in documents.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
call_methodCall an ERPNext/Frappe whitelisted server-side API method. Can invoke any whitelisted method — use with caution. Args are passed as JSON body (POST) or query params (GET).
cancel_documentCancel a submitted document (set docstatus to 2). Cancelled documents cannot be modified — use amend workflow to create a corrected copy.
create_documentCreate a new document in ERPNext
delete_documentPermanently delete a document from ERPNext. This action cannot be undone. Submitted documents must be cancelled before deletion.
get_doctype_fieldsGet fields list for a specific DocType
get_doctypesGet a list of all available DocTypes
get_documentGet a single document by DocType and name, including all child tables and linked data
get_documentsGet a list of documents for a specific doctype
run_reportRun an ERPNext report
submit_documentSubmit a document (set docstatus to 1). Only works on submittable doctypes. Submitted documents can only be cancelled, not reverted to draft.
update_documentUpdate an existing document in ERPNext
BEFORE YOU INSTALL
11 tools when we connected.
Both documented clients run the server on your machine.
CONTEXT COST
Rated by the size of the 11 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
You clone and build this one yourself.
git clone https://github.com/rakeshgangwar/erpnext-mcp-server
cd erpnext-mcp-server
npm install
npm run build{
"mcpServers": {
"erpnext": {
"command": "node",
"args": [
"<YOUR_PATH_TO_ERPNEXT_SERVER>/build/index.js"
],
"env": {
"ERPNEXT_URL": "<YOUR_ERPNEXT_URL>",
"ERPNEXT_API_KEY": "<YOUR_ERPNEXT_API_KEY>",
"ERPNEXT_API_SECRET": "<YOUR_ERPNEXT_API_SECRET>"
}
}
}
}