Skip to main content
How to Give AI Agents Safe Access to Odoo: Permissions, Approvals and Audit
Home / Blog / Digital Architecture & ERP
Digital Architecture & ERP

How to Give AI Agents Safe Access to Odoo: Permissions, Approvals and Audit

Give an AI agent the narrowest Odoo access that lets it do one job: a dedicated bot user, minimal access rights, short-lived credentials, read-only by default, human approval before any write, and a log you can review. Odoo enforces its normal access rights, record rules and field access on API calls, so the safest design starts from the permission model you already have instead of a new layer of trust.

How should an AI agent get access to Odoo?

Through a dedicated, least-privilege user, never through a person’s own login or an administrator account. Odoo’s external JSON-2 API, introduced in version 19.0, takes an API key as a bearer token and checks each operation against the access rights, record rules and field access of the user the key belongs to. Odoo’s documentation recommends dedicated bot users with minimal permissions for automated integrations, and notes that a bot user’s password can be left empty so nobody can log in as it. Odoo also documents that API keys have a mandatory description and duration, with a maximum lifetime of three months, and are shown only once at creation.

What are the access options?

Option How it works Main risk Control to apply
JSON-2 API with a bot user Your own integration calls model methods over HTTPS with a bearer key Over-broad groups on the bot user Minimal groups, short key lifetime, rotate keys
Odoo AI MCP server An external AI client connects to the database through the Model Context Protocol, with OAuth or an API key Approving a client you do not control Approve named clients only, review Dynamic Client Registration, delete keys to revoke
Third-party MCP modules Community or vendor apps expose Odoo models as tools Unreviewed code and unclear permission handling Review the source, test on a copy, check who maintains it

Availability varies. Odoo states that the JSON-2 API is available only on its Custom pricing plans, so confirm your plan and version before you design around it. Odoo has announced that the older XML-RPC and JSON-RPC endpoints are being retired, and the announced timeline has differed between documentation versions, so check the page for your version and build new work on JSON-2.

What does the Odoo MCP server do and not do?

According to Odoo’s documentation, the MCP server lets an external AI agent read or modify database data. Each request is checked against the user’s identity and permissions. OAuth is the recommended sign-in for internal users, and only approved clients can request access. Five tools are available by default: Get Fields, Get Models, retrieve initial context, Search and Read group. Other tools stay hidden until a developer exposes a server action as available in MCP.

One detail matters for governance. The documentation says the “Readonly Tool” option only advises the client that a tool can run without user approval. It does not hide the tool or enforce read-only behaviour. Treat it as guidance, never as a safeguard, and enforce read-only access through the user’s groups and record rules.

What breaks if you skip this: an agent that runs under an administrator login can read every record and change any of them, and its actions appear in the log as the administrator’s own. You then cannot separate a human mistake from an agent mistake, and one prompt injection in a customer email becomes a data breach.

Which controls should every agent deployment have?

  1. One agent, one user. Create a separate bot user for each agent and each purpose, so permissions and logs stay distinct.
  2. Least privilege first. Start with no access, add read access to the specific models the task needs, and add write access only after a trial period.
  3. Record rules for scope. Limit the agent to the company, team or document types it needs. Test with a record the agent should not see.
  4. Short-lived credentials. Use the shortest key duration that works, store keys in a secrets manager and rotate them on a schedule.
  5. Approval gates for writes. Let the agent prepare a draft purchase order, journal entry or customer message, and require a named person to confirm it.
  6. No irreversible actions. Do not let an agent post payments, delete records or change bank details without a human step.
  7. Logging you can read. Record the user, time, model, method and result for every call, and review a sample every week.
  8. Kill switch. Know how to archive the bot user and delete its keys in minutes.

These controls extend the thinking in why AI agents need ERP guardrails and the risk of staff using unapproved tools described in Shadow AI: the governance blind spot.

What should an agent never be trusted with?

Even with perfect permissions, an agent reads text that other people wrote: emails, supplier notes, product descriptions. Any of that text can carry instructions the agent might follow. Treat all data an agent reads as untrusted input, keep the agent’s write scope small, and make the approval step show the human exactly what will change and why. An approval screen that says only “Approve?” is not a control.

What no tool can own: the decision about which tasks an agent may perform, who approves its output and who answers when it is wrong. Those are management decisions, and they belong in writing before the first key is issued.

How do you pilot it safely?

Pick one low-risk, high-volume task, such as summarising overdue invoices or drafting stock reorder suggestions. Run it on a copy of the database first. Keep it read-only for the first weeks, compare its output with what a person would have done, and only then add a gated write. Our view on where agentic features are heading in the next Odoo release is in Odoo 20’s agentic AI: what SMEs should actually watch for.

Frequently asked questions

Can an AI agent use my Odoo administrator account?

It can technically, but it should not. An administrator-level agent can read and change everything, and its actions are indistinguishable from yours. Use a dedicated bot user with the smallest set of groups that covers the task.

Does Odoo enforce permissions for API and MCP calls?

Odoo documents that JSON-2 operations are checked against the user’s access rights, record rules and field access, and that MCP requests are checked against the user’s identity and permissions. Test this yourself with records the agent should not reach.

Is the “Readonly Tool” setting enough to stop writes?

No. Odoo’s documentation says it only advises the client that a tool can run without approval and does not enforce read-only behaviour. Enforce read-only through access rights and record rules.

How do I revoke an agent’s access quickly?

Delete the API key in the bot user’s preferences, archive the user, and for MCP clients archive the registered client. Practise this before you need it.

Should an agent be allowed to post transactions automatically?

For most SMEs, not at first. Let it prepare drafts and require a named approver. Consider automatic posting only for low-value, reversible, well-tested cases, with limits and a review of the log.

A question for you: if an agent made a wrong change in your ERP tomorrow, could you tell which change it was and who approved it?

Sources

By Willie Loo, Managing Director, Mxgsoft Pte Ltd and Moxogo Pte Ltd, Singapore. Last reviewed 10 November 2026. Odoo features and plan availability change between versions, so confirm against the documentation for the version you run. MoxogoERP now runs on Odoo 20.

Next step: before you connect any agent, check that your master data is clean enough to trust its output with a Resource Master Audit.