Blog · AI & Automation · Setup Guide

Connect CrewAI to Odoo
via MCP

Give a CrewAI multi-agent crew live access to your Odoo ERP data through MCP. Using the crewai-tools MCPServerAdapter pointed at a KSROlabs Odoo MCP endpoint — scoped, governed, and grounded in real records.

By Arpit — Founder & Owner, KSROlabs · · 8 min read

Why connect CrewAI to Odoo?

CrewAI is a framework for orchestrating multi-agent systems — teams of autonomous agents, each with a role and a goal, collaborating to complete a task. The moment those agents need to reason over your real business — open sales orders, unpaid invoices, stock levels, CRM pipeline — they need live access to Odoo.

Wiring each agent to Odoo by hand with bespoke XML-RPC calls is brittle and hard to govern. A cleaner approach is MCP (Model Context Protocol): expose Odoo once as an MCP endpoint, and any MCP-aware client — including CrewAI — can consume it as a set of structured, permission-scoped tools.

This guide shows how to give a CrewAI crew live Odoo access through MCP, with a realistic code sketch, two hosting paths, and the security model that keeps agents inside their lane.

The approach: CrewAI consumes Odoo MCP tools

CrewAI supports MCP tools through the MCPServerAdapter shipped in the crewai-tools package. You point the adapter at an MCP server, it discovers the tools that server advertises, and CrewAI treats them as first-class agent tools — the agent decides when to call each one.

On the Odoo side, the MCP endpoint is exposed by the KSROlabs MCP Server. It advertises tools such as search_records, get_record, and describe_model, each scoped to the models your API key allows. Because MCP is an open standard, the same Odoo endpoint you build for CrewAI also works with Claude, Cursor, and any other MCP client.

Step-by-step: give a CrewAI crew Odoo access

Follow these 5 steps to connect a CrewAI crew to live Odoo data via MCP.

1

Install crewai and crewai-tools with MCP support

In your Python environment (3.10+), install the CrewAI framework and its tools package: pip install "crewai" "crewai-tools[mcp]". The crewai-tools package ships the MCPServerAdapter, which lets a CrewAI agent consume any MCP server as native tools.

2

Expose an Odoo MCP endpoint and mint a scoped bearer token

Stand up an Odoo MCP endpoint using the KSROlabs MCP Server (self-hosted) or the Odoo Online MCP Gateway (for *.odoo.com SaaS instances). In Odoo, create a scoped API key that limits which models the crew may touch — for example sale.order, res.partner, and account.move — and copy the bearer token.

3

Configure MCPServerAdapter with the Odoo MCP URL and token

Point the MCPServerAdapter at your Odoo MCP endpoint (e.g. https://your-odoo.com/mcp/v1) and pass the bearer token in the Authorization header. On connect, the adapter fetches the tool catalogue the server advertises — search_records, get_record, describe_model, and more.

4

Give the MCP tools to a CrewAI Agent

Pass the adapted tool list into an Agent definition. The agent now has structured, typed access to live Odoo data and can decide when to call each tool based on its role, goal, and the task it is assigned — no hand-written API glue required.

5

Assemble a Crew and kick off a task

Compose one or more agents into a Crew, assign a Task that references Odoo data (e.g. "summarise this week's unpaid invoices and flag the top five by value"), and call crew.kickoff(). Each agent calls the Odoo MCP tools as needed and returns a grounded, data-backed result.

Put together, a minimal CrewAI + Odoo MCP script looks like this:

from crewai import Agent, Task, Crew
from crewai_tools import MCPServerAdapter

# 1. Point the adapter at your Odoo MCP endpoint
odoo_mcp = {
    "url": "https://your-odoo.com/mcp/v1",
    "headers": {"Authorization": "Bearer <YOUR_SCOPED_TOKEN>"},
}

# 2. Load the Odoo MCP tools and hand them to an agent
with MCPServerAdapter(odoo_mcp) as odoo_tools:
    analyst = Agent(
        role="Revenue Analyst",
        goal="Answer questions using live Odoo ERP data",
        backstory="An operations analyst who reasons over Odoo records.",
        tools=odoo_tools,          # search_records, get_record, describe_model, ...
        verbose=True,
    )

    task = Task(
        description="List this week's unpaid invoices and flag the top 5 by value.",
        expected_output="A ranked list with customer, amount, and due date.",
        agent=analyst,
    )

    crew = Crew(agents=[analyst], tasks=[task])
    result = crew.kickoff()
    print(result)

Illustrative sketch — adapt the URL, token, models, and task to your own Odoo instance and crew design.

Two ways to expose your Odoo MCP endpoint

The right hosting path depends on how your Odoo is deployed. CrewAI connects the same way to both.

🖥️

Self-hosted, Odoo.sh, or on-prem

Install the KSROlabs MCP Server module directly in your Odoo instance. You get a governed MCP endpoint inside your own environment with full control over models, keys, and permissions.

☁️

Odoo Online (*.odoo.com) SaaS

On Odoo Online you cannot install custom modules, so use the purpose-built Odoo Online MCP Gateway — a commercial, managed gateway that exposes a governed MCP endpoint for SaaS Odoo.

For self-hosted setups, see the Odoo MCP Server module. For SaaS instances, the Odoo Online MCP Gateway is the path for connecting CrewAI to an *.odoo.com deployment.

Use cases and security

Once a crew has grounded Odoo access, multi-agent automation over your ERP becomes practical:

📊

Automated reporting crews

One agent queries Odoo for the numbers, another writes the narrative — producing weekly revenue, AR, or inventory summaries grounded in live records instead of stale exports.

🎯

Lead triage and enrichment

A research agent pulls CRM context from Odoo while a scoring agent ranks and routes leads, so sales sees prioritised opportunities without manual data gathering.

📦

Order and inventory checks

Agents verify stock, order status, and delivery dates directly against Odoo before drafting customer replies or flagging exceptions for a human.

🔐

Governed by scoped keys

Every crew connects with a read-only-by-default API key limited to specific models, authenticated with a bearer token, run under a defined user, and logged for audit and revocation.

Because permissions live in Odoo — not in your agent code — you can hand a crew broad reasoning ability while keeping a tight boundary on what it can actually read or change. Start read-only, grant write access to individual models only when a workflow needs it, and issue a separate key per crew or environment so you can revoke one without disturbing the rest.

Frequently asked questions

Can I connect CrewAI to Odoo?

Yes. CrewAI supports MCP (Model Context Protocol) tools through the crewai-tools MCPServerAdapter, so any CrewAI agent can consume an Odoo MCP endpoint as native tools. Point the adapter at an Odoo MCP server exposed by the KSROlabs MCP Server (self-hosted) or the Odoo Online MCP Gateway (SaaS), pass a scoped bearer token, and your crew can read and act on live Odoo data.

How does CrewAI use Odoo via MCP?

The MCPServerAdapter connects to your Odoo MCP endpoint and pulls the tool catalogue the server advertises — for example search_records, get_record, and describe_model. Those tools are handed to a CrewAI Agent, which decides when to call each one while working through its assigned Task. The agent gets structured, typed access to real Odoo models and records instead of hard-coded API calls.

Does it work with Odoo Online (SaaS)?

Yes. If you run on Odoo Online (*.odoo.com) where you cannot install custom modules, use the Odoo Online MCP Gateway — a purpose-built, commercial gateway that exposes a governed MCP endpoint for SaaS Odoo. For self-hosted, Odoo.sh, or on-prem deployments, install the KSROlabs MCP Server module directly. Either way CrewAI connects the same way through the MCPServerAdapter.

Is it secure?

Security is enforced on the Odoo side, independent of CrewAI. Every connection uses a scoped API key that is read-only by default and limited to the specific models you allow. Requests are authenticated with a bearer token, run under a defined Odoo user's permissions, and are logged for audit. You can issue a separate key per crew or per environment and revoke any key without affecting the others.

What can a CrewAI crew do with Odoo data?

A multi-agent crew can orchestrate work across your ERP: one agent pulls unpaid invoices while another drafts follow-up messaging, or a research agent gathers CRM context while a planning agent builds a quote. Common use cases include automated reporting, lead triage, inventory checks, order-status summaries, and any workflow where agents need to reason over live Odoo records before acting.

How do I get it / pricing?

The KSROlabs MCP Server is a paid module on the Odoo App Store, and free setup support is included as a service with every purchase. The Odoo Online MCP Gateway is a commercial, managed service for SaaS instances — contact us for access and pricing. The fastest path is to reach out through our contact page and we will help you choose the right hosting option for your Odoo deployment.

Ready to connect CrewAI to Odoo?

On Odoo Online? Contact us for the MCP Gateway. Self-hosted? Get the MCP Server module from the Odoo App Store — free setup support included.

More from the KSROlabs blog

Odoo MCP Server →Odoo Online MCP Gateway →Connect Cursor to Odoo →Connect AI to Odoo Online →