Odoo MCP Server for AI Assistant ERP Automation
Connect AI assistants to Odoo with an MCP server to access business data and automate ERP workflows securely and efficiently.
npx -y @ivnvxd/mcp-server-odooOverview
The Odoo MCP Server is a lightweight bridge that connects AI assistants to an Odoo instance using the Model Context Protocol (MCP). By exposing a controlled set of Odoo model operations as MCP-compatible tools, the server enables assistants to read business data, create or update records, and trigger workflow actions while preserving access controls and auditability.
This integration is useful for automating ERP tasks—such as creating sales quotations, reconciling invoices, or updating inventory—directly from a conversational assistant or automated agent. The MCP layer standardizes how assistants discover available capabilities, request execution, and receive structured results, which simplifies building safe, repeatable ERP automations.
Features
- MCP-compliant server that exposes Odoo operations as callable tools
- Configurable connection to Odoo (URL, database, credentials)
- Fine-grained exposure of models and methods (read-only or write)
- Auth and access controls for assistants (API keys / tokens)
- Logging and audit trails for executed operations
- Docker-friendly deployment for simple hosting
- Extensible: add new tools for custom server actions or business logic
Installation / Configuration
Prerequisites:
- A running Odoo instance (host, port, db)
- Docker (recommended) or Python 3.8+ runtime
Clone the repository:
Option A — Docker Compose (recommended):
# docker-compose.yml (example)
version: '3.8'
services:
mcp-server-odoo:
build: .
ports:
- "8080:8080"
environment:
ODOO_URL: "https://odoo.example.com"
ODOO_DB: "mycompany_db"
ODOO_USER: "api_user"
ODOO_PASSWORD: "secret"
MCP_SERVER_PORT: "8080"
MCP_AUTH_SECRET: "replace-with-strong-secret"
restart: unless-stopped
Start:
Option B — Run locally with Python:
- Create a virtual environment and install dependencies:
- Configure environment variables (example .env):
ODOO_URL=https://odoo.example.com
ODOO_DB=mycompany_db
ODOO_USER=api_user
ODOO_PASSWORD=secret
MCP_SERVER_PORT=8080
MCP_AUTH_SECRET=replace-with-strong-secret
- Start the server (example generic command — adjust to repo entrypoint):
# If the project exposes a CLI or ASGI app, replace this with the actual entrypoint.
# or, if using an ASGI app:
Configuration notes:
- Provide a dedicated Odoo system/user account with only the necessary permissions for automation.
- Keep MCP_AUTH_SECRET (or equivalent) secret and rotate periodically.
- Enable TLS on the public endpoint or run the server behind a TLS-terminating proxy.
Available Tools / Resources
The server exposes a set of MCP tools representing common Odoo operations. The exact names and parameters are discoverable via MCP discovery endpoints, but typically include:
| Tool name | Purpose | Input | Output |
|---|---|---|---|
| model_search | Query records on a model with domain/limit | model, domain, limit, fields | list of records |
| model_read | Read one or more records by id(s) | model, ids, fields | records data |
| model_create | Create a new record | model, values | id of created record |
| model_write | Update existing records | model, ids, values | success boolean |
| model_unlink | Delete records | model, ids | success boolean |
| server_action_execute | Run a server action or workflow method | action_id or model/method params | result / status |
| metadata | Return exposed models, field schemas, and permissions | none | models, fields, types |
These tools are designed to return structured JSON that an assistant can interpret, and they can be restricted to read-only when appropriate.
Use Cases
Sales quoting assistant
- Scenario: A sales rep asks the assistant to create a quotation for a known customer.
- Flow: Assistant searches customer by email (model_search), creates a sale.order with order lines (model_create), and returns the quote link to the user.
Invoice reconciliation helper
- Scenario: Automatically match bank statement lines to invoices.
- Flow: Assistant queries unreconciled bank items (model_search), finds matching invoices (model_search/model_read), posts reconciliation via a server action (server_action_execute), and logs results.
Inventory adjustment
- Scenario: Stock counts received from mobile workers are uploaded to Odoo.
- Flow: Assistant receives counts, searches product.stock.location records, creates inventory adjustment records (model_create), and triggers validation (server_action_execute).
CRM lead qualification
- Scenario: Incoming lead details provided by chat are enriched and scored.
- Flow: Assistant reads existing lead/company data (model_read), creates or updates a crm.lead (model_create/model_write),