MCP Server for Odoo 19
Odoo MCP
TypeScript MCP server built with mcp-use for Odoo 19 External JSON-2 API.
Documentation
See docs/SUMMARY.md for architecture, codebase, code standard, and project context docs.
Open Source
This project is licensed under the MIT License. See CONTRIBUTING.md for contribution guidelines and SECURITY.md for vulnerability reporting.
Configuration
Create .env or export these variables:
ODOO_URL=https://your-odoo.example.com
ODOO_API_KEY=your-api-key
ODOO_DB=your-database-name
Optional:
PORT=3000
MCP_URL=http://localhost:3000
ODOO_CONTEXT={"lang":"en_US"}
ODOO_MCP_MODELS=product.template,product.product,res.partner,sale.order
ODOO_MCP_ALLOW_WRITE=true
ODOO_MCP_ENABLE_METHOD_CALLS=true
Write tools are registered but refuse to run unless ODOO_MCP_ALLOW_WRITE=true.
The generic method caller refuses to run unless ODOO_MCP_ENABLE_METHOD_CALLS=true.
Run
npm install
npm run dev
Open the inspector at http://localhost:3000/inspector.
Tools
Read tools:
odoo_statuslist_modelslist_resource_templatesget_model_fieldssearch_recordsget_recordcount_recordsaggregate_records
Write and escape-hatch tools:
create_recordupdate_recorddelete_recordcall_model_method
Resources
Static resource:
odoo://config
Resource templates:
odoo://{model}/record/{id}odoo://{model}/fieldsodoo://{model}/searchodoo://{model}/count
Products are accessed through the same generic model surface, using models like
product.template or product.product.
JSON-2 Notes
The server calls Odoo using:
POST /json/2/<model>/<method>Authorization: bearer <ODOO_API_KEY>X-Odoo-Database: <ODOO_DB>whenODOO_DBis configured- JSON bodies with named method arguments such as
domain,fields,ids, andcontext
Reference: Odoo 19 External JSON-2 API.