Odoo MCP
Provides tools for interacting with an Odoo 19+ instance (with 17/18 fallback), covering inventory, manufacturing, sales, purchasing, POS, quality, dashboards, finance, custom modules, and developer gap analysis, plus generic search/read/aggregate/call tools for any Odoo model.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Odoo MCP
A token-efficient MCP server for Odoo 19+ (with 17/18 fallback). It gives any MCP client access to inventory, manufacturing, sales, purchasing, POS, quality, dashboards, finance, custom modules, and developer gap analysis — plus generic tools that work on any Odoo model.
Setup — start here
You need Bun, an Odoo URL, a database name, and an API key. That is the whole required configuration.
1. Install Bun
# Windows PowerShell
powershell -c "irm bun.sh/install.ps1 | iex"
# macOS / Linux
curl -fsSL https://bun.sh/install | bashVerify:
bun --version2. Collect your Odoo values
Value | Where to get it | Example |
| The address you use in the browser, without a trailing slash |
|
| Database name (on Odoo.sh this is usually the subdomain) |
|
| Odoo 19+: Preferences → Account Security → New API Key |
|
For Odoo 17/18, also set ODOO_LOGIN to the user login; the API key is used as the password.
3. Install this server
git clone <this-repo-url> odoo-mcp
cd odoo-mcp
bun install4. Configure it
The easiest path is the interactive setup:
bun run initIt asks for the URL, database, API key, and optionally your addons repo, then writes .env.
Non-interactive version (one line is safest in PowerShell):
bun run init --non-interactive --url https://mycompany.odoo.com --db my_database --api-key "paste-the-key-here" --repo C:\dev\WoocommerceIf .env already exists, add --force to overwrite it.
Resulting .env:
ODOO_URL=https://mycompany.odoo.com
ODOO_DB=my_database
ODOO_API_KEY=paste-the-key-here
ODOO_REPO=C:\dev\Woocommerce
ODOO_REPOis optional. Set it to your custom/third-party addons folder to enableodoo_dev(repo vs database gap analysis),odoo_repo(source search/read), andodoo_custom(custom module discovery).
5. Check the connection
bun run doctorExpected result:
Odoo MCP doctor — https://mycompany.odoo.com / my_database
✓ connection Odoo 19.0 via json2
✓ url https://mycompany.odoo.com
✓ database my_database
✓ user you@example.com
✓ Inventory quants stock.quant · 44 fields
✓ Stock moves stock.move · 126 fields
✓ Lots/serials stock.lot · 59 fields
✓ Sales sale.order · 166 fields
✓ Purchases purchase.order · 111 fields
✓ Manufacturing mrp.production · 139 fields
✓ Point of sale pos.order · 104 fields
✓ Products product.product · 251 fields
✓ source repo 36 modules · 1151 files · 174 models
✓ toolsets core, inventory, … (20 tools)If connection fails, the doctor prints the exact error. Fix that before continuing.
6. Build once
bun run buildThis creates dist/cli.js. You can also run the server directly with Bun without building:
bun src/cli.ts serve.
7. Add it to your MCP client
Use the built server and pass the three values in the client's env block. That way the client
does not depend on which folder it was launched from. Replace C:\dev\odoo-mcp with the folder
where you cloned this repository. If your client cannot find bun, run where.exe bun and use
that full executable path as command.
OpenCode
CLI:
opencode mcp add odoo --env ODOO_URL=https://mycompany.odoo.com --env ODOO_DB=my_database --env ODOO_API_KEY=paste-the-key-here --env ODOO_REPO=C:\dev\Woocommerce -- bun C:\dev\odoo-mcp\dist\cli.js serveOr in opencode.jsonc:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"odoo": {
"type": "local",
"command": ["bun", "C:\\dev\\odoo-mcp\\dist\\cli.js", "serve"],
"cwd": "C:\\dev\\odoo-mcp",
"environment": {
"ODOO_URL": "https://mycompany.odoo.com",
"ODOO_DB": "my_database",
"ODOO_API_KEY": "{env:ODOO_API_KEY}",
"ODOO_REPO": "C:\\dev\\Woocommerce"
}
}
}
}
}OpenCode prefixes MCP tools with the server name. If you name the server odoo, odoo_health
appears as odoo_odoo_health; name the server erp if you prefer erp_odoo_health.
Claude Desktop
Edit %APPDATA%\Claude\claude_desktop_config.json on Windows (or
~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"odoo": {
"command": "bun",
"args": ["C:\\dev\\odoo-mcp\\dist\\cli.js", "serve"],
"env": {
"ODOO_URL": "https://mycompany.odoo.com",
"ODOO_DB": "my_database",
"ODOO_API_KEY": "paste-the-key-here",
"ODOO_REPO": "C:\\dev\\Woocommerce"
}
}
}
}Cursor
Edit ~/.cursor/mcp.json (or .cursor/mcp.json in a project) using the same
mcpServers shape as Claude Desktop.
Any other MCP client
Use this generic stdio configuration:
{
"command": "bun",
"args": ["C:\\dev\\odoo-mcp\\dist\\cli.js", "serve"],
"env": {
"ODOO_URL": "https://mycompany.odoo.com",
"ODOO_DB": "my_database",
"ODOO_API_KEY": "paste-the-key-here",
"ODOO_REPO": "C:\\dev\\Woocommerce"
}
}8. Verify inside the client
Ask your client:
Use odoo_health to check the Odoo connection.Then try:
Use odoo_suggest with question="what is below its reorder point?"That returns ready-to-run tool calls. If odoo_health works, setup is complete.
Related MCP server: foggy-odoo-bridge
Everyday use
You do not need to memorize models or fields. Start with odoo_suggest:
{ "question": "which manufacturing orders are late?" }
{ "question": "which sales lines are delivered but not invoiced?" }
{ "question": "what is in our custom loyalty module?" }It returns 1–3 matched playbooks with copy-ready arguments, plus matching custom models and
modules from your repo. Omit question to browse the playbook catalog by area.
MCP prompts are also included, so clients that support prompts get ready-made investigations:
business_health_check, sales_mismatch_review, inventory_exception_review,
manufacturing_delay_review, pos_reconciliation, custom_module_review,
repo_database_gap_review, lot_recall, slow_moving_stock_review, anything_explore.
Examples that work out of the box:
“Which sales lines are delivered but not invoiced in the last 30 days?”
“Which purchase receipts are short, by vendor?”
“Trace lot ABC123 and tell me which customers received it.”
“Which MOs are overdue, and are they short on components?”
“What is running on the shop floor right now?”
“How much did each POS config sell today, and is any order unpaid?”
“Which customer invoices are overdue, and who owes the most?”
“What is in the CRM pipeline, and where are deals stuck?”
“Which project tasks or maintenance requests are overdue?”
“Which quality checks failed?”
“Which custom modules are not installed, and which models are missing?”
“Why is this custom field missing after deployment?”
“Where is this model/field overridden in our addons repo?”
“Show me stock, sales, purchasing, production, POS, and finance in one board.”
What is included
Tool groups
Every group is optional. Removing groups reduces tool-definition tokens sent to the model.
Toolset | Tools | What it answers |
|
| Orientation, schema discovery, any-model querying, recommendations |
|
| On-hand, reservations, lots/serials, reorder points |
|
| MOs, components, work orders, BOMs, consumption mismatches |
|
| Orders, lines, delivery/invoice mismatches |
|
| Orders, lines, receipt/invoice mismatches |
|
| POS orders, lines, sessions, payments, unpaid orders |
|
| Negative stock, missing lots, stale pickings, duplicates, expiry |
|
| Preset or custom KPI boards across every area |
|
| Repo ↔ database gap analysis, type drift, missing columns, Studio fields |
|
| Module list/detail, source search/read, overrides, views, dependents |
|
| Custom/third-party modules, custom models, overview, grouped queries |
odoo_search, odoo_read, odoo_aggregate, and odoo_call work on any model — including
models from modules you install next month. The specialized tools are conveniences, not limits.
Inventory and lots
{ "product": "SKU-123", "warehouse": "MSA", "summary": true }odoo_inventory resolves SKU/barcode/name, filters to internal/transit locations by default,
and returns quantity, reserved, available, lot, location, and in-date. odoo_lot_trace adds
current quants plus recent moves with source/destination/reference/state.
Sales and purchase mismatch
{ "mode": "mismatch", "problem": "both", "date_from": "2026-01-01", "date_to": "2026-01-31" }odoo_sales and odoo_purchases compute qty_undelivered, qty_uninvoiced, qty_unreceived
per line. They scan a bounded window, state how many rows were scanned, and tell you when to
narrow the filter.
Manufacturing
odoo_manufacturing supports orders, components, workorders, boms, bom_lines,
overview, and mismatch. It works with standard Odoo fields and surfaces custom
manufacturing fields automatically when they exist.
Point of sale
odoo_pos supports orders, lines, sessions, payments, summary, and mismatch.
Custom fields such as loyalty or alert fields are included when present.
Dashboards
{ "preset": "business", "days": 30 }Presets: business, inventory, sales, purchases, manufacturing, pos, quality,
finance, custom. Or pass custom cards:
{
"cards": [
{ "title": "Open MOs", "model": "mrp.production", "domain": { "state": { "in": ["confirmed", "progress"] } }, "aggregate": "count" },
{ "title": "Revenue", "model": "sale.order", "measure": "amount_total", "aggregate": "sum", "groupby": "partner_id" }
]
}Custom modules
{ "action": "modules" }
{ "action": "models", "module": "jani_stock" }
{ "action": "overview", "model": "jani.stock.forecast.demand" }
{ "action": "query", "model": "qrbase.loyalty.member", "groupby": "state" }odoo_custom compares repo manifests with ir.module.module, checks custom models against
ir.model, and summarizes record counts, state distribution, and sample rows.
Developer gap analysis
{ "action": "gap", "model": "stock.lot" }odoo_dev reports:
fields declared in Python but missing from the database (module not installed/upgraded);
fields that
fields_getreports but whose database column is gone (a failed upgrade or removed module);field type drift between code and DB;
DB-only fields (manual/Studio fields and custom module prefixes);
local classes, file:line locations, and XML views for the model.
verify_columns=false skips the stored-field read test when you want a pure metadata comparison.
When the database has a stale column, queries automatically fall back to raw many2one ids instead
of failing, and the result includes a note pointing back to gap analysis.
odoo_repo then lets you search and read the source:
{ "action": "search", "query": "returned_qty", "include": "**/models/*.py" }
{ "action": "read", "path": "custom/jani_stock/models/stock_move_line.py", "start_line": 1, "end_line": 120 }Configuration reference
Precedence, highest first:
environment variables;
.envin the current working directory;odoo-mcp.config.json(explicit path viaODOO_MCP_CONFIG/--config, else cwd, else~/.odoo-mcp/config.json);built-in defaults.
All environment variables
Variable | Default | Purpose |
| — | Odoo base URL (required) |
| — | Database name (required) |
| — | API key (required for Odoo 19+) |
| — | Odoo 17/18 login (legacy fallback) |
| — | Odoo 17/18 password if not using an API key |
| — | Addons path(s), separated by |
| — | Company name or id ( |
| all | Comma-separated tool groups |
|
|
|
|
| Default rows per query |
|
| Hard row cap |
|
| Hard result-size cap |
|
| Cell truncation |
|
| Columns before summarising |
|
| Odoo HTTP timeout |
|
| Max concurrent Odoo requests |
|
| Schema cache lifetime |
|
| Enable write methods via |
|
| Allow non-allowlisted methods |
|
| Allow binary/secret-like fields |
| — | JSONL audit log path |
|
|
|
|
| Profile name in the JSON config |
| — | Path to |
See .env.example for a commented copy.
Profiles (odoo-mcp.config.json)
Keep prod and a dev copy side by side:
{
"defaultProfile": "prod",
"profiles": {
"prod": {
"url": "https://mycompany.odoo.com",
"db": "mycompany",
"apiKeyEnv": "ODOO_PROD_API_KEY",
"repoPaths": ["C:\\dev\\Woocommerce"],
"toolsets": ["core", "inventory", "manufacturing", "sales", "purchases", "pos", "quality", "dashboards", "finance"]
},
"dev": {
"url": "http://localhost:8079",
"db": "mycompany_dev",
"apiKeyEnv": "ODOO_DEV_API_KEY",
"repoPaths": ["C:\\dev\\Woocommerce"],
"toolsets": ["core", "dev", "repo", "custom"],
"allowRawMethods": true
}
}
}Select with --profile dev or ODOO_MCP_PROFILE=dev.
CLI reference
odoo-mcp [serve] [--profile name] [--config path]
odoo-mcp init [--url URL --db DB --api-key KEY] [--repo PATH] [--force] [--non-interactive]
odoo-mcp doctor [--json] [--profile name]
odoo-mcp tools [--json] [--profile name]
odoo-mcp config [--json] [--profile name]
odoo-mcp help | versiondoctor checks connectivity, auth mode, version, user, key models, source repo, write/sensitive
flags, and tool count. tools lists the enabled catalog without connecting.
Token and safety model
Rows:
ODOO_MCP_DEFAULT_ROWS(20) andODOO_MCP_MAX_ROWS(200).Output:
ODOO_MCP_MAX_BYTES(120k) with row, cell, and column caps.Empty columns are dropped; many2one values render as
Label (#id).Schema is cached and only requested fields are fetched.
Binary/password-like fields are blocked by default.
res.users.apikeysandir.config_parameterare blocked; model denylists are configurable.Read-only by default.
odoo_callwrite methods requireODOO_MCP_ALLOW_WRITE=trueandconfirm=true. Arbitrary methods require the method allowlist orODOO_MCP_ALLOW_RAW_METHODS.Optional JSONL audit log via
ODOO_MCP_AUDIT_LOG.
Troubleshooting
Missing ODOO_API_KEY — run bun run init, or set the env var. Odoo 19 API keys are in
Preferences → Account Security.
401/403 — the key user lacks access to the model, the database name is wrong, or the key
was revoked. odoo_health reports the auth mode and user.
404 on a model — use odoo_models to find the technical name. Custom models only exist
after the module is installed.
/web/version fails — the client falls back to JSON-RPC common.version. If both fail,
check ODOO_URL and the network.
“column … does not exist” — the database references a stale module column. Run
odoo_dev with action=gap on the affected model, then upgrade or clean up the module.
Queries automatically fall back to raw ids where possible.
Gap analysis says everything is missing — the model may not be installed in that database,
or the repo path is wrong. Run odoo_custom action=models and bun run doctor.
Odoo 17/18 — set ODOO_LOGIN as well as ODOO_API_KEY; the key is used as the password.
Development
bun install
bun run typecheck
bun test
bun run build
bun scripts/smoke.ts # stdio handshake, tool/prompt list, odoo_suggest callLayout:
src/
config.ts env / .env / profiles / limits
context.ts shared client + schema + repo + tool catalog
cli.ts serve / init / doctor / tools / config
index.ts MCP server assembly
prompts.ts recommended investigation prompts
odoo/ JSON-2 + legacy client, schema cache, domains, fields, resolvers
repo/ manifest parser, module/source index, Python/XML heuristics
format/ bounded Markdown/JSON/CSV rendering
tools/ core, inventory, manufacturing, sales, purchases, pos, quality,
dashboards, dev, repo, custom, suggest
tests/ config, domain, format, manifest/repo, client, tool registrationLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Query live Odoo Online (*.odoo.com) ERP data from MCP clients. Hosted, OAuth, read-only by default.
1Odoo MCP Pack — ERP/CRM via Odoo's external JSON-RPC API.
Odoo MCP connector for ChatGPT and Claude: ask sales, invoices and stock in plain words. Read-only.
Odoo virtual employee via MCP: query, create, modify records, workflows, PDFs, and activities.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables interaction with Odoo ERP systems for product, customer, order, invoice, and payment management using MCP tools.7MIT
- AlicenseNot gradedqualityDmaintenanceGoverned MCP access to Odoo business data, preserving Odoo permissions via a semantic query layer.5Apache 2.0
- FlicenseNot gradedqualityDmaintenanceFull-featured MCP connector for Odoo ERP via XML-RPC, enabling natural language interaction with CRM, sales, inventory, and other Odoo modules.-
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Odoo ERP through MCP, including an additional sql_query tool for custom queries.Mozilla Public 2.0