erpnext-mcp-server

MCP.Pizza Chef: rakeshgangwar

Eleven tools cover the whole life of an ERPNext record: list the record types, look up their fields, fetch or list documents, create and update them, submit, cancel, run reports, and call approved server-side functions. Deletion is permanent and happens the moment it is asked for, with no confirmation step and no read-only mode. The address of your ERPNext site plus a key and secret must be set in the configuration, and without both, every single request is refused. You clone and build it yourself.

Data

Use This MCP server To

List every customer added in the last month Create a new item in my product catalog Update a supplier's contact details without opening ERPNext Run a sales report and summarize the numbers Look up one invoice and explain what is on it Submit a draft document once I have checked it

README

ERPNext MCP Server

A Model Context Protocol server for ERPNext integration

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.

Features

Resources

  • Access ERPNext documents via erpnext://{doctype}/{name} URIs
  • JSON format for structured data access

Tools

  • 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

Configuration

The server requires the following environment variables:

  • ERPNEXT_URL - The base URL of your ERPNext instance
  • ERPNEXT_API_KEY (optional) - API key for authentication
  • ERPNEXT_API_SECRET (optional) - API secret for authentication

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

erpnext-mcp-server FAQ

Do I need a key?
Yes. You need the web address of your ERPNext site plus a key and secret generated inside ERPNext. The README calls the key and secret optional, but the code refuses every request unless both are present, so treat them as required.
Can it delete my company's records?
Yes, permanently, and nothing asks you to confirm first. There is no read-only mode and no list of protected record types. Point it at a dedicated ERPNext user with only the permissions you are comfortable handing over.
Where do my credentials go?
Into the settings file of the app that launches it, on your own machine. They are never typed into the conversation and are not sent anywhere except your own ERPNext site.
How hard is setup?
This is a developer job. Nothing is published as a ready-made package, so you download the code, install its parts, build it, and then point your assistant at the built file.
Which apps does it work in?
Claude Desktop and Cline inside VS Code are both documented, and any assistant that can start a local command should work the same way.
The project includes security and rate-limiting write-ups. Are those in force?
No. Those files are proposals for future work. The running code is a single file with no rate limiting, no checking of what it is asked to do, and no audit trail.
Can I use this to raise an invoice?
Yes. It can create the invoice and then finalise it as a separate step, which gives you a chance to read it over before it is committed.
Does it only work with ERPNext?
It addresses any record type by name, so other Frappe-based apps on the same site are reachable too.