ClaudeERPNext Agent view

How to connect Claude to ERPNext

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.

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.

What teams use it for

Ask questions across DocTypes

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

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

Customisation help

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

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

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

ERPNext integration 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

  1. 1

    Pick the Claude surface

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

  2. 2

    Build the MCP server

    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.

  3. 3

    Secure the transport

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

  4. 4

    Write guidance for Claude

    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.

  5. 5

    Choose hosting

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

  6. 6

    Pilot with a small group

    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.

  1. Claude calls get_open_sales_orders with a delivery date filter.
  2. For each order it calls get_item_availability on the line items.
  3. It checks linked Work Order status and Purchase Order schedule dates.
  4. 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.

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

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

Keeping data 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 checklist

  • 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.

Ways to get it done

Claude connector over your own MCP server

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

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

Claude API or Bedrock inside your cloud tenancy

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

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

Private model with the same tools, via Netray

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

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

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.

Frequently asked questions

Is there an official Claude connector for ERPNext?

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?

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?

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?

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?

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.

Want Claude working on your ERPNext?

A free 30 minute assessment: we map the integration path for your version and setup, and where it should run.

Get a free assessment