Skip to main content
Glama
Odoo MCP Server

Odoo MCP Server

by ajmalj

Odoo MCP Server

A Model Context Protocol (MCP) server that enables AI assistants (like Claude) to interact with Odoo ERP systems through standardized tools for data retrieval and manipulation.

Features

  • 🔍 Search Models: Find installed Odoo models by name pattern

  • 📋 List Fields: Inspect model structure and field properties

  • 📖 Get Record: Retrieve specific records by ID

  • 🔎 Search Records: Query records using Odoo domain filters

  • ➕ Create Record: Create new records with field validation

  • âœī¸ Update Record: Modify existing records

  • đŸ—‘ī¸ Delete Record: Remove records from the database

  • đŸ”ĸ Count Records: Count matching records

  • â„šī¸ Server Info: Get Odoo version and connection details

Related MCP server: MCP Server for Odoo

Prerequisites

  • Python 3.10 or higher

  • Access to an Odoo instance (any version with XML-RPC enabled)

  • Odoo user with appropriate permissions

Installation

1. Clone or Copy Files

git clone https://github.com/ajmalj/mcp-odoo-server.git
cd mcp-odoo-server
pip install -r requirements.txt

Or install directly:

pip install fastmcp python-dotenv

Option 2: Install as Package

Install in editable mode for development:

pip install -e .

Or install with development dependencies:

pip install -e ".[dev]"

Configuration

Copy the example environment file and fill in your Odoo credentials:

cp .env.example .env

Edit .env with your values:

ODOO_URL=http://localhost:8069
ODOO_DB=your_database_name
ODOO_USER=admin
ODOO_PASSWORD=your_password_or_api_key

Tip: For better security, use an API key instead of your password.

Running the Server

Direct Execution

python server.py

Using FastMCP CLI

fastmcp run server.py:mcp

With HTTP Transport (for debugging)

fastmcp run server.py:mcp --transport http --port 8000

Claude Desktop Configuration

Add the following to your Claude Desktop configuration file:

macOS

~/Library/Application Support/Claude/claude_desktop_config.json

Windows

%APPDATA%\Claude\claude_desktop_config.json

Configuration

{
  "mcpServers": {
    "odoo": {
      "command": "python",
      "args": ["/absolute/path/to/mcp_odoo_server/server.py"],
      "env": {
        "ODOO_URL": "http://localhost:8069",
        "ODOO_DB": "your_database_name",
        "ODOO_USER": "admin",
        "ODOO_PASSWORD": "your_password_or_api_key"
      }
    }
  }
}

If you have UV installed:

{
  "mcpServers": {
    "odoo": {
      "command": "uv",
      "args": [
        "run",
        "--with", "fastmcp",
        "--with", "python-dotenv",
        "python",
        "/absolute/path/to/mcp_odoo_server/server.py"
      ],
      "env": {
        "ODOO_URL": "http://localhost:8069",
        "ODOO_DB": "your_database_name",
        "ODOO_USER": "admin",
        "ODOO_PASSWORD": "your_password_or_api_key"
      }
    }
  }
}

Available Tools

search_models

Search for installed Odoo models.

Arguments:
  - name_pattern: Pattern to filter model names (optional)
  - limit: Maximum results (default: 50)

list_fields

List all fields of a specific model.

Arguments:
  - model: Technical model name (e.g., 'res.partner')
  - field_pattern: Pattern to filter field names (optional)

get_record

Retrieve a specific record by ID.

Arguments:
  - model: Technical model name
  - record_id: ID of the record
  - fields: List of fields to retrieve (optional)

search_records

Search records using domain filters.

Arguments:
  - model: Technical model name
  - domain: Odoo domain filter (e.g., [['is_company', '=', True]])
  - fields: List of fields to retrieve (optional)
  - limit: Maximum results (default: 50)
  - offset: Skip records for pagination
  - order: Sort order (e.g., 'name asc')

create_record

Create a new record.

Arguments:
  - model: Technical model name
  - values: Dictionary of field values

update_record

Update an existing record.

Arguments:
  - model: Technical model name
  - record_id: ID of the record to update
  - values: Dictionary of field values to update

delete_record

Delete a record.

Arguments:
  - model: Technical model name
  - record_id: ID of the record to delete

count_records

Count records matching a domain.

Arguments:
  - model: Technical model name
  - domain: Odoo domain filter (optional)

get_server_info

Get Odoo server version and connection info.

Arguments: None

Usage Examples

Once configured in Claude Desktop, you can ask Claude:

  • "List all models in Odoo that contain 'sale'"

  • "Show me the fields of the res.partner model"

  • "Search for all company contacts in the system"

  • "Create a new customer named 'ACME Corp' with email 'contact@acme.com'"

  • "Update the phone number of partner ID 42"

  • "How many sale orders are in confirmed state?"

Security Considerations

  1. Use API Keys: Instead of passwords, generate API keys in Odoo (Settings > Users > API Keys)

  2. Limit Permissions: Create a dedicated Odoo user with only the necessary access rights

  3. Secure Credentials: Never commit .env files to version control

  4. Network Security: Use HTTPS in production and consider firewall rules

Troubleshooting

Connection Refused

  • Verify Odoo is running and accessible at the configured URL

  • Check if XML-RPC is enabled (it's enabled by default)

Authentication Failed

  • Double-check credentials in .env file

  • Ensure the database name is correct

  • Verify the user has XML-RPC access

Permission Denied

  • The Odoo user needs appropriate access rights for the models you're querying

  • Check security groups and access rules in Odoo

License

MIT License - Feel free to modify and use as needed.

Available Tools

9 tools
count_recordsCount RecordsB

Count records in an Odoo model matching a domain filter.

Inputs: model (required), domain. Returns: object

create_recordCreate RecordC

Create a new record in an Odoo model.

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

delete_recordDelete RecordC

Delete a record from an Odoo model.

Inputs: model (required), record_id (required). Returns: object

get_recordGet RecordB

Get a specific record by ID from an Odoo model.

Inputs: model (required), record_id (required), fields. Returns: object

get_server_infoGet Server InfoA

Get the version and server information of the connected Odoo instance.

Inputs: no named parameters. Returns: object

list_fieldsList FieldsA

List all fields of a specific Odoo model with their types and properties.

Inputs: model (required), field_pattern. Returns: object

search_modelsSearch ModelsA

Search for installed Odoo models. Returns model names and descriptions.

Inputs: limit, name_pattern. Returns: object

search_recordsSearch RecordsB

Search records in an Odoo model using domain filters.

Inputs: model (required), limit, order, domain, +2 more. Returns: object

update_recordUpdate RecordC

Update an existing record in an Odoo model.

Inputs: model (required), values (required), record_id (required). Returns: object

Tool Schema Changelog

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

Loading tool schema changelogâ€Ļ

    TDQS

    A3.5/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool maps to a distinct action on a distinct target: model introspection (search_models, list_fields), single-record access (get_record), filtered queries (search_records, count_records), mutations (create/update/delete_record), and server metadata (get_server_info). The only near-overlap, search_records vs count_records, is clearly separated by one returning records and the other an aggregate count. An agent can pick correctly from names alone.

    Naming Consistency5/5

    Every tool follows a strict verb_noun snake_case pattern (search_models, list_fields, get_record, create_record, update_record, delete_record, count_records, get_server_info). No camelCase, no stray verbs, and plural/singular usage is logical (models/records plural for sets, record singular for single-ID ops).

    Tool Count5/5

    Nine tools is well within the sweet spot and every tool earns its place: a clean introspection layer, full record CRUD, and two supporting utilities. Nothing feels redundant or bolted on for a generic Odoo ORM surface.

    Completeness4/5

    CRUD plus schema introspection and counting gives solid lifecycle coverage for generic record manipulation. The notable gap is method invocation (Odoo workflows like confirming orders or posting invoices typically require calling model methods) along with bulk operations and aggregation/grouping, which agents will have to work around.

    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
      C
      maintenance
      Enables AI assistants to interact with Odoo ERP systems through natural language, allowing users to search, create, update, and manage business records like customers, products, and invoices across any Odoo instance.
      1
      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