<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Himalay Patel</title>
    <description>The latest articles on DEV Community by Himalay Patel (@himalay_patel_b249bcb3cd4).</description>
    <link>https://dev.to/himalay_patel_b249bcb3cd4</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4254818%2F5d5bb40e-8ee8-4c5b-9adb-c2d0b8a7e0ec.png</url>
      <title>DEV Community: Himalay Patel</title>
      <link>https://dev.to/himalay_patel_b249bcb3cd4</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/himalay_patel_b249bcb3cd4"/>
    <language>en</language>
    <item>
      <title>Connecting ERPNext to an AI Agent: What an MCP Server Actually Needs to Get Right</title>
      <dc:creator>Himalay Patel</dc:creator>
      <pubDate>Thu, 26 Nov 2026 08:32:42 +0000</pubDate>
      <link>https://dev.to/himalay_patel_b249bcb3cd4/connecting-erpnext-to-an-ai-agent-what-an-mcp-server-actually-needs-to-get-right-42ln</link>
      <guid>https://dev.to/himalay_patel_b249bcb3cd4/connecting-erpnext-to-an-ai-agent-what-an-mcp-server-actually-needs-to-get-right-42ln</guid>
      <description>&lt;p&gt;Model Context Protocol (MCP) servers are becoming the standard way to connect AI assistants like Claude or ChatGPT to real business systems — and ERPNext is a natural candidate, since so much of a company's operational truth (orders, stock, customers, invoices) already lives there.&lt;/p&gt;

&lt;p&gt;The part that's easy to get wrong isn't the protocol itself. It's permissions.&lt;/p&gt;

&lt;p&gt;A naive ERPNext MCP integration gives an AI assistant the same access as an admin user — read and write across every doctype. That's a fast way to ship a demo and a slow way to cause an incident, because the moment the assistant can act (not just answer questions), every mistake it makes is a mistake made in your live ERP data.&lt;/p&gt;

&lt;p&gt;The three things we've found actually matter when building these integrations in production:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Read vs. write is a different trust boundary, not a toggle&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;An MCP tool that reads a customer's order history is low-risk. A tool that creates a sales invoice or triggers a payment is not — and it shouldn't live behind the same permission check. We scope these as genuinely separate tool definitions with separate approval paths, not a single "erpnext_action" tool with a parameter for what kind of action.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The MCP server should authenticate as a real ERPNext user, not a service account with blanket access&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;ERPNext's own role-based permissions are the right place to enforce "can this assistant touch payroll data" — re-implementing that logic in the MCP layer is how permission bugs get introduced. The server should sit between the AI client and the Frappe REST API, passing through a scoped user's actual role permissions rather than acting as a superuser proxy.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Evals matter more here than in a typical chatbot&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When an assistant can only answer questions, a wrong answer is a mildly bad experience. When it can act on ERPNext — issue a refund, adjust stock, approve a purchase order — you need a test suite that runs the agent through real scenarios before launch and re-runs on every change, the same discipline you'd apply to any system with write access to financial data.&lt;/p&gt;

&lt;p&gt;None of this is unique to ERPNext — it's the general shape of "connect an AI agent to a system of record" — but ERPNext's specific role/permission model (and the fact that most installs have years of custom doctypes layered on top) makes the read/write distinction especially easy to blur if you're not deliberate about it.&lt;/p&gt;

&lt;p&gt;We've built several of these integrations for manufacturing and trading businesses moving off Tally and spreadsheets, and the permission design is consistently where the real engineering effort goes — not the MCP boilerplate itself.&lt;/p&gt;

&lt;p&gt;Written by the team at AGI Software Solutions, an AI development studio building AI agents, voice AI, and ERPNext/CRM integrations.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>mcp</category>
      <category>security</category>
    </item>
  </channel>
</rss>
