Skip to main content
Glama
odoo-mcp

odoo-mcp

by bemade

bemade-odoo-mcp

An MCP server that connects to Odoo 19.0, giving AI assistants full access to any Odoo model.

Supports two authentication modes:

  • API key (Bearer) — connects via the JSON-2 API (/json/2/)

  • Username/password (session) — connects via JSON-RPC (/web/dataset/call_kw/)

Features

  • search_records — Search any model with domain filters, field selection, and pagination

  • read_record — Read specific records by ID

  • list_models — List installed Odoo models

  • get_model_fields — Inspect a model's field schema

  • get_model_doc — Retrieve API documentation for a model

  • create_record / update_records / delete_records — Write operations

  • call_method — Call any public method on any model

Related MCP server: MCP Server for Odoo

Requirements

  • Python 3.12+

  • An Odoo 19.0 instance with either an API key or login credentials

Installation

uv tool install bemade-odoo-mcp

Or from source:

git clone https://github.com/bemade/odoo-mcp.git
cd odoo-mcp
uv sync

Configuration

Set environment variables (or create a .env file).

ODOO_URL=https://your-odoo-instance.com
ODOO_API_KEY=your-api-key-here
ODOO_DB=your-database-name  # only needed for multi-database setups

To create an API key in Odoo, go to Settings > Users > [your user] > Preferences > API Keys.

Option B: Username/password (convenient for local dev)

ODOO_URL=http://localhost:8069
ODOO_USERNAME=admin
ODOO_PASSWORD=admin
ODOO_DB=mydb

Optional

ODOO_INSTANCE_LABEL=production  # label shown in the MCP server name (default: "odoo")

Usage with Claude Code

Add to your Claude Code MCP config (.claude/settings.json or project .mcp.json):

{
  "mcpServers": {
    "odoo": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/odoo-mcp", "odoo-mcp"]
    }
  }
}

Or if installed as a tool:

{
  "mcpServers": {
    "odoo": {
      "command": "odoo-mcp"
    }
  }
}

Connecting to multiple instances

Run the same server binary multiple times with different env vars. Claude Code namespaces the tools automatically (mcp__odoo-prod__search_records, etc.):

{
  "mcpServers": {
    "odoo-prod": {
      "command": "odoo-mcp",
      "env": {
        "ODOO_URL": "https://prod.example.com",
        "ODOO_API_KEY": "prod-key",
        "ODOO_INSTANCE_LABEL": "production"
      }
    },
    "odoo-dev": {
      "command": "odoo-mcp",
      "env": {
        "ODOO_URL": "http://localhost:8069",
        "ODOO_USERNAME": "admin",
        "ODOO_PASSWORD": "admin",
        "ODOO_DB": "mydb",
        "ODOO_INSTANCE_LABEL": "local-dev"
      }
    }
  }
}

Development

uv sync
uv run pytest

License

LGPL-3.0-only

Available Tools

9 tools
call_methodA
Destructive

Call any public method on an Odoo model.

Use get_model_doc first to discover the correct parameter names and types.

Args:
    model: The Odoo model name (e.g. "sale.order").
    method: The method name (e.g. "action_confirm").
    ids: Optional list of record IDs to operate on.
    params: Optional dict of keyword arguments passed to the method.

Inputs: model (required), method (required), ids, params.

create_recordA

Create a new record in an Odoo model.

Args:
    model: The Odoo model name (e.g. "res.partner").
    values: Dict of field names to values (e.g. {"name": "Acme"}).

Returns:
    The ID of the newly created record.

Inputs: model (required), values (required). Returns: result

delete_recordsA
Destructive

Delete records from an Odoo model.

Args:
    model: The Odoo model name (e.g. "res.partner").
    ids: List of record IDs to delete.

Returns:
    True if the deletion succeeded.

Inputs: model (required), ids (required). Returns: result

get_model_docA
Read-only

Get API documentation for an Odoo model.

Without a method name, returns a compact summary: each method's name and
call signature.  With a method name, returns that method's full
documentation (parameters, types, defaults, docstring, return type).

Use this before call_method to discover exact parameter names and types.
Requires the API key user to be in the api_doc.group_allow_doc group.

Args:
    model: The Odoo model name (e.g. "res.partner").
    method: Optional method name. If provided, returns full docs for that
        method only. If omitted, returns a summary of all methods.

Inputs: model (required), method.

get_model_fieldsA
Read-only

Get field definitions for an Odoo model.

Returns a dict mapping field names to their metadata (type, string,
required, relation, etc.).

Args:
    model: The Odoo model name (e.g. "res.partner").
    attributes: List of field attributes to return
        (e.g. ["string", "type", "required"]). Defaults to all.

Inputs: model (required), attributes.

list_modelsA
Read-only

List installed Odoo models.

Args:
    domain: Optional domain filter on ir.model
        (e.g. [["model", "like", "sale"]]).
    limit: Maximum number of models to return. Defaults to 80.
    offset: Number of records to skip (for pagination).

Inputs: domain, limit, offset. Returns: result

read_recordA
Read-only

Read specific Odoo records by their IDs.

Args:
    model: The Odoo model name (e.g. "res.partner").
    ids: List of record IDs to read.
    fields: List of field names to return. Defaults to all fields.

Inputs: model (required), ids (required), fields. Returns: result

search_recordsA
Read-only

Search for records in any Odoo model.

Args:
    model: The Odoo model name (e.g. "res.partner", "sale.order").
    domain: Odoo domain filter (e.g. [["is_company", "=", true]]).
        Defaults to [] (all records).
    fields: List of field names to return. Defaults to all fields.
    limit: Maximum number of records to return. Defaults to 80.
    offset: Number of records to skip (for pagination).
    order: Sort order (e.g. "name asc, id desc").

Inputs: model (required), domain, fields, limit, +2 more. Returns: result

update_recordsA
DestructiveIdempotent

Update existing records in an Odoo model.

Args:
    model: The Odoo model name (e.g. "res.partner").
    ids: List of record IDs to update.
    values: Dict of field names to new values.

Returns:
    True if the update succeeded.

Inputs: model (required), ids (required), values (required). Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool targets a distinct operation: schema discovery (list_models, get_model_doc, get_model_fields), CRUD (create, read, update, delete), search, and generic method call. No overlap.

    Naming Consistency5/5

    All tool names follow a uniform verb_noun pattern (e.g., list_models, create_record, search_records) using lowercase and underscores, making them predictable.

    Tool Count5/5

    9 tools is well-scoped for an Odoo integration, covering model discovery, CRUD, search, and a generic method call without being excessive or insufficient.

    Completeness4/5

    The tool set provides full CRUD, search, and schema discovery; the only minor gap is the absence of a dedicated count/aggregate operation, but search_records with limit=0 can approximate it.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with Odoo ERP systems through XML-RPC communication. Provides access to Odoo models, records, methods, and data structures for comprehensive ERP integration.
      2
      MIT
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI assistants to interact with Odoo ERP systems through natural language to search records, create entries, update data, and manage business operations. Supports secure authentication and configurable access controls for production environments.
      Mozilla Public 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to fully interact with Odoo ERP instances over XML-RPC, supporting read and write operations on any model without requiring Odoo module installation.
      5
      AGPL 3.0
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to securely connect to Odoo and perform CRUD operations, custom tool calls, and data queries through natural language, with OAuth 2.1 and API key authentication.
      -