# How to connect Claude to ERPNext

> Source: https://netray.co/integrations/erpnext-claude
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Integrations

## Short answer

Connect Claude to ERPNext by exposing the Frappe REST API through a small Model Context Protocol server, then add it as a connector in Claude or call Claude from your own code. Choose the Anthropic API, AWS Bedrock or Google Vertex AI for hosting, or run an open-weight model on-prem if data cannot leave.

## System

ERPNext

## Capability

claude

## Intro

ERPNext users who try Claude tend to start with documents: uploading a supplier contract, asking for a summary of a long Work Order note, or getting help writing a Frappe Server Script. The bigger value comes when Claude can look things up itself, such as the stock of an item across warehouses or the status of a Purchase Order.

Claude supports tool use and the Model Context Protocol, so an ERPNext connector is mostly a question of what tools you expose and how you authenticate. Frappe's uniform DocType API makes the tools easy to write. The design effort goes into permissions and logging.

This page covers the connector route, the three cloud hosting routes for Claude models, and the honest case for an on-prem alternative when your ERPNext sits inside a plant network.

## Use Cases

### Ask questions across DocTypes

**Description:** Ask which Sales Orders will miss their delivery date because a BOM component is below projected quantity, and let Claude call the tools needed to answer.

### Review a supplier contract against POs

**Description:** Upload a contract and have Claude compare payment terms and lead times to what Purchase Orders for that supplier actually carry.

### Customisation help

**Description:** Describe a validation or workflow need and have Claude draft a Server Script, Client Script or custom app hook, which you test on a staging site.

### Month-end explanation

**Description:** Pull General Ledger and Stock Ledger summaries through read-only tools and ask Claude to explain a variance between stock and GL valuation.

### Quality documentation drafts

**Description:** Given a failed Quality Inspection and linked Batch records, draft a non-conformance summary that a quality engineer edits and files.

## System Surface

- Frappe REST API under /api/resource and /api/method, authenticated by API key and secret on a dedicated User, which an MCP server can wrap as tools.
- Whitelisted methods in a custom app that return pre-shaped results, such as an item availability payload that joins Bin, Purchase Order Item and Work Order Item.
- Reports (Query Report and Script Report) callable through frappe.desk.query_report.run, handy as tools because they already encode business logic.
- Role and User Permissions enforcement on every call, which scopes what Claude can see when it uses a limited user.
- Webhooks and Scheduled Job Types for push triggers that start a Claude workflow on events.

## How It Works

### Pick the Claude surface

**Detail:** Use Claude chat with a connector for staff questions, or the API with tool use for embedded workflows. Many teams use both.

### Build the MCP server

**Detail:** Create a server with tools like get_item_availability, get_order_status and run_report. See the ERPNext MCP page for the tool list and auth design.

### Secure the transport

**Detail:** For remote use, serve over HTTPS with authentication and an allow-list. For a single developer machine, a local stdio server is enough.

### Write guidance for Claude

**Detail:** Provide a system prompt or connector description that lists your custom fields, naming rules and the instruction to cite document names and say when no data is found.

### Choose hosting

**Detail:** Decide among the Anthropic API, AWS Bedrock or Google Vertex AI based on where your contracts, region and existing cloud agreements point.

### Pilot with a small group

**Detail:** Give planners and buyers access, review the tool logs weekly and tighten tools that return too much.

## Example Flows

### Late order analysis

**Trigger:** A planner asks, which open Sales Orders are at risk this week and why.

**Steps:**

- Claude calls get_open_sales_orders with a delivery date filter.
- For each order it calls get_item_availability on the line items.
- It checks linked Work Order status and Purchase Order schedule dates.
- It ranks orders by gap and cites the blocking document names.

**Result:** A sourced risk list the planner can verify in the desk and act on.

### Customer quote review

**Trigger:** A salesperson uploads a customer RFQ PDF.

**Steps:**

- Claude extracts requested items, quantities and dates from the PDF.
- It matches them to Items and recent Quotation rates through read-only tools.
- It flags unknown parts and long lead items.
- A person creates the Quotation in ERPNext using the summary.

**Result:** Faster quote preparation with a person still owning the document.

## On Prem

If your ERPNext bench runs on a plant server and policy forbids sending data to a cloud model, Claude itself is not the route, because its models are offered through Anthropic, Bedrock or Vertex rather than as downloadable weights. The same MCP server still works with other clients, so keep the tool layer and pair it with an open-weight model such as Llama, Qwen or Mistral class models served locally with vLLM or Ollama. You lose some reasoning quality on hard questions, so benchmark on your own queries. A hybrid is common: Claude for non-sensitive drafting, a private model for anything that touches ERP data. Netray builds both sides.

## Security

- Review the current data handling terms of the Claude plan or cloud platform you choose, including retention, regional processing and training use.
- Authenticate the MCP server and bind it to one ERPNext API user with narrow roles; never reuse an administrator key.
- Return only needed fields. A tool that returns whole documents leaks bank details and internal remarks.
- Guard against prompt injection from text stored in ERPNext remarks, supplier names or attachments.
- Keep tool-call logs with timestamps, arguments and result sizes in your own audit store.

## Options

### Claude connector over your own MCP server

**Fit:** Staff want conversational lookups and the team can run a small HTTPS service.

**Effort:** A read-only server in days; production hardening takes longer.

### Claude API or Bedrock inside your cloud tenancy

**Fit:** Embedded workflows and organisations that already contract with AWS or Google Cloud.

**Effort:** Developer time for orchestration, evaluation and cost controls.

### Private model with the same tools, via Netray

**Fit:** On-prem benches and regulated data where no cloud model is acceptable.

**Effort:** Pilot sized around GPU capacity and one or two workflows.

## Pitfalls

- Exposing a generic run-any-query tool. Prefer a few purpose-built tools.
- Forgetting that ERPNext permissions are enforced per user, so a tool using an admin key quietly overrides all of them.
- Letting long report outputs flood the context. Paginate and summarise in the tool.
- Skipping evaluation. Keep a list of twenty real questions with known answers and rerun it after every change.
- Assuming a connector exists for your version; check, and be ready to build.

## Faq

### Is there an official Claude connector for ERPNext?

**Answer:** Do not assume so. Community MCP servers for Frappe or ERPNext may exist, but quality and maintenance vary. Review the code, pin a version and test with a limited API user, or build a small server of your own over the REST API.

### Can Claude run on-prem for ERPNext?

**Answer:** Claude models are accessed through Anthropic, AWS Bedrock or Google Vertex AI, not as local weights. For a fully on-prem setup, reuse your ERPNext tool layer with an open-weight model served locally. Many teams keep both options available.

### How is this different from ChatGPT with ERPNext?

**Answer:** The data design is the same: scoped API user, narrow tools, logging. The difference is in the client and hosting options. MCP lets one server serve several clients, so a well-built ERPNext server can work with Claude, ChatGPT and others.

### Can Claude write back to ERPNext?

**Answer:** It can through write tools, but start read-only. If you add writes, limit them to creating Drafts and keep submission human. Log the document names created so reviewers can find and correct them.

### Which hosting route should we choose?

**Answer:** Follow your contracts and region. If you already run on AWS, Bedrock keeps traffic in your account boundary. If you use Google Cloud, Vertex AI fits. The Anthropic API is the simplest start. Confirm model availability for your region before you commit.

## Search terms

erpnext claude, claude for erpnext, erpnext claude integration, connect claude to erpnext, claude mcp erpnext, erpnext anthropic, claude bedrock erp, frappe claude, erpnext ai assistant claude

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
