Skip to main content
Glama

odoo-hands

Give your AI agent hands on Odoo. An MCP server that drives a running Odoo web client (Odoo 16 and Odoo 8) through its UI, the way a user would — inspired by Marionette MCP for Flutter.

"Open Sales > Quotations, create a quotation for Azure Interior with 3 office chairs, then confirm it."

The agent sees a compact description of the current screen (fields, buttons, tabs, statusbar, list rows) and acts with a small set of tools that speak Odoo: menus, fields and buttons by technical name, notebook tabs, editable list lines. No CSS selectors, no per-ticket code. Server errors (UserError, tracebacks) are intercepted from the JSON-RPC responses and reported with every action.

Nothing is installed in Odoo. The agent logs in like a person, gets that user's rights and nothing more, and every action goes through the same onchanges and validations as a human click — which is the point: reproduce a bug the way the user met it, validate a screen after a change, collect screenshots for a test report, and turn the session into an Odoo web_tour test.

Other Odoo MCP servers give agents eyes on the data (XML-RPC / JSON-RPC CRUD). This one gives them hands on the interface; orm_call is there for the data side when you need both. When the screen itself does not matter, connect(mode="orm") skips the browser and the form_* tools drive the same form view server-side (Without the browser).

Demo

Recorded against the bundled vanilla Odoo 16.0 (docker compose up). Each clip is one prompt to Claude Code; the browser on the left is driven entirely through its UI, and the terminal on the right is what the agent reports back. The source files are in docs/demo/.

Full walkthrough (5 min)

The five use cases below, back to back, in one uninterrupted session.

https://github.com/user-attachments/assets/90f689ed-c13e-4438-b973-214268f6a0d0

Create a quotation and confirm it

Connect to Odoo, open Sales > Orders > Quotations, create a quotation for Azure Interior with 3 Large Desk and 2 Cabinet with Doors, save it and confirm it. Then tell me the order number and its state.

https://github.com/user-attachments/assets/3b70f891-dbec-4f5f-b8cd-4dac0d432f7a

Hit a server error, read it, then recover

Now try to delete that order from the Actions menu and tell me exactly what Odoo answers.

Odoo refuses ("You can not delete a sent quotation or a confirmed sales order…"); the message is intercepted and reported. A follow-up — "so cancel it first and delete" — cancels the order (handling the Cancel Sales Order wizard without sending the email) and deletes it.

https://github.com/user-attachments/assets/6500197c-815a-4979-b9df-785a67fa92b3

Read a screen

Open Inventory > Products > Products, open "Large Desk" and give me its sales price, cost and the quantity on hand.

https://github.com/user-attachments/assets/b9e36445-1879-429a-8d88-6594fc7c8d71

Find a record and screenshot it

Go to Contacts, search for Deco Addict, open it and take a screenshot of the form.

The Contacts app is not installed on this database; the agent notices and reaches the same record through Sales > Orders > Customers.

https://github.com/user-attachments/assets/ab43acc6-4a65-4356-85e2-07c49f093801

Query the data, then open a record

How many quotations are still in draft? Open the most recent one.

orm_call counts them; the most recent is then opened through the UI.

https://github.com/user-attachments/assets/65637da1-2c3a-4bfa-bc84-3926a1300a24

Related MCP server: Cloudflare Playwright MCP

Requirements

  • Python 3.12 + uv

  • A running Odoo 16 (16.0 and saas~16.4 tested) or Odoo 8 (8.0 tested) reachable on localhost — or the bundled docker-compose.yml (Odoo 16.0 + demo data on port 8069)

  • Chromium for Playwright (uv run playwright install chromium if missing)

Setup

git clone https://github.com/<you>/odoo-hands && cd odoo-hands
uv sync
cp .env.example .env        # then set ODOO_URL / ODOO_DB / ODOO_LOGIN / ODOO_PASSWORD

Start your Odoo instance as usual (the server never starts Odoo itself), then register the MCP server in Claude Code (user scope, so it is available from any project):

claude mcp add --scope user --transport stdio odoo-hands -- \
  uv --directory /path/to/odoo-hands run odoo-hands

Append --headless after odoo-hands to hide the browser window. By default a Chromium window opens so you can watch the agent work. Append --orm (or set ODOO_MCP_MODE=orm) to log in without a browser by default. Any MCP client that speaks stdio works the same way (uv run odoo-hands).

Tools

Tool

What it does

connect(url?, db?, login?, password?, headless?, mode?)

Open the browser, log in, check the Odoo version; mode="orm" logs in over HTTP only. Defaults from .env. Localhost only unless ODOO_MCP_ALLOW_REMOTE=1.

disconnect()

Close the browser (or the HTTP session); returns the session's .webm when ODOO_MCP_VIDEO_DIR is set.

where_am_i()

Menu path, model, record id, view type, record state, dirty/new flags, open dialog, notifications.

get_elements(scope?, include?, include_empty?)

Fields (name, label, type, widget, value, required/readonly/invalid), buttons (name, label, kind), tabs, statusbar, x2many lists with rows, list/kanban rows, facets, pager. Scoped to the open dialog when there is one.

open_menu(path)

"Ventes > Commandes > Devis" or an xmlid such as sale.menu_sale_quotations.

open_record(model, res_id?, view_type?)

Open a record form, a list/kanban, or a blank new record.

set_field(name, value, line?, list_field?)

Set a field by technical name: text, numbers, many2one (autocomplete), selection, boolean, date/datetime (ISO), many2many tags, html. Switches tab automatically. line/list_field target a cell of an editable list (a one2many, or the list view itself when list_field is omitted); hidden optional columns are enabled on demand.

add_line(field, values, create?)

Add and fill a line in a one2many (inline editable list, or popup form fallback). Reports invalid_cells when the row cannot be committed, or kept_in_edition when the list lives in a dialog (Odoo commits those rows on save).

click_button(name, timeout?)

Header/smart/inline buttons by name, new / save / discard, statusbar states, notebook tabs, dialog buttons, or any button by label.

click_row(index_or_text, list_field?)

Open a list/kanban row (by index or by text); the click lands on a plain text cell, never on a star/checkbox/handle widget. In a Search More dialog it selects the record.

delete_line(field, line)

Remove a row of a one2many list (index or "editing") via its trash icon.

action_menu(item)

Pick an entry of the cog / Actions dropdown by label (Delete, Duplicate, Archive…).

search(text, clear?, field?)

Type in the search box; field picks the facet ("Product", "Customer"…) instead of the default one.

save()

Save the form (or form dialog); reports invalid required fields.

open_url(path)

Navigate to any path of the Odoo host: kiosk / website pages (/wms/reception) are driven as plain HTML, /web comes back to the client.

screenshot(path?, full_page?)

PNG of the browser, returned as an image and saved under screenshots/.

orm_call(model, method, args?, kwargs?)

Server-side call through the logged-in session (prepare or verify data), over HTTP in both modes.

form_open(model?, res_id?, action?, view_id?, context?)

Headless form: load the form view, then the record or a new one with its defaults and onchanges. action (xmlid or id) brings the menu's context and view.

form_get(include_invisible?)

Fields with values and required/readonly flags, one2many rows, visible buttons of the headless form.

form_set(name, value, line?, list_field?)

Set a field (or a one2many cell) if a user could: refused when invisible or read-only, then the onchanges run and every changed field is returned.

form_add_line(field, values, create?) / form_delete_line(field, line)

Add a one2many line (defaults, then each value with its onchange) or remove one.

form_save() / form_button(name)

Save what the form view would send; click a visible button (saves first, opens wizards on top, follows form actions). "discard" closes a wizard.

evaluate_js(expression)

Escape hatch, disabled unless ODOO_MCP_ALLOW_JS=1.

export_tour(name, format?, module?)

Turn the session's actions into an Odoo web_tour (JS file + HttpCase test + manifest line).

run_tour(name?, steps_js?)

Replay the recording (or given steps) as a tour inside the open browser, to validate an export.

get_errors(since?, clear?)

Intercepted RPC errors with tracebacks, JS errors, error dialogs, error notifications.

Every action returns changes (state transition, navigation, dialog opened/closed, notifications, downloads), errors raised during the action, and the resulting location.

Without the browser (orm mode)

connect(mode="orm") logs in with /web/session/authenticate and never starts Chromium: about 0.7 s instead of ~6 s, and no screen descriptions in the agent's context. UI tools then answer "not available in orm mode". In UI mode the browser's session cookie is reused over HTTP, so orm_call and the form_* tools work there too.

The form_* tools replay the web client's form logic with JSON-RPC, as the logged-in user (same access rights and record rules):

  • the form view comes from get_views (Odoo 16) or fields_view_get (Odoo 8), with the modifiers the server computed;

  • a new record gets its defaults and first onchange, every form_set / form_add_line runs the onchange of the field (and the one2many's own onchange on the parent), and returns what changed;

  • invisible and read-only fields are refused, required fields are checked on save, read-only fields are not sent unless force_save="1", and only changed fields are written;

  • form_button only clicks a button the user can see for the current values, saves first like the UI, then follows the action: a wizard (target="new") opens on top, act_window_close goes back and reloads, a form action navigates.

What stays UI-only: logic written in JavaScript (custom widgets, OWL overrides such as the product configurator that fills product_id from product_template_id), rendering, screenshots and tours. Attribute expressions that cannot be evaluated (an unknown name in a context, domain or modifier) are listed in uncertain instead of being guessed. The Odoo 8 path is not covered by the live tests yet.

Profiles

The version is detected at connect and selects a profile (profiles/): every selector and page hook lives there.

Profile

Detected on

Notes

odoo16

Odoo 16.0 and saas~16.x web client (OWL)

Fields by name, menus via the menu service, xmlids known client-side.

odoo8

Odoo 8 web client (openerp.client)

Widgets are tagged from the JS widget tree (data-mcp-field / data-mcp-button). Forms open read-only: set_field / add_line click Edit automatically. Menu xmlids are resolved through ir.model.data. many2many tags and html (CKEditor) fields are not supported.

plain

Any other page of the host (kiosk /wms/*, website)

Inputs by name/id, buttons and links by label, tables as rows.

Odoo 8 example (.env or connect arguments):

ODOO_URL=http://localhost:8069 ODOO_DB=my_odoo8_db ODOO_LOGIN=admin ODOO_PASSWORD=admin

On a large database (prod copy) list loads and saves can take tens of seconds: raise ODOO_MCP_TIMEOUT_MS or pass timeout to click_button / save.

Example prompts

  • "Connect to Odoo, open Sales > Quotations and create a quotation for customer with 3 product, then confirm it."

  • "Open order S00042 and tell me why confirming it fails."

  • "Go to Inventory > Transfers, open the first waiting transfer and take a screenshot."

  • "Replay what you just did as a web_tour and give me the HttpCase test."

Menu labels are matched without accents or case, in whatever language the user's Odoo runs in.

Tests

uv run pytest -m "not live"      # unit tests, no Odoo needed
docker compose up -d             # optional: vanilla Odoo 16.0 with demo data on http://localhost:8069 (db odoo_hands, admin/admin)
uv run pytest -m live            # against the instance in .env (skipped when unreachable); add --keep to keep test records
MCP_TEST_HEADED=1 uv run pytest -m live -k smoke     # watch the smoke scenario in a window
ODOO8_URL=http://localhost:8069 ODOO8_DB=my_odoo8_db uv run pytest -m live tests/test_v8_profile.py

Live tests need sale_management (and purchase for one regression test and the headless form tests) and pick their partner / product from the database; set ODOO_TEST_PARTNER / ODOO_TEST_PRODUCT to choose them. Required custom fields are filled on the fly.

Live tests create quotations tagged client_order_ref = MCP-SMOKE-<timestamp> and delete them afterwards (their pickings too, when a test confirms an order). tests/test_regressions.py replays the failures met in real sessions.

Limits

  • Odoo 16 and Odoo 8 (profiles/v16.py, profiles/v8.py hold every selector; other versions are separate profiles).

  • Many2one values are picked from the autocomplete suggestions (exact > code segment > prefix > contains); use {"index": 0}, {"create": "Name"} or {"search_more": "query"} for the other dropdown entries.

  • export_tour / run_tour target the OWL tour service (saas~16.4, 17+). On 16.0 the exported steps still apply, but they must be registered with the legacy tour.register and started with odoo.startTour.

  • Odoo's onboarding tour bubbles (.o_tour_pointer) are hidden in the driven browser: they intercept clicks next to their target. Dates are committed with a change event (Enter would add a row in editable lists).

  • The browser is a single page: one action at a time, one MCP session per Odoo instance.

  • Passwords never appear in tool outputs or logs; keep .env out of git (it is ignored).

License

MIT — see LICENSE. Odoo is a trademark of Odoo S.A.; this project is not affiliated with or endorsed by Odoo.

Available Tools

21 tools
action_menuA

Pick an entry of the cog / "Actions" dropdown of the current view by label (e.g. "Delete", "Duplicate", "Archive"). A confirmation dialog, if any, is reported (changes.dialog_opened): confirm it with click_button on its button (e.g. "Delete" or "Ok"), or click_button("discard") to cancel.

Inputs: item (required), scope. Returns: result

add_lineA

Add a line to a one2many/many2many list field (e.g. order_line) and fill it: click "Add a line", set each cell in the given order (put the main many2one such as product_id first), validate the row. If required cells are missing the row stays in edition and invalid_cells lists them (fill them with set_field(..., line="editing", list_field=...)). Falls back to the popup form when the list is not editable inline. create: label of the add link when there are several.

Inputs: field (required), values (required), scope, create. Returns: result

click_buttonB

Click a button by technical name (e.g. action_confirm) or label. Also: "new", "save", "discard", "save_new", a statusbar state, a notebook tab (name or label), a dialog footer button. Waits for the resulting RPCs and reports state change, navigation, opened/closed dialog, notifications and server errors. timeout in ms for long actions.

Inputs: name (required), scope, timeout. Returns: result

click_rowA

Open a row of the current list/kanban view (0-based index, or text matched against the row content). list_field targets a one2many list inside a form instead.

Inputs: index_or_text (required), scope, list_field. Returns: result

connectA

Open a browser on the Odoo instance and log in. Arguments default to ODOO_URL/ODOO_DB/ODOO_LOGIN/ODOO_PASSWORD from .env. Must be called before any other tool. Refuses non-localhost URLs unless ODOO_MCP_ALLOW_REMOTE=1.

Inputs: db, url, login, headless, +1 more. Returns: result

delete_lineA

Remove a row from a one2many/many2many list field (e.g. order_line) by clicking its trash icon. line: 0-based row index, or "editing" for the row currently in edition. Nothing is saved until save/validate.

Inputs: line (required), field (required), scope. Returns: result

disconnectC

Close the browser.

Inputs: no named parameters. Returns: result

evaluate_jsA

Escape hatch: evaluate a JavaScript expression in the Odoo page (async allowed; env = the web client env, __mcp = the injected inspector). Disabled unless ODOO_MCP_ALLOW_JS=1. Result truncated at 20 kB.

Inputs: expression (required). Returns: result

export_tourB

Turn the actions performed in this session (open_menu, set_field, add_line, click_button, click_row, search, save) into an Odoo web_tour: JS tour file + HttpCase test + manifest asset line. format: all | js | python | json (raw steps). clear=True empties the recording afterwards. Review the generated selectors before committing them.

Inputs: name (required), url, clear, login, +2 more. Returns: result

get_elementsA

List the interactive elements of the current screen (or of the open dialog when scope='auto'/'dialog'): fields (name, label, type, widget, value, required/readonly/invalid), buttons (name, label, kind), notebook tabs, statusbar, x2many lists with their rows, list/kanban rows, search facets, pager. include: subset of ["fields","buttons","tabs","statusbar","lists","rows","facets","pager"]. Output is compact and truncated.

Inputs: scope, include, include_empty. Returns: result

get_errorsA

Return intercepted errors: server RPC errors (with traceback), JS errors, open error dialogs, error notifications. since: only entries with seq > since. clear: empty the buffer afterwards.

Inputs: clear, since. Returns: result

open_menuA

Open a menu by label path ("Ventes > Commandes > Devis", separators > or /) or by xmlid ("sale.menu_sale_quotations"). Labels are matched case/accent-insensitively (exact > prefix > contains). Returns the resulting location.

Inputs: path (required). Returns: result

open_recordA

Open a record (model + id) in a form, or a model's list/kanban view (view_type="list"/"kanban"). Without res_id and view_type="form", opens a blank new record. Prefer click_button("new") from a list to keep the menu's defaults.

Inputs: model (required), res_id, view_type. Returns: result

open_urlA

Navigate to a URL path on the connected Odoo host (e.g. "/wms/reception" for a kiosk page, or "/web" to come back to the web client). Plain HTML pages are then driven through get_elements / set_field / click_button too.

Inputs: path (required). Returns: result

orm_callA

Call a model method server-side through the logged-in web session (e.g. search_read, read, name_search, create for test data). Bypasses the UI: use it to prepare or verify data, not to replace the user flow. Result truncated at 20 kB.

Inputs: model (required), method (required), args, kwargs. Returns: result

run_tourA

Replay the recorded actions as an Odoo web_tour inside the open browser (auto mode), to validate an export_tour result before adding it to a module. steps_js: a JS array of tour steps to run instead of the recording. Returns success/failure with the failing step description.

Inputs: name, timeout, steps_js. Returns: result

saveA

Save the current form (or the open form dialog). Reports invalid required fields and server errors. timeout in ms.

Inputs: scope, timeout. Returns: result

screenshotA

Take a PNG screenshot of the browser (saved under screenshots/ unless an absolute path is given) and return it.

Inputs: path, full_page.

set_fieldA

Set a field on the current form (or open dialog), by technical field name. Handles char/text/number, many2one (type + pick the matching suggestion; {"index": 0} picks the first suggestion, {"create": "Name"} quick-creates, {"search_more": "query"} opens the selection dialog), selection (value or label), boolean, date/datetime (ISO "2026-09-18" or "2026-09-18 14:30"), many2many tags (string or list), html. Switches notebook tab automatically when needed. For a cell of an editable list: line=<row index or "editing">, list_field=; the row is then validated (commit=True) and invalid cells are reported. Returns the value read back and the other fields changed by onchange.

Inputs: name (required), value (required), line, scope, +2 more. Returns: result

where_am_iA

Describe the current screen: menu path, model, record id, view type, record state, dirty/new flags, open dialog, notifications.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 21 tools

    Disambiguation4/5

    Most tools target distinct actions (navigation, form editing, list manipulation, debugging), but some overlap exists: 'open_menu' vs 'open_record' vs 'open_url' all navigate, and 'action_menu' vs 'click_button' both handle dropdown/button actions. 'get_elements' and 'where_am_i' both describe the current screen, though with different granularity.

    Naming Consistency4/5

    The naming is predominantly verb_noun (open_menu, set_field, add_line, delete_line, click_button, click_row, export_tour, run_tour, get_errors), with a few exceptions like 'where_am_i' and 'orm_call' that break the pattern. Overall the convention is clear and predictable.

    Tool Count4/5

    21 tools is on the higher end but justified for a browser automation server covering navigation, form interaction, list editing, debugging, and tour export/replay. A few tools (evaluate_js, orm_call, export_tour, run_tour) are advanced escape hatches that could be optional, but they serve distinct purposes.

    Completeness5/5

    The tool set covers the full lifecycle of UI automation: connect/disconnect, orientation (where_am_i), element discovery (get_elements), navigation (open_menu, open_record, open_url), form filling (set_field, add_line, delete_line), actions (action_menu, click_button, click_row, search, save), verification (screenshot, get_errors), and even test export/replay. No obvious dead ends for the stated purpose of driving an Odoo instance.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers