Erpnext MCP Server

A Model Context Protocol server

Local serverstdioTypeScript

What is the Erpnext MCP server?

Connect Erpnext to Claude, Cursor or any other MCP client and it stops being a tab you switch to. A Model Context Protocol server. The erpnext mcp server is what makes that connection.

What the server does

This is a TypeScript-based MCP server that provides integration with ERPNext/Frappe API. It enables AI assistants to interact with ERPNext data and functionality through the Model Context Protocol.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • get_doctypes — Get a list of all available DocTypes
  • get_doctype_fields — Get fields list for a specific DocType
  • get_documents — Get a list of documents for a specific doctype
  • get_document — Get a single document by name, including all child tables
  • create_document — Create a new document in ERPNext
  • update_document — Update an existing document in ERPNext
  • delete_document — Permanently delete a document
  • submit_document — Submit a document (set docstatus to 1)
  • cancel_document — Cancel a submitted document (set docstatus to 2)
  • call_method — Call an ERPNext/Frappe whitelisted server-side API method
  • run_report — Run an ERPNext report
  • Resources — The Resources tool exposed by this server

Installation

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

Credentials and setup notes

Configuration is passed through the environment: ERPNEXT_URL, ERPNEXT_API_KEY, ERPNEXT_API_SECRET. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Where it fits

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Erpnext's toolset — get_doctypes, get_doctype_fields, get_documents and 11 more — is a fair guide to whether it matches your workflow. It is maintained by rakeshgangwar; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Erpnext's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Erpnext.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
get_doctypesGet a list of all available DocTypes
get_doctype_fieldsGet fields list for a specific DocType
get_documentsGet a list of documents for a specific doctype
get_documentGet a single document by name, including all child tables
create_documentCreate a new document in ERPNext
update_documentUpdate an existing document in ERPNext
delete_documentPermanently delete a document
submit_documentSubmit a document (set docstatus to 1)
cancel_documentCancel a submitted document (set docstatus to 2)
call_methodCall an ERPNext/Frappe whitelisted server-side API method
run_reportRun an ERPNext report
ResourcesThe Resources tool exposed by this server.
ToolsThe Tools tool exposed by this server.
DebuggingSince MCP servers communicate over stdio, debugging can be challenging. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector), which is available as a package script:

Configuration

VariableDescriptionRequired
ERPNEXT_URLEndpoint or connection string the server talks to.Yes
ERPNEXT_API_KEYCredential the server authenticates with.Yes
ERPNEXT_API_SECRETCredential the server authenticates with.Yes

Example prompts to try

  • Use Erpnext to get doctypes.
  • Use Erpnext to get doctype fields.
  • Use Erpnext to get documents.

Frequently asked questions

It connects Erpnext to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (get_doctypes, get_doctype_fields, get_documents, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Erpnext directly.