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
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_documentsB

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

get_documentA

Get a single document by DocType and name.

create_documentC

Create a new document.

update_documentB

Update an existing document.

delete_documentC

Delete a document.

run_reportC

Execute an ERPNext report.

get_countA

Get document count for a DocType with optional filters.

get_list_with_summaryA

Get a list of documents along with total count.

submit_documentB

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

cancel_documentB

Cancel a submitted document.

run_methodC

Call a server-side method (whitelisted API).

list_doctypesA

List all available DocType names.

search_linkC

Search for link field values (autocomplete).

get_doctype_metaA

Get field definitions for a DocType.

get_stock_balanceA

Get real-time stock balance from Bin (exact match on item_code).

⚠️ 此工具對 item_code 做精確比對。回傳空陣列代表「找不到對應 Bin 紀錄」, 可能是真的零庫存,也可能是 item_code 拼錯或缺少公司前綴(例如系統實際是 CTOS-KV-N40DT 而你只查了 KV-N40DT)。若回傳空陣列,請改用 find_items(keyword=...)get_item_details(keyword=...) 模糊確認

get_item_priceA

Get item prices from Item Price records (exact match on item_code).

⚠️ 對 item_code 做精確比對;空結果可能是 item_code 不存在或無價單。 不確定品項代碼時,先用 find_items(keyword=...) 找正確的 item_code。

make_mapped_docC

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)

get_party_balanceB

Get outstanding balance for a Customer or Supplier.

get_stock_ledgerA

Get stock ledger entries (inventory transaction history; exact match on item_code).

⚠️ 對 item_code 做精確比對;查不到時改用 find_items(keyword=...) 找正確代碼。

find_itemsA

Fuzzy-search Item across name / item_name / item_code (OR like %keyword%).

用途:把使用者口語化的關鍵字(原廠型號、品名片段、部分代碼)解析成系統實際的 item_code。ERPNext 的 Item code 常加公司前綴(例如 CTOS-KV-N40DT), 用原廠型號 KV-N40DT 直接查 get_stock_balance 會找不到——此工具負責橋接。

建議用法:先 find_items 確認 item_code,再 get_stock_balance / get_item_price / get_stock_ledger。或者直接用 get_item_details(keyword=...) 一次取完。

get_item_detailsA

Get full item info (master + stock balance + prices) by exact name or fuzzy keyword.

一次回完整資料,避免 AI 為了查一個品項要連打 3~4 支工具。 解析順序:

  1. 若提供 name → 直接 get

  2. 若提供 keyword → 先試精確 name;找不到 fallback find_items 取第 1 筆候選

upload_file_from_urlA

Upload a file to ERPNext from a URL.

upload_fileC

Upload a local file to ERPNext.

list_filesC

List files in ERPNext, optionally filtered by attachment.

get_file_urlB

Get the full download URL for a file.

download_fileB

Download a file's content from ERPNext.

get_supplier_detailsB

Get complete supplier details including address, phone, and contacts.

get_customer_detailsB

Get complete customer details including address, phone, and contacts.

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