odoo-agent-mcp
Provides tools for managing Odoo instances, including data CRUD, model/field metadata, relationship graphs, source code analysis, and schema drift detection.
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-agent-mcp Show me the schema of res.partner"
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-agent-mcp
A version-agnostic MCP server + code-comprehension engine that gives AI agents (Claude Code / Claude Desktop / Cursor / any MCP client) full command of any Odoo app on any Odoo version — its data, its schema, its source code, and how the two relate.
It answers, for developers and operations teams alike:
What data is in the DB, and how do model classes map to tables and columns?
What code is where, how does the backend work, and how do modules inherit each other?
Show me a flowchart of the system / a user flow.
Where would a change break things? Help me implement a feature or fix a bug.
Why this exists (the two-domain problem)
Almost every existing Odoo AI tool covers only Domain A — live data & metadata (reachable over Odoo's API). Very few touch Domain B — the source code (what the backend actually is). Real developer/ops command needs both, and they come from different places: Domain A from the running server, Domain B from the repository. This project fuses them.
See ARCHITECTURE.md for the full design and REUSE_MAP.md for how this relates to existing open-source Odoo MCP/LLM projects.
Related MCP server: Odoo MCP Server
Capability tiers (graceful degradation)
The server probes each instance at connect time and advertises only the tools it can honour, so one codebase serves a locked SaaS tenant and a self-hosted repo alike.
Tier | Requires | Unlocks |
TIER_0 | API credentials only (works on locked Odoo Online) | Data CRUD, model/field metadata, model↔table↔column mapping, relationship graph |
TIER_1 | Companion module | Deep introspection endpoint, safe-method catalogue |
TIER_2 | Read access to the module source repo (self-hosted / Odoo.sh) | Source AST analysis, |
Supported Odoo versions
Odoo 13 → 19+. The ORM surface (search, read, fields_get, execute_kw,
ir.model*) is stable across these versions; only the wire protocol differs, and that
is isolated behind a transport adapter:
Odoo version | Default transport |
13 – 18 | XML-RPC (fallback: JSON-RPC) |
19+ | JSON-2 ( |
XML-RPC / JSON-RPC endpoints are deprecated in Odoo 19 and scheduled for removal (SaaS ~19.1, on-prem/Odoo.sh ~20–22). JSON-2 is implemented now so the tool outlives that removal.
Install
python -m venv .venv
# Windows PowerShell: .venv\Scripts\Activate.ps1
# bash: source .venv/bin/activate
pip install -e ".[dev]"Configure
Copy .env.example to .env and fill in:
ODOO_URL=https://my-instance.odoo.com
ODOO_DB=my_database
ODOO_USERNAME=admin
ODOO_API_KEY=xxxxxxxx # API key (required for JSON-2 / Odoo 19+)
# ODOO_PASSWORD=... # legacy auth for <=18 if no API key
ODOO_SOURCE_PATH=/path/to/addons # optional -> unlocks TIER_2 code intelRun as an MCP server
odoo-agent-mcp # stdio transport (Claude Desktop / Code)Register in an MCP client (e.g. Claude Code .mcp.json):
{
"mcpServers": {
"odoo": { "command": "odoo-agent-mcp" }
}
}Testing
pytest # unit tests — run anywhere, no Odoo needed
pytest -m e2e # live end-to-end — REQUIRES the Docker matrix below
docker compose -f docker/docker-compose.yml up -d # Odoo 15/17/19 + PostgresHonest status: unit tests (mapping engine, AST engine, transport factory, tier logic) run and pass in this environment. The live e2e suite needs a running Odoo; it is written and skips automatically when no server is reachable. See
tests/e2e/README.md. TODO markers flag every path that is not yet live-verified.
Status
v0.1.0 — foundation: transport layer, tier detection, mapping engine,
code-comprehension engine, MCP wiring, companion-module skeleton, unit tests.
Roadmap in ARCHITECTURE.md.
Available Tools
14 toolsodoo_access_rulesC
Return ACLs (ir.model.access) and record rules (ir.rule) for a model.
Inputs: model (required).
odoo_countC
Count records matching a domain.
Inputs: model (required), domain.
odoo_detect_driftA
Compare a model's SOURCE fields against the LIVE database and report drift (Studio/manual fields, un-upgraded modules, type mismatches). Needs both the source tree (TIER_2) and a live connection (TIER_0).
Inputs: model (required).
odoo_execute_methodC
Call a model method. Read-only methods are always allowed; mutating methods require ODOO_ENABLE_WRITES=1.
Inputs: model (required), method (required), args, kwargs.
odoo_inheritance_diagramA
Mermaid flowchart of model inheritance/extension/delegation across the source.
Inputs: no named parameters.
odoo_list_modelsB
List installed models (optionally filtered by technical name substring).
Inputs: limit, name_filter.
odoo_list_modulesB
List modules discovered in the configured source tree (ODOO_SOURCE_PATH).
Inputs: no named parameters.
odoo_map_model_to_tableC
Return only the model<->table<->column mapping for a model.
Inputs: model (required).
odoo_model_schemaA
Full schema for a model: normalised field metadata plus the deterministic model->table->column mapping (how the class maps to the database).
Inputs: model (required).
odoo_model_sourceC
Return the source-derived definition(s) of a model and a class diagram.
Inputs: model (required).
odoo_module_dependency_diagramA
Mermaid flowchart of module dependencies from manifests.
Inputs: no named parameters.
odoo_relationshipsB
Build a relationship graph across the given models. Returns edges and, optionally, a Mermaid ER diagram.
Inputs: models (required), as_mermaid.
odoo_searchC
Search and read records. domain is an Odoo domain (list of triples).
Inputs: model (required), limit, order, domain, +2 more.
odoo_statusA
Report connection status, detected Odoo version, transport and capability tier.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Each tool has a clearly distinct purpose, from querying records to exploring schema and code. There is no overlap; even similar functions like search and count are differentiated by operation. An agent can easily select the correct tool.
All tools follow a consistent pattern: 'odoo_' prefix followed by lowercase words separated by underscores. The names are descriptive and maintain a uniform style, making them predictable for an agent.
With 14 tools, the set is well-scoped for an Odoo agent. It covers essential areas like schema introspection, data querying, and code analysis without being overwhelming or too sparse.
The toolset covers major Odoo operations but lacks direct record CRUD tools (create, update, delete). However, odoo_execute_method can handle mutations, and the focus on analysis is clear. Minor gap but still robust.
Maintenance
Related MCP Connectors
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Odoo MCP connector for ChatGPT and Claude: ask sales, invoices and stock in plain words. Read-only.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Related MCP Servers
- AlicenseBqualityCmaintenanceAn MCP server implementation that integrates with Odoo ERP systems, enabling AI assistants to interact with Odoo data and functionality through the Model Context Protocol.411,602 PyPI427MIT
- AlicenseBqualityDmaintenanceAn MCP server that enables AI assistants to interact with Odoo ERP apps like Inventory, CRM, Sales, and Manufacturing. It allows users to read, create, and manage Odoo records and workflows using natural language commands.2515 npm1ISC
- AlicenseNot gradedqualityDmaintenanceAn MCP server that connects AI assistants to Odoo ERP instances via the built-in XML-RPC API without requiring any additional addons. It enables users to search, create, update, and manage Odoo records and models through natural language.29 npmMIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants to interact with Odoo ERP, allowing natural language queries, record creation, updates, and deletions.LGPL 3.0