/odoo-mcp:odoo-mcp-toolsfrom Odoo MCP
Use this skill when you need to query, create, update, delete, export, or import records in any Odoo instance via MCP tools. Triggers on: 'search records', 'create record', 'update partner', 'delete record', 'unlink record', 'export data', 'import records', 'execute method', 'list models', 'list fields', 'get version', 'list profiles', 'odoo mcp tools'.
Ships in Odoo MCP. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Complete reference for the 14 MCP tools provided by odoo-mcp-multi.
Use this skill when interacting with any Odoo instance via an MCP client
(Antigravity, Claude Desktop, Cursor, VS Code).
odoo-mcp-multi installed (pip install odoo-mcp-multi)odoo-mcp add-profile)list_available_profiles and check that the chosen profile's url and database are the database the user named. Never substitute a profile for another database, or credentials from an earlier session. If no profile matches, ask the owner to add one (odoo-mcp add-profile; the API key is typed at the prompt, never pasted into the conversation). Configure a new target as read-only first, with profiles.json: "permissions": {"mode": "granular", "allowed_operations": ["search_read", "search_count", "list_models", "list_fields"]} in (execute_kw stays out because it can call any method), and allow writes only for the operation the user authorized.profile parameter in any tool call to target a specific environment.list_models to search. If unsure of field names, use list_fields.search_count or a grouped read (see JSON-2 below) over downloading business records. Report the profile, domain, user and active_test context with the result, because access rules and archived records change the numbers; a count by technical type does not prove that every row is a valid business record for the question asked.auth='user' web controller, such as the Studio export archive, are not reachable through execute_kw: use the CLI command that covers them (odoo-mcp studio-export), which keeps the password inside the package, and never have a script read profiles.json to log in by itself.Register the server in your AI client's MCP config file:
{
"mcpServers": {
"odoo": {
"command": "odoo-mcp",
"args": ["run"]
}
}
}
Config file paths by client and OS:
| Client | macOS | Linux | Windows |
|---|---|---|---|
| Antigravity | ~/.gemini/antigravity/mcp_config.json | same | %USERPROFILE%\.gemini\antigravity\mcp_config.json |
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json | ~/.config/Claude/claude_desktop_config.json | %APPDATA%\Claude\claude_desktop_config.json |
| Cursor | .cursor/mcp.json (project root) | same | same |
| VS Code | .vscode/mcp.json (project root) | same | same |
Note: Cursor and VS Code configs are workspace-scoped — place the file at the root of your project.
Tip: After installing
odoo-mcp-multi, runodoo-mcp skills install <agent>(e.g.,antigravity,claude,gemini) to symlink these skills into your IDE's global skills directory.
With the config above each client session starts its own server. When many
sessions stay open at once, start one server with
odoo-mcp serve --auth local --port 5010 (see the odoo-mcp-cli skill for
its flags, why it only binds loopback and where its token lives) and point
every client at it:
{
"mcpServers": {
"odoo": {
"type": "http",
"url": "http://127.0.0.1:5010/mcp",
"headers": {"Authorization": "Bearer <contents of ~/.config/odoo-mcp/local-token>"}
}
}
}
Keep the server name odoo so tool names and permissions stay the same. The
Claude Code plugin of this package declares its own stdio odoo server, so a
session with the plugin enabled still starts one process of its own.
The server runs each tool call in a worker thread, so calls from different sessions, and calls an agent sends in parallel, really execute at the same time. Two consequences:
create then write on the new id,
search_count before unlink, a read that must see a write. Send them one
after another and wait for each result.serve (--max-concurrency), 40 in run;
further calls wait for a free worker without blocking the server.If executing odoo-mcp CLI commands inside a sandboxed AI agent environment results in:
Fatal Python error: init_import_site OR PermissionError: .../pyvenv.cfgRefer to AGENT.md / CLAUDE.md at repository root for least-privilege target path permissions (~/.local/pipx/venvs/odoo-mcp-multi/ or ~/.local/share/uv/tools/odoo-mcp-multi/) and zero-retry resolution directives.
list_available_profiles — Discover EnvironmentsLists all configured Odoo profiles with name, URL, database, and default status.
list_available_profiles()
# -> {"count": 25, "profiles": [{"name": "prod", "url": "...", "database": "...", "is_default": true}, ...]}
Report the number of profiles from count; do not count the list yourself.
search_read — Query Records| Parameter | Type | Default | Description |
|---|---|---|---|
model | string | (required) | Model name (e.g., res.partner) |
domain | string | [] | Search domain |
fields | string | "" | Comma-separated field names (explicit fields recommended) |
limit | int | 25 | Max records to return (default: 25) |
offset | int | 0 | Records to skip (pagination) |
order | string | "" | Sort order (e.g., name asc) |
format | string | json | Response format (see below) |
profile | string | (default) | Target profile name |
Token Efficiency Tip: Results remain in context for the entire session. Always pass explicit
fields(omittingfieldsreturns all fields and adds an efficiency hint). Preferformat='compact'or'csv'for large reads to cut token usage by ~60%.
Choose the format based on what you need to do with the data:
| Format | Data key | Token cost | Data loss | Best for |
|---|---|---|---|---|
json | records | High (baseline) | None | Parsing/processing values programmatically |
compact | headers + rows | ~40% of json | None | Exploring large datasets efficiently |
table | data (Markdown) | ~40% of json | Truncates >50 chars | Showing summaries to the user in chat |
html | data (HTML) | ~50% of json | None | Pasting into Odoo chatter/Knowledge/reports |
csv | data (CSV) | ~30% of json | None | Spreadsheet export or feeding back to import_records |
All formats include the same pagination envelope (total, limit, offset, has_more, next_offset, format).
Default (json):
{
"records": [{"id": 1, "name": "Alice"}],
"total": 1500,
"limit": 25,
"offset": 0,
"has_more": true,
"next_offset": 25,
"format": "json"
}
compact:
{
"headers": ["id", "name"],
"rows": [[1, "Alice"], [2, "Bob"]],
"total": 1500,
"has_more": true,
"format": "compact"
}
Important: Always check
has_more— iftrue, usenext_offsetto fetch the next page.
# Default JSON format
search_read(model="res.partner", domain="[('is_company', '=', True)]", fields="name,email", limit=10, profile="prod")
# Compact format for large datasets
search_read(model="res.partner", fields="name,email,phone", limit=500, format="compact")
# Markdown table for user-facing summaries
search_read(model="sale.order", fields="name,partner_id,amount_total,state", format="table")
# HTML for pasting into Odoo
search_read(model="res.partner", fields="name,email", format="html")
# CSV for spreadsheet export
search_read(model="res.partner", fields="name,email,phone", format="csv")
Always check has_more — if true, call again with next_offset:
# Page 1
result = search_read(model="res.partner", fields="name", limit=25, offset=0)
# result["has_more"] == true, result["next_offset"] == 25
# Page 2
result = search_read(model="res.partner", fields="name", limit=25, offset=25)
# Continue until has_more == false
search_count — Count RecordsToken-efficient sizing probe (~100 bytes): call it before a wide
search_read to decide on limit/pagination instead of reading blind.
| Parameter | Type | Default | Description |
|---|---|---|---|
model | string | (required) | Model name |
domain | string | [] | Search domain |
profile | string | (default) | Target profile name |
search_count(model="account.move", domain="[('state', '=', 'posted')]")
read_group — Totals and BreakdownsOne row per group, computed by Odoo: use it for sums, counts and breakdowns
instead of a wide search_read added up by hand.
| Parameter | Type | Default | Description |
|---|---|---|---|
model | string | (required) | Model name |
groupby | string | (empty) | Comma-separated groupby specs: a field, or field:granularity for a date or datetime field, with day, week, month, quarter or year (partner_id, date:month). Empty returns one row with the totals |
aggregates | string | __count | Comma-separated field:agg (sum, avg, min, max, count, count_distinct) and/or __count. Only stored fields can be aggregated |
domain | string | [] | Search domain |
having | string | (none) | Domain over the aggregates, to keep only some groups ([('amount_total:sum', '>', 1000)]). Odoo 19+ only |
order | string | (none) | Sort over groupby specs or aggregates (amount_total:sum desc) |
limit | int | 80 | Maximum number of groups |
offset | int | 0 | Groups to skip |
format | string | json | json, compact, table, html or csv |
profile | string | (default) | Target profile name |
read_group(
model="account.move",
groupby="partner_id",
aggregates="amount_total:sum,__count",
domain="[('state', '=', 'posted')]",
order="amount_total:sum desc",
limit=10,
)
# -> {"groups": [{"partner_id": [7, "Azure Interior"], "amount_total:sum": 1234.5, "__count": 3}, ...],
# "count": 10, "limit": 10, "offset": 0, "has_more": true, "next_offset": 10, "format": "json"}
Each row carries the groupby specs, each aggregate under its field:agg name and
__count, on Odoo 17, 18 and 19+ alike: the server's formatted_read_group is used
on 19+ and read_group before. __count is the number of records in the group,
whether asked for or not; the envelope's count is the number of groups. Several
aggregates of one field (amount_total:sum,amount_total:avg) each keep their own
value, and every aggregate needs its function: amount_total alone is refused. The value of a group is the server's own: a date
group is a label on 17/18 ("2026") and a [start, label] pair on 19+. Odoo does
not report how many groups exist, so has_more is true when the page came back full.
Allowed wherever search_read is allowed, and marked read-only.
write — Update Records| Parameter | Type | Default | Description |
|---|---|---|---|
model | string | (required) | Model name |
ids | string | (required) | Record IDs as JSON array or comma-separated |
values | string | (required) | Field values as JSON object |
profile | string | (default) | Target profile name |
write(model="res.partner", ids="[1, 2]", values='{"phone": "+52 555 1234"}', profile="prod")
unlink — Delete RecordsDeleting is irreversible. First read the exact records (search_read on those ids with the identifying fields) and the records that depend on them; on a model with an active field add ('active', 'in', [True, False]) to the domain, because these reads take no context and otherwise skip archived records. A deleted res.users leaves its res.partner behind (partner_id is ondelete='restrict'). Show the list and get confirmation. Archive (active=False) when the record has business history. After the call, read the same ids back (archived ones included) and report what you observe. On a read-only profile unlink is refused before any request: report the refusal, and never say the records were deleted.
| Parameter | Type | Default | Description |
|---|---|---|---|
model | string | (required) | Model name |
ids | string | (required) | Record IDs as JSON array or comma-separated |
profile | string | (default) | Target profile name |
unlink(model="res.partner", ids="[10, 11, 12]", profile="prod")
create — Create Records| Parameter | Type | Default | Description |
|---|---|---|---|
model | string | (required) | Model name |
values | string | (required) | Field values as JSON object |
profile | string | (default) | Target profile name |
create(model="res.partner", values='{"name": "Alice", "email": "[email protected]"}', profile="prod")
export_records — Native ExportExport via Odoo's export_data. Returns a pagination envelope with an array of
dicts — ideal for retrieving External IDs.
| Parameter | Type | Default | Description |
|---|---|---|---|
model | string | (required) | Model name |
domain | string | [] | Search domain |
fields | string | id,name | Comma-separated field names |
limit | int | 500 | Max records to export |
offset | int | 0 | Records to skip (pagination) |
format | string | json | Response format: json, compact, table, html, csv |
profile | string | (default) | Target profile name |
export_records(model="res.partner", domain="[('active', '=', True)]", fields="id,name,country_id/id")
Tip: Use
field_id/idsyntax to export External IDs of relational fields. Checkhas_morein the response to know if more pages exist.
import_records — Native Import (Bulk)Import via Odoo's load. Updates records with matching External IDs; creates new ones otherwise.
| Parameter | Type | Default | Description |
|---|---|---|---|
model | string | (required) | Model name |
fields | string | (required) | Comma-separated field names |
rows | string | (required) | JSON array of dicts with data |
profile | string | (default) | Target profile name |
import_records(
model="res.partner",
fields="id,name,phone",
rows='[{"id": "base.res_partner_1", "name": "Updated", "phone": "12345"}, {"name": "New Partner", "phone": "67890"}]',
)
execute_kw — Execute Any Method| Parameter | Type | Default | Description |
|---|---|---|---|
model | string | (required) | Model name |
method | string | (required) | Method to execute |
args | string | [] | Positional arguments as JSON array |
kwargs | string | {} | Keyword arguments as JSON object |
profile | string | (default) | Target profile name |
execute_kw(model="sale.order", method="action_confirm", args="[[42]]")
[!WARNING] On XML-RPC profiles, a method that returns
None(for examplemail.mail.send) ends in an execution fault containingcannot marshal None unless allow_none is enabled, after the method already ran and its transaction was committed. The fault alone does not prove that the operation failed or that an email was delivered. Do not retry solely because of this response: first determine the committed outcome, since repeating a non-idempotent operation can duplicate side effects. Formail.mail.send, readstateandfailure_reason(and account forauto_delete); stock Odoo 17/20 skips mail that is no longer outgoing.
JSON-2 (Odoo 19+) has no positional arguments: every method parameter is named in the request body. The adapter maps positional args to names from a built-in table of common ORM methods, otherwise from the server's method documentation, and falls back to a heuristic when that lookup fails, so a positional call to any other method can reach the server without a required parameter such as domain. On JSON-2 profiles, put method parameters in kwargs and keep args for record ids; for @api.model methods use args="[]" and name every required parameter:
# Count tasks per stage, archived ones included; check the grouping field with list_fields first.
execute_kw(
model="project.task",
method="formatted_read_group",
args="[]",
kwargs='{"domain": [], "groupby": ["stage_id"], "aggregates": ["__count"], "context": {"active_test": false}}',
profile="staging",
)
A grouped read goes through execute_kw, which a read-only profile (step 1) leaves out. To allow only this read, add execute_kw to allowed_operations together with "execute_kw_allow": [{"model": "project.task", "method": "formatted_read_group"}]; otherwise count each group with search_count.
read_group is deprecated since 19.0 in favour of formatted_read_group; if a client still calls it, name domain, fields and groupby the same way. The database's /doc page lists the methods and parameters it exposes.
On a missing-argument error, compare the method signature with the named payload, fix it and retry the read-only call once; do not change authentication or the business domain to repair argument binding. Check success, error and the inner result, not merely that the call returned.
Every JSON-2 call runs in its own transaction, so a client sequence of create/write calls cannot be rolled back as a unit. For multi-record business changes exposed to agents, provide one authorized model method that performs them in a single transaction (the pattern of action_confirm), and test permissions, conflict handling and replay against the same method the UI uses.
Reference: Odoo External JSON-2 API.
Posting HTML with message_post: from 17.0, Odoo escapes a str body and shows
the tags as plain text. To post HTML (a formatted chatter message or log note) as an
internal user, pass body_is_html: true in kwargs. Use subtype_xmlid: "mail.mt_note"
for an internal note and partner_ids to notify people. On 14.0–16.0 the parameter
does not exist and the HTML body is sent as is; for a portal or other non-internal
user on 17.0–20.0, body_is_html has no effect. The
odoo-messaging skill
covers those cases.
execute_kw(
model="project.task",
method="message_post",
args="[[42]]",
kwargs='{"body": "<p>Hello</p>", "body_is_html": true, "subtype_xmlid": "mail.mt_note"}',
)
In Odoo module code (Python) you pass a markupsafe.Markup body instead; see
the safe-message-post skill.
JSON has no Markup type, so body_is_html is the equivalent over the MCP.
list_models — Discover Models| Parameter | Type | Default | Description |
|---|---|---|---|
search | string | "" | Filter models by name or technical name |
format | string | json | Response format: json, compact, table, html, csv |
profile | string | (default) | Target profile name |
list_models(search="partner", profile="prod")
list_fields — Inspect Model Schema| Parameter | Type | Default | Description |
|---|---|---|---|
model | string | (required) | Model name to inspect |
format | string | json | Response format: json, compact, table, html, csv |
profile | string | (default) | Target profile name |
list_fields(model="account.move", profile="prod")
get_version — Server Versionget_version(profile="prod")
get_financial_report — Financial ReportsCalculate and format Odoo financial reports (Balance Sheet, P&L, Trial
Balance, ledgers) for Odoo 17.0, 18.0 and 19.0+. For the full report
catalog, date filters, and formatting guidance use the dedicated
odoo-financial-reports skill.
get_financial_report(report_id_or_name="Balance Sheet", date_filter="this_year", format="table")
| Natural Language | Odoo Domain |
|---|---|
| name contains "Juan" | [('name', 'ilike', 'Juan')] |
| state is "sale" | [('state', '=', 'sale')] |
| amount > 1000 | [('amount_total', '>', 1000)] |
| date after 2024-01-01 | [('create_date', '>=', '2024-01-01')] |
| country is Mexico or USA | ['|', ('country_id.code', '=', 'MX'), ('country_id.code', '=', 'US')] |
| Operator | Meaning |
|---|---|
= | Equal |
!= | Not equal |
ilike | Case-insensitive contains |
>, <, >=, <= | Comparison |
in | Value in list |
not in | Value not in list |
User: "Find all contacts with 'John' in their name"
Action:
search_read(model="res.partner", domain="[('name', 'ilike', 'John')]", fields="name,email,phone")
User: "Export all active products from staging and import them to prod"
Action:
# Step 1: Export from staging
export_records(
model="product.template", domain="[('active', '=', True)]", fields="id,name,list_price", profile="staging"
)
# Step 2: Import to prod (use the exported rows as input)
import_records(model="product.template", fields="id,name,list_price", rows="[...]", profile="prod")
All tools return JSON. On error, the response contains an error key:
{"error": "Profile 'staging' not found."}
| Error | Cause | Fix |
|---|---|---|
| Profile not found | Invalid profile name | Run list_available_profiles |
| Connection refused | Odoo server down or wrong URL | Check profile URL and port |
| Model not found | Typo in model name | Use list_models to discover |
| Access denied | Wrong credentials or permissions | Verify profile credentials |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
Generated from the plugin's indexed repository (vauxoo/mcp.odoo) — no native marketplace selected
npx claudepluginhub p/vauxoo-odoo-mcp3 skills in this plugin
/odoo-financial-reportsUse this skill when you need to fetch, calculate, analyze, or format Odoo financial reports (Balance Sheet, Profit & Loss, Trial Balance, Partner Ledger, General Ledger, Cash Flow, DIOT) via Odoo MCP. Triggers on: 'financial report', 'balance sheet', 'profit and loss', 'trial balance', 'partner ledger', 'general ledger', 'accounting report', 'financial statement', 'p&l', 'diot'./odoo-mcp-cliUse this skill when you need to manage Odoo profiles or run data operations directly from the terminal using the odoo-mcp CLI. Triggers on: 'add profile', 'list profiles', 'test connection', 'search records cli', 'export records', 'import records cli', 'run mcp server', 'shared mcp server', 'mcp over http', 'odoo-mcp command', 'delete records cli', 'unlink records'.