MIMIRATECH SV Book a meeting

Insights · · 4 min read

Connecting AI to your ERP: MCP, RPC and where to draw the line

What MCP and RPC are, how they differ, and what to settle before an AI assistant gets to read or change orders, stock and invoices in your ERP.

An AI assistant that can look into your ERP is useful. You ask which deliveries are late this week, and you get the list with the reason for each. An assistant that can also change things is a different matter. Then it needs the same rules as a new member of staff. Two terms come up as soon as you look into this, MCP and RPC. Here is what they mean, how they differ and how to decide which jobs go where.

What RPC is

RPC stands for remote procedure call. One program asks another to run a named function and waits for the answer. This is how systems have talked to an ERP for many years. Your webshop sends an order to Odoo this way, and your warehouse scanner fetches a picking list this way.

Odoo's own interface is of this kind. Since version 19 it is called the JSON-2 API. The older XML-RPC and JSON-RPC services are deprecated, and Odoo has announced that they will be removed in a later version.

The point to remember is that a programmer decides in advance exactly which function is called and with what values. The same input gives the same result every time.

What MCP is

MCP stands for Model Context Protocol. It is an open standard for connecting AI applications to other systems. An MCP server describes what it can do as a list of tools, in plain words that the AI can read. The assistant then picks a tool by itself, based on what you asked.

MCP does not replace RPC. Its messages are sent as JSON-RPC, and an MCP server for an ERP calls the same API underneath. MCP is a layer on top that lets an AI choose among the functions.

The difference in practice

RPC (the API)MCP
Who decides what is calledA programmer, in advanceThe AI, each time
Built forPrograms talking to programsAn AI assistant working for a person
Same result every timeYesNot always. The AI may take a different route
Good forFixed jobs that repeatQuestions and one-off tasks
Main riskA mistake in the code repeats until someone noticesThe AI misreads the request and picks the wrong action

What to settle before you connect anything

  1. Give the AI its own user. Odoo checks every call against that user's access rights. Do not lend the AI an administrator login. Give it a user that sees only what the job needs.
  2. Start with reading. Questions about orders, stock and customers carry little risk and give most of the value. Add writing later, one task at a time.
  3. Keep a person in front of anything that is hard to undo. Posting an invoice, sending an email to a customer, paying a supplier and deleting records should wait for a yes from a person.
  4. Expect half-finished work. Each call to Odoo is saved by itself. If the AI makes five changes and stops after three, the three remain. Tasks with several steps are safer as one function that does the whole job or nothing.
  5. Keep a log. You should be able to see afterwards what the AI read and changed, and at whose request.
  6. Know where the data goes. What the AI reads is sent to the company that runs the model. Check the agreement, where the data is stored and whether it is used for training. Customer and staff details fall under GDPR here as anywhere else.
  7. Check your plan. On Odoo Online the external API is only included in the Custom plan.

How to find the balance

A simple rule covers most cases.

  • The same job every time goes through the API. Webshop orders, nightly price files and bank imports should be code that someone has tested. An AI adds nothing there except uncertainty.
  • Questions go through MCP. "Which customers have not ordered since the summer?" has no ready-made report. An AI with read access answers it in a minute.
  • For everything in between, let the AI prepare and a person confirm. The assistant can draft purchase orders for all items under their minimum level. Your buyer reads them and confirms. The AI saves the typing, and the decision stays with the buyer.

There is also a way to combine the two. Instead of giving the AI the raw functions for creating and changing records, you write a few narrow tools, such as "make a draft quote for this customer". Each tool is ordinary tested code. The AI only chooses which one to use.

A sensible first step

Pick one question that takes someone an hour every week, such as late deliveries or stock that has not moved. Connect an assistant with read access only and use it for a month. After that you know what it is good for in your company, and what you would never hand over.

We set up connections like this as part of an Odoo implementation or afterwards. Book a meeting if you want to talk through what would fit your flows.

More insights

Book a meeting