odoo-model-mcp
Provides tools for querying Odoo's model registry, including searching models, retrieving field details, inspecting inheritance chains, method overrides, and exporting the full registry without requiring a database connection.
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-model-mcp show me the fields of sale.order"
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-model-mcp
MCP server that exposes Odoo's model registry (fields, inheritance, methods) without needing a database connection.
Point it at any Odoo project directory and get instant, structured answers about
models, fields, method override chains, and inheritance graphs — powered by
Odoo's own MetaModel registry loaded in-memory.
Status: Pre-alpha (0.1.0a1). Works with Odoo 16–19.
How it works
MCP server (this package) receives tool calls via stdio.
It auto-detects the Odoo project structure (odoo-bin, addons paths, venv).
A persistent worker subprocess is spawned in the project's own Python venv, loading the full model registry once (~4 seconds).
Subsequent queries are served over a Unix domain socket in 1–15 ms.
Workers auto-shutdown after 10 minutes of inactivity.
Each project gets its own isolated worker process, so you can work with multiple Odoo versions simultaneously without conflicts.
Related MCP server: odoo-mcp-uvx
Installation
# With uv (recommended)
uv tool install odoo-model-mcp
# With pip
pip install odoo-model-mcpUsage with Claude Code
Add to your ~/.claude.json (global) or project .claude/settings.local.json:
{
"mcpServers": {
"odoo-model-registry": {
"type": "stdio",
"command": "odoo-model-mcp",
"args": []
}
}
}If installed with uv and not on PATH:
{
"mcpServers": {
"odoo-model-registry": {
"type": "stdio",
"command": "uv",
"args": ["run", "--project", "/path/to/odoo-model-mcp", "odoo-model-mcp"]
}
}
}Tools
All tools accept a project_path pointing to the root of an Odoo project.
Addons paths and the Odoo source location are auto-detected from the project
structure (or can be overridden with addons_paths). Modules can be excluded
by name with exclude_modules (useful when a module has unresolvable Python
dependencies).
detect_project_info
Detect an Odoo project's structure without loading the registry. Returns
odoo_path, addons_paths, python_bin, and odoo_version.
search_models
Search models by name or description substring.
search_models(project_path="/path/to/project", query="sale.order")model_info
Full metadata for a model: all fields (with types, compute methods, related fields, module overrides), inheritance chain, extending modules (from MRO), and decorated methods.
model_info(project_path="/path/to/project", model_name="sale.order")field_info
Detailed info for a single field: type, compute method, depends, store, index, related, groups, and which modules defined or overrode it.
field_info(project_path="/path/to/project", model_name="sale.order", field_name="amount_total")method_overrides
Override chain for a method across the MRO, with source file locations (file path and line number) for each override.
method_overrides(project_path="/path/to/project", model_name="sale.order", method_name="_compute_amounts")model_graph
Inheritance graph around a model: which modules extend it (same _name),
mixin parents (different _name), delegation parents (_inherits), and child
models that inherit from it.
model_graph(project_path="/path/to/project", model_name="sale.order")list_models
Lightweight listing of every model in the registry (name, description, module, field count, abstract/transient flags). Use when you need a catalog but not per-field detail.
list_models(project_path="/path/to/project")dump_registry
Bulk-export the entire registry as JSONL to a file on disk. One call replaces thousands of per-model round trips; intended for downstream pipelines (indexers, embedders, static analysis). Writes records of two types:
{"type": "model", "data": {...model_info...}}— one per model{"type": "method_overrides", "model": "...", "method": "...", "overrides": [...]}— one per decorated method, with file/line for each override in the MRO chain
dump_registry(project_path="/path/to/project", output_path="/tmp/registry.jsonl")Project auto-detection
The server detects project structure automatically:
Odoo source: looks for
odoo-binor theodoo/Python packageAddons paths: parses
odoo.conf/.odoorc, or scans for directories containing modules (subdirs with__manifest__.py)Python venv: checks
.venv/,venv/,env/Odoo version: reads from
.env(ODOO_VERSION=) orodoo/release.py
Architecture
Claude Code
|
| stdio (MCP protocol)
v
odoo-model-mcp server (lightweight Python process)
|
| Unix domain socket (JSON lines)
v
Worker process (project's own venv)
- Loads Odoo registry via MetaModel._build_model()
- Resolves full inheritance (MRO, __bases__, _build_model_attributes)
- Serves queries from in-memory registryDevelopment
git clone https://github.com/bemade/odoo-model-mcp.git
cd odoo-model-mcp
uv sync
uv run pytestLicense
LGPL-3.0-only
Available Tools
8 toolsdetect_project_infoA
Detect an Odoo project's structure without loading the registry.
Args: project_path: Path to the Odoo project root
Inputs: project_path (required). Returns: result
dump_registryA
Bulk export the entire registry to a JSONL file.
Emits one JSON object per line. Record types: {"type": "model", "data": {...model_info...}} {"type": "method_overrides", "model": "...", "method": "...", "overrides": [...]}
Designed for initial ingestion: one call replaces thousands of per-model round trips. Writes to a file on disk (where the worker runs) to avoid oversized MCP responses.
Args: project_path: Path to the Odoo project root output_path: Absolute path where the JSONL file will be written include_methods: If True, emit method_overrides records for every decorated method. Default True. addons_paths: Optional explicit addons paths (auto-detected if omitted) exclude_modules: Optional list of module names to skip loading
Inputs: output_path (required), project_path (required), addons_paths, exclude_modules, +1 more. Returns: result
field_infoA
Get detailed info for a field: type, compute, depends, overrides.
Args: project_path: Path to the Odoo project root model_name: Dotted model name, e.g. 'sale.order' field_name: Field name, e.g. 'amount_total' addons_paths: Optional explicit addons paths (auto-detected if omitted) exclude_modules: Optional list of module names to skip loading
Inputs: field_name (required), model_name (required), project_path (required), addons_paths, +1 more. Returns: result
list_modelsA
List every model in the project registry with lightweight metadata.
Returns: name, description, module, field_count, abstract, transient. Cheap to call; does not include per-field or per-method detail.
Args: project_path: Path to the Odoo project root addons_paths: Optional explicit addons paths (auto-detected if omitted) exclude_modules: Optional list of module names to skip loading
Inputs: project_path (required), addons_paths, exclude_modules. Returns: result
method_overridesA
Get all modules that override a method, in MRO order, with source locations.
Args: project_path: Path to the Odoo project root model_name: Dotted model name, e.g. 'sale.order' method_name: Method name, e.g. '_compute_tax_totals' addons_paths: Optional explicit addons paths (auto-detected if omitted) exclude_modules: Optional list of module names to skip loading
Inputs: model_name (required), method_name (required), project_path (required), addons_paths, +1 more. Returns: result
model_graphA
Get the inheritance graph for a model: extending modules, mixin parents, children.
Args: project_path: Path to the Odoo project root model_name: Dotted model name, e.g. 'sale.order' addons_paths: Optional explicit addons paths (auto-detected if omitted) exclude_modules: Optional list of module names to skip loading
Inputs: model_name (required), project_path (required), addons_paths, exclude_modules. Returns: result
model_infoA
Get full metadata for an Odoo model: fields, inheritance, methods.
Args: project_path: Path to the Odoo project root model_name: Dotted model name, e.g. 'sale.order' addons_paths: Optional explicit addons paths (auto-detected if omitted) exclude_modules: Optional list of module names to skip loading
Inputs: model_name (required), project_path (required), addons_paths, exclude_modules. Returns: result
search_modelsA
Search models by name or description.
Args: project_path: Path to the Odoo project root query: Search string to match against model names and descriptions addons_paths: Optional explicit addons paths (auto-detected if omitted) exclude_modules: Optional list of module names to skip loading
Inputs: query (required), project_path (required), addons_paths, exclude_modules. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct aspect of Odoo model introspection: listing vs searching, model-level vs field-level vs method-level detail, graph relationships, bulk export, and project detection. No overlap or ambiguity between tools.
All tool names follow a consistent snake_case pattern with either verb_noun (list_models, search_models, dump_registry, detect_project_info) or noun_info/noun_graph (model_info, field_info, model_graph, method_overrides). The style is uniform and predictable.
8 tools is well-scoped for an Odoo model introspection server. Each tool addresses a clear need without redundancy, and the count is within the ideal 3-15 range.
The tool surface covers the full lifecycle of model exploration: discover (list_models, search_models, detect_project_info), inspect (model_info, field_info, method_overrides), understand relationships (model_graph), and bulk ingest (dump_registry). No obvious gaps for the stated domain.
Maintenance
Related MCP Connectors
Odoo MCP connector for ChatGPT and Claude: ask sales, invoices and stock in plain words. Read-only.
Versioned documentation registry and semantic search for AI tools and coding assistants.
Connect AI to Odoo ERP 14-20: search, create, update and manage records in natural language.
Read-only U.S. lab-test catalog, collection-site search, and reference-range context.
Related MCP Servers
- AlicenseAqualityFmaintenanceA bridge server that provides access to an Odoo shell environment, allowing execution of Python code within an Odoo database context for model introspection and database operations.4MIT
- AlicenseNot gradedqualityDmaintenanceA read-only MCP server that enables AI assistants to query Odoo instances via XML-RPC, supporting search, read, count, and field inspection without requiring custom modules.76 PyPI1Mozilla Public 2.0
- AlicenseNot gradedqualityCmaintenanceEnables bounded, read-only code-graph search, neighbor/impact tracing, and architecture queries through a local offline gateway, while keeping source contents and mutation operations out of model-callable tools.Apache 2.0
- AlicenseAqualityBmaintenanceEnables MCP clients to interact with Odoo models through generic read and write tools, with read-only mode by default and Odoo ACLs as the authority.529 npmMIT