HOW-TO

How to connect an AI agent to Odoo.

Agents get useful when they can see CRM, sales, stock and invoices. MCP is a clean way to grant that without giving the model the whole ERP.

Architecture: AI agent → MCP client → Odoo MCP server → Odoo API → Odoo.

1. Define what the agent needs

Not “give the AI Odoo.” A task: “identify overdue invoices.” Then you know the tools.

2. Dedicated integration user

Odoo recommends bot users for long-running automation: minimised rights, cleaner audit.

3. The right API

Odoo 19: JSON-2. Details: Odoo MCP for Odoo 19. The ordered stack — prove JSON-2, then MCP, then the client — is connect an AI agent with JSON-2 + MCP.

4. MCP in the middle

Expose search_customers, search_orders, get_invoice, search_inventory — add create_activity later.

5. Restrict tools

A powerful agent does not need every tool. Gemini's allowed_tools is the same idea on the client side.

6. Start read-only

“Find overdue invoices.” Then “explain which customers are worst.” Then maybe “prepare follow-up activities.” Automatic writes last, if ever.

7. Human approval

AI proposes → human approves → Odoo executes.

Where this helps: pipeline follow-up, receivables, stock exceptions, lead priority, management summaries, operational outliers. The goal is not “AI inside Odoo.” It is an agent that can reason about the business and use Odoo as a system of action — carefully. Can AI agents access Odoo? · pillar.

An AI assistant answering a live Odoo sales question through MCP
Task design

Write the job before you write the tools

“Connect an AI agent to Odoo” is not a task. “Draft a weekly overdue-AR brief from open invoices, then stop” is a task. The tool list falls out of the job: search invoices, read partner payment terms, maybe post a chatter note — not warehouse transfers and HR appraisals.

For a complete worked example—system role, skill instructions, sources, read tools, permission boundary, and evaluation set—use the Odoo AI agent skills guide.

If you cannot name the records the agent should touch, you are not ready for MCP. You are ready for a workshop. Agents amplify whatever access you give them, including confusion.

Keep a one-page allow-list: models, methods (read vs write), and example prompts that must work. Anything not on that page is out of scope until a human adds it. Security companion: Odoo MCP security.

Clients

One MCP server, several MCP-compatible clients

The point of MCP is that ChatGPT, Claude, Gemini, Cursor and other compatible agents can share a tool interface. You should not build a ChatGPT-only Odoo adapter, then a Claude-only adapter, then a Gemini-only adapter, each with its own permission bugs.

Client UIs still differ: remote MCP registration, allowed_tools, plan gates, write approvals. Those belong on the client pages. The Odoo-facing contract — bot user, JSON-2 or ORM, tight tools — should be identical.

Odoo 19.4 documents MCP connectivity in the product. Community and vendor servers still matter on older 19.x, on Community, and when you want a smaller blast radius than “the database.” Is Odoo MCP official?

Questions

FAQ

How do I connect an AI agent to Odoo?

Define the job, create a dedicated Odoo user, expose a small MCP tool list, test read-only, then add approval for writes. MCP is the tool interface; security is the control plane.

Which API should I use on Odoo 19?

JSON-2: HTTP to /json/2/<model>/<method> with a bearer API key. Older RPC APIs are deprecated. Sequence: JSON-2 then MCP.

What tools should the first agent get?

Only what the task needs. Overdue-invoice analysis does not need confirm_order or unlink.

When do writes happen automatically?

After read-only behaviour is trusted, and preferably never for postings — AI proposes, a person approves, Odoo executes. MCP security.

Start read-only. Ask a real question.

Sandbox on sample data, or we put MCP on your instance.