Skip to main content
Glama
yazelin

ERPNext MCP Server

by yazelin

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ERPNEXT_URLYesThe URL of your ERPNext instance (e.g., https://your-erpnext-instance.com)
ERPNEXT_API_KEYYesYour ERPNext API key
ERPNEXT_API_SECRETYesYour ERPNext API secret

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tasks
{
  "list": {},
  "cancel": {},
  "requests": {
    "tools": {
      "call": {}
    },
    "prompts": {
      "get": {}
    },
    "resources": {
      "read": {}
    }
  }
}
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_documents

List documents of a given DocType with optional filtering, sorting and pagination.

Args: doctype: ERPNext DocType name (e.g. "Sales Order", "Customer") fields: List of field names to return. Defaults to ["name"]. filters: JSON string of filters, e.g. '{"status": "Open"}' or '[["status","=","Open"]]' or_filters: JSON string of OR filters order_by: Sort expression, e.g. "creation desc" limit_start: Pagination offset limit_page_length: Number of records to return (max 100)

get_document

Get a single document by DocType and name.

Args: doctype: ERPNext DocType name name: Document name/ID fields: Optional list of fields to return

create_document

Create a new document.

Args: doctype: ERPNext DocType name data: JSON string of field values, e.g. '{"customer_name": "Test", "customer_type": "Individual"}'

update_document

Update an existing document.

Args: doctype: ERPNext DocType name name: Document name/ID data: JSON string of fields to update

delete_document

Delete a document.

Args: doctype: ERPNext DocType name name: Document name/ID

run_report

Execute an ERPNext report.

Args: report_name: Name of the report filters: Optional JSON string of report filters

get_count

Get document count for a DocType with optional filters.

Args: doctype: ERPNext DocType name filters: Optional JSON string of filters

get_list_with_summary

Get a list of documents along with total count.

Args: doctype: ERPNext DocType name fields: Fields to return filters: Optional JSON string of filters order_by: Sort expression limit_page_length: Number of records

submit_document

Submit a submittable document (e.g. Sales Invoice).

Args: doctype: ERPNext DocType name name: Document name/ID

cancel_document

Cancel a submitted document.

Args: doctype: ERPNext DocType name name: Document name/ID

run_method

Call a server-side method (whitelisted API).

Args: method: Dotted method path, e.g. "frappe.client.get_list" or "erpnext.selling.doctype.sales_order.sales_order.make_delivery_note" http_method: GET or POST (default POST) args: Optional JSON string of keyword arguments

list_doctypes

List all available DocType names.

Args: module: Optional module filter (e.g. "Selling", "Stock", "Accounts") is_submittable: Optional filter for submittable doctypes only limit: Max results (default 100)

search_link

Search for link field values (autocomplete).

Args: doctype: DocType to search in txt: Search text filters: Optional JSON string of filters page_length: Max results

get_doctype_meta

Get field definitions for a DocType.

Args: doctype: ERPNext DocType name

get_stock_balance

Get real-time stock balance from Bin.

Args: item_code: Optional item code to filter warehouse: Optional warehouse to filter

get_item_price

Get item prices from Item Price records.

Args: item_code: Item code to look up price_list: Optional price list name to filter (e.g. "Standard Selling")

make_mapped_doc

Create a new document mapped from an existing one (document conversion).

Common methods:

  • erpnext.selling.doctype.quotation.quotation.make_sales_order (Quotation → Sales Order)

  • erpnext.selling.doctype.sales_order.sales_order.make_delivery_note (Sales Order → Delivery Note)

  • erpnext.selling.doctype.sales_order.sales_order.make_sales_invoice (Sales Order → Sales Invoice)

  • erpnext.stock.doctype.delivery_note.delivery_note.make_sales_invoice (Delivery Note → Sales Invoice)

  • erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_receipt (PO → Purchase Receipt)

  • erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_invoice (PO → Purchase Invoice)

Args: method: Dotted path of the mapping method source_name: Name/ID of the source document

get_party_balance

Get outstanding balance for a Customer or Supplier.

Args: party_type: "Customer" or "Supplier" party: Party name/ID

get_stock_ledger

Get stock ledger entries (inventory transaction history).

Args: item_code: Optional item code filter warehouse: Optional warehouse filter limit: Max records to return (default 50)

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yazelin/erpnext-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server