odoo-mcp
Provides typed, guarded tools for working with an Odoo ERP, including finding customers, checking stock levels, generating sales reports, listing overdue invoices, searching records, and creating draft quotations after human confirmation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@odoo-mcp Who should we chase for payment this week?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
odoo-mcp
An MCP server that lets AI agents (Claude, ChatGPT, Cursor, any MCP client) work with an Odoo ERP — safely. Ask "who should we chase for payment this week?" or "draft a quote for Hotel Arunika: 20 kg House Blend" and the agent calls typed, guarded tools instead of getting raw database access.
Built on the MCP Python SDK 2.x (protocol 2026-07-28): structured tool output, tool annotations, and
human-in-the-loop confirmation through the new Resolve / Elicit flow.
Why
Most "chat with your ERP" demos hand the model a database connection and hope. In a real company that is a non-starter: finance data, customer data and the ability to create documents all need guardrails. This server is opinionated about that:
Concern | What odoo-mcp does |
Least privilege | Read-only by default. Writes need |
Human in the loop |
|
No data exfiltration | Model allow-list; credential/token/binary fields ( |
Well-formed requests only | Odoo domains are validated (shape + operator allow-list) before they reach Odoo. |
Errors the model can fix | Anticipated failures (policy, bad dates, unknown ids) come back as tool errors with a clear message; unexpected exceptions are hidden from the model and logged. |
API keys, not passwords | Authenticates with an Odoo API key over the external API. |
Related MCP server: MCP Server for Odoo
Tools
Tool | Kind | What it does |
| read | Customers by name, email or city |
| read | On-hand qty per product, flagged |
| read | Confirmed sales grouped by |
| read | Unpaid posted invoices past due, most overdue first |
| read | Guarded generic |
| write | Draft quotation, after human confirmation |
Plus a resource (odoo://models: what is exposed and whether writes are on) and a prompt
(month_end_review: sales vs last month, who to chase, what to reorder).
Every tool returns typed, structured output (Pydantic models → JSON Schema), so clients can render tables and agents don't have to parse prose.
Try it in 30 seconds (no Odoo needed)
Without ODOO_URL the server runs against a built-in demo company (a fictional coffee roaster with customers,
products, orders and invoices):
git clone https://github.com/affifariza04/odoo-mcp && cd odoo-mcp
uv sync
uv run python examples/demo.py # launches the server over stdio and runs an agent-style session> overdue_invoices({"as_of": "2026-11-22"})
INV/2026/0004 PT Sinar Retail due 2026-10-02 51 days 12,540,000
INV/2026/0008 Lantai Dua Coffee due 2026-11-16 6 days 5,050,000
[human is asked]
Create a draft quotation for Hotel Arunika (total 7,940,000)?
20 x House Blend 1kg
12 x Gayo Arabica 250g
[human clicks: Confirm]
> create_quotation(...) -> {"name": "S00013", "customer": "Hotel Arunika", "total": 7940000.0, "state": "draft"}Use it with Claude Desktop / Cursor
{
"mcpServers": {
"odoo": {
"command": "uvx",
"args": ["--from", "git+https://github.com/affifariza04/odoo-mcp", "odoo-mcp"],
"env": {
"ODOO_URL": "https://your-company.odoo.com",
"ODOO_DB": "your-db",
"ODOO_USER": "you@company.com",
"ODOO_API_KEY": "…", // Odoo → Preferences → Account Security → New API Key
"ODOO_MCP_MODE": "readonly" // or "readwrite" to enable create_quotation
}
}
}
}Remote/HTTP clients: odoo-mcp --http serves Streamable HTTP.
Architecture
flowchart LR
A[AI agent / MCP client] -- tools/call --> S[MCPServer<br/>typed tools]
S --> P[Policy<br/>allow-lists · field filter · domain validation · limits]
P --> B{Backend}
B -- XML-RPC + API key --> O[(Odoo 14–18)]
B -- in-memory --> D[(Demo company)]
S -. Elicit: confirm? .-> H[Human]src/odoo_mcp/
server.py tools, resource, prompt, confirmation resolver, entry point
policy.py guardrails (pure, unit-tested)
backend.py XmlRpcBackend (real Odoo) + DemoBackend (in-memory, with an Odoo domain evaluator)
tests/ policy + domain unit tests, end-to-end tests through a real MCP client
examples/ stdio demo sessionTests
uv run pytest -q # 20 tests
uv run ruff check .The end-to-end tests connect a real mcp.Client to the server and cover: tool listing and annotations,
each business tool's numbers on the demo company, policy errors surfacing to the model, read-only mode
refusing writes, and the confirmation flow (accept → created; reject/decline → nothing written).
CI runs the suite on Python 3.12 and 3.13, plus the stdio demo.
Roadmap
Purchase suggestions from stock velocity (
suggest_reorder)Per-user auth on the HTTP transport (OAuth), mapping each user to their own Odoo API key
Audit log of every write the agent proposes and what the human decided
Built by Affif Ariza Adiwijaya: 1.5 years building on Odoo, now building AI tooling around it. MIT licensed.
Available Tools
6 toolscheck_stockBRead-only
On-hand quantity per product, flagged ok / low / out. Use only_low=true for a reorder list.
Inputs: query, only_low. Returns: result
create_quotationA
Create a DRAFT sales quotation. The human sees a summary and must confirm; nothing is confirmed or sent.
Inputs: lines (required), customer_id (required). Returns: result
find_customersBRead-only
Find customers by (part of) their name, email or city.
Inputs: query (required), limit. Returns: result
overdue_invoicesBRead-only
Posted customer invoices past their due date that are not fully paid, most overdue first.
Inputs: as_of. Returns: result
sales_reportARead-only
Confirmed sales between two ISO dates (inclusive), grouped by month, customer or product.
Inputs: date_to (required), date_from (required), group_by. Returns: rows, date_to, group_by, date_from, +1 more
search_recordsBRead-only
Generic read: Odoo search_read on an allowed model. Domain uses Odoo syntax, e.g. [["state","=","sale"],["amount_total",">",1000000]].
Inputs: model (required), limit, order, domain, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
The specialized tools (find_customers, check_stock, sales_report, overdue_invoices) each target a distinct task, and create_quotation is clearly a write action. The main overlap is that search_records can also read customers, stock, and invoices, but the generic-vs-specific distinction is understandable.
Four tools follow a clear verb_noun pattern (search_records, find_customers, check_stock, create_quotation), while sales_report and overdue_invoices use noun-phrase report naming. The mix is readable but not a single consistent convention.
Six tools is a well-scoped set for a focused sales/customer/stock assistant. Each tool covers a meaningful operation without feeling thin or bloated.
The server covers reads well through generic search plus focused customer, stock, sales, and invoice queries, and it offers a safe draft quotation creation. However, there is no way to update customers or quotations, confirm/send orders, or manage invoices, leaving notable lifecycle gaps.
Maintenance
Related MCP Connectors
Odoo ERP for AI agents: hosted OAuth endpoint, gated writes, one endpoint for every instance.
Read, write and run Odoo actions from any AI app, as each user, with approval rules per colleague.
Connect AI to Odoo ERP 14-20: search, create, update and manage records in natural language.
AI agents for CRM, mail, calendar, ERP and accounting - you approve. EU-hosted, OAuth.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to interact with Odoo ERP systems through natural language to search records, create entries, update data, and manage business operations. Supports secure authentication and configurable access controls for production environments.Mozilla Public 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with Odoo ERP systems through natural language, allowing users to search, create, update, and manage business records like customers, products, and invoices across any Odoo instance.1Mozilla Public 2.0
- AlicenseAqualityBmaintenanceEnables AI agents to interact with Odoo ERP as the authenticated user, with tools for discovery, planning, and mutations bounded by user permissions.3656 npm2Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to query live ERP/CRM records through Odoo's external JSON-RPC API, covering contact and company lookups, sales orders and quotations, CRM leads and opportunities, customer invoices, and generic search_read access to any Odoo model. Runs either as a hosted gateway endpoint or a local stdio server.90 npmMIT