OD

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.

Quick Install
npx -y @ivnvxd/mcp-server-odoo

Overview

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:

git clone https://github.com/ivnvxd/mcp-server-odoo
cd mcp-server-odoo

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:

docker-compose up -d --build

Option B — Run locally with Python:

  1. Create a virtual environment and install dependencies:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
  1. 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
  1. 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.
python -m mcp_server
# or, if using an ASGI app:
uvicorn mcp_server.app:app --host 0.0.0.0 --port $MCP_SERVER_PORT

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 namePurposeInputOutput
model_searchQuery records on a model with domain/limitmodel, domain, limit, fieldslist of records
model_readRead one or more records by id(s)model, ids, fieldsrecords data
model_createCreate a new recordmodel, valuesid of created record
model_writeUpdate existing recordsmodel, ids, valuessuccess boolean
model_unlinkDelete recordsmodel, idssuccess boolean
server_action_executeRun a server action or workflow methodaction_id or model/method paramsresult / status
metadataReturn exposed models, field schemas, and permissionsnonemodels, 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

  1. 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.
  2. 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.
  3. 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).
  4. 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),