To connect ERPNext to Claude or ChatGPT, build an MCP server on the Frappe REST API that exposes a short list of scoped tools (look up a customer, check stock, draft an invoice) and authenticates as a real ERPNext user. The assistant then works inside that user's roles and permissions. Start read-only, add draft creation once answers are trusted, and keep a person approving anything that posts.
ERPNext holds the answers to most of the questions a business asks every day: what is in stock, who owes us money, what did this customer order last time. Claude and ChatGPT are good at understanding those questions in plain language. An MCP server is how you connect the two without handing an AI model the keys to your ERP.
Why connect an AI assistant to ERPNext
- Answers without reports. "Which customers are past 60 days?" answered from live data in a chat, instead of a report request.
- Less retyping. An emailed purchase order or supplier invoice turned into a draft document for a person to check.
- One integration for every assistant. Because MCP is a standard, the same server works with Claude, ChatGPT and your own agents.
Read-only vs write actions
The most important design decision is what the assistant may change. We split the tools into three tiers:
| Tier | Example tools | Control |
|---|---|---|
| Read | Look up a customer, check stock in a warehouse, list overdue invoices | Runs freely within the user's permissions |
| Draft | Create a draft Sales Order or Purchase Invoice | Saved as a draft; a person submits it |
| Act | Submit or cancel a document, change a price list | Behind an approval gate, or not exposed at all |
Most teams start with read tools only. Draft tools follow once the answers have earned trust. Many never expose the third tier, and that is a reasonable place to stop.
Building the MCP server on the Frappe API
ERPNext is built on the Frappe framework, which exposes every DocType through a REST API (/api/resource/<DocType> for records and /api/method/<path> for server methods). The MCP server sits between the AI client and that API:
- Define the tools. Each tool is a named operation with typed inputs, such as
get_stock_level(item_code, warehouse), rather than a free-form query. - Authenticate as a real ERPNext user. The server calls the Frappe API with API keys tied to a user, so ERPNext's own role permissions decide what each call can see.
- Shape the answers. Return the fields the assistant needs, not whole documents, to keep responses fast and avoid exposing data nobody asked for.
- Deploy next to ERPNext. On the same network as a self-hosted instance, or alongside a Frappe Cloud site.
Permissions and audit
The rule we build to: the AI can never see or do more than the person using it. In practice that means per-user credentials rather than one shared admin key, ERPNext's role permissions and validation rules applied to every call, and a log of every tool call (who asked, which tool ran, what changed) alongside ERPNext's own version history. Credentials stay on the server, never in the conversation.
Example workflows
- Invoice entry: a supplier invoice arrives by email; the assistant reads it, matches the supplier and items, and creates a draft Purchase Invoice for the accounts team to check and submit.
- Stock queries: a salesperson asks "how many units of this item can we ship this week?" and gets an answer from live warehouse data, with the source document linked.
- Receivables: "summarise what this customer owes and their last three orders" before a call, in one question.
- Order drafting: a customer's emailed order becomes a draft Sales Order, checked against the price list before anyone touches it.
What it costs
A connector into one live system like ERPNext, with authentication and permission scoping, typically runs $15k–$40k, and a read-only first version usually reaches production in 3–4 weeks. A broader ERPNext AI rollout that combines an MCP server with a chat assistant and several automated document types typically runs $30k–$80k. Our MCP server cost guide breaks the ranges down.
We build these as part of our ERPNext AI integration work, on the same foundations as our custom MCP server development services.
Common questions
Can ChatGPT or Claude connect to ERPNext?
Yes, through an MCP server built on the Frappe REST API. The server exposes scoped tools such as customer lookup, stock checks and draft invoices, and any MCP-compatible assistant, including Claude and ChatGPT, can use them within the permissions of the ERPNext user it authenticates as.
Is it safe to give an AI assistant access to ERPNext?
It is when access goes through scoped tools rather than open database access, authenticates as a real user so ERPNext role permissions apply, saves anything it creates as a draft for a person to submit, and logs every call. Starting read-only is the safest first step.
Does this work with self-hosted ERPNext and Frappe Cloud?
Yes. The MCP server talks to the standard Frappe REST API, which both self-hosted ERPNext and Frappe Cloud sites expose. For self-hosted instances it can run inside your own network, so ERPNext never has to be exposed to the internet.
How much does an ERPNext MCP server cost?
A connector into ERPNext with authentication and permission scoping typically costs $15,000–$40,000, with a read-only first version in 3–4 weeks. A broader rollout with a chat assistant and several automated document types typically runs $30,000–$80,000.