Navigation
Odoo MCP Server: Centralize & Scale Multi-Company Operations - MCP Implementation

Odoo MCP Server: Centralize & Scale Multi-Company Operations

Dominate multi-company operations with Odoo MCP Server: One powerful platform to centralize, scale, and master complex business ecosystems—effortlessly.

Developer Tools
4.6(84 reviews)
126 saves
58 comments

Ranked in the top 4% of all AI tools in its category

About Odoo MCP Server

What is Odoo MCP Server: Centralize & Scale Multi-Company Operations?

Odoo MCP Server acts as a bridge between AI-driven systems and your Odoo ERP infrastructure. It enables seamless access to Odoo’s data and functionality through standardized protocols, allowing businesses to streamline operations across multiple companies. Whether you’re managing distributed teams, synchronizing inventory, or automating workflows, this server ensures your AI tools can interact with Odoo’s core systems securely and efficiently.

How to Use Odoo MCP Server: Centralize & Scale Multi-Company Operations?

Implementation follows a straightforward workflow:

  1. Configure Access: Set up credentials via config files or environment variables, specifying your Odoo instance URL, database, and authentication details.
  2. Deploy the Server: Choose your preferred method—install via Python, run a Docker container, or integrate directly with platforms like Claude Desktop.
  3. Execute Operations: Use predefined tools like search_records or execute_method to query, manipulate, or extend Odoo data. For example, fetch employee details with search_employee or validate dates against holiday records using search_holidays.
  4. Handle Edge Cases: Leverage error messages to debug API issues and adjust domain parameters for precise searches.

Pro tip: Use environment variables for sensitive data to avoid hardcoding credentials in config files.

Odoo MCP Server Features

Key Features of Odoo MCP Server: Centralize & Scale Multi-Company Operations?

  • Unified Data Access: Full CRUD (Create, Read, Update, Delete) capabilities across all Odoo models, from partners to invoices.
  • Smart Communication: XML-RPC ensures secure, stateless interactions, making it ideal for distributed systems.
  • Adaptive Configuration: Flip between config files and env vars based on deployment needs—dev prefers files, prod leans toward env vars for security.
  • URI-Based Resources: Navigate Odoo’s structure via intuitive URIs like odoo://record/res.partner/1 for instant record access.
  • Fail-Safe Design: Clear error logs pinpoint issues like invalid domains or missing fields, saving hours of troubleshooting.

Use Cases of Odoo MCP Server: Centralize & Scale Multi-Company Operations?

Real-world scenarios include:

1. Cross-Company Data Sync

Automate inventory updates across subsidiaries by querying stock levels via search_records and pushing changes with update_record.

2. Employee Onboarding Automation

Use create_record to onboard new hires into Odoo’s HR module and sync their details with payroll systems via MCP.

3. Compliance Reporting

Aggregate financial data across multiple companies using search_records with date-based domains, then export to generate consolidated reports.

4. AI-Powered Sales Forecasting

Train ML models on historical sales data retrieved via search_records and push predictions back into Odoo’s CRM module.

Odoo MCP Server FAQ

FAQ from Odoo MCP Server: Centralize & Scale Multi-Company Operations?

Q: Can I use MCP with Odoo self-hosted instances?

Absolutely. Just ensure your firewall allows XML-RPC traffic and configure SSL if using secure connections.

Q: How do I handle rate limits when querying large datasets?

Use pagination by splitting domains or adjusting batch sizes in your API calls to avoid timeouts.

Q: Is there a way to log all server activity for audits?

Enable debug mode in the config file to capture detailed logs, including all incoming requests and responses.

Q: Can I extend MCP to support custom Odoo modules?

Yes! The resource pattern system lets you map URIs to your custom models, making integration seamless.

Q: What happens if my Odoo instance goes down?

MCP will return connection errors, but you can implement retries or fallback logic in your application layer.

Content

Odoo MCP Server

An MCP server implementation that integrates with Odoo ERP systems, enabling AI assistants to interact with Odoo data and functionality through the Model Context Protocol.

Features

  • Comprehensive Odoo Integration : Full access to Odoo models, records, and methods
  • XML-RPC Communication : Secure connection to Odoo instances via XML-RPC
  • Flexible Configuration : Support for config files and environment variables
  • Resource Pattern System : URI-based access to Odoo data structures
  • Error Handling : Clear error messages for common Odoo API issues
  • Stateless Operations : Clean request/response cycle for reliable integration

Tools

  • search_records

    • Search for records in any Odoo model
    • Inputs:
      • model (string): The model name (e.g., 'res.partner')
      • domain (array): Search domain (e.g., [['is_company', '=', true]])
      • fields (optional array): Optional fields to fetch
      • limit (optional number): Maximum number of records to return
    • Returns: Matching records with requested fields
  • read_record

    • Read details of a specific record
    • Inputs:
      • model (string): The model name (e.g., 'res.partner')
      • id (number): The record ID
      • fields (optional array): Optional fields to fetch
    • Returns: Record data with requested fields
  • create_record

    • Create a new record in Odoo
    • Inputs:
      • model (string): The model name (e.g., 'res.partner')
      • values (object): Dictionary of field values
    • Returns: Dictionary with the new record ID
  • update_record

    • Update an existing record
    • Inputs:
      • model (string): The model name (e.g., 'res.partner')
      • id (number): The record ID
      • values (object): Dictionary of field values to update
    • Returns: Dictionary indicating success
  • delete_record

    • Delete a record from Odoo
    • Inputs:
      • model (string): The model name (e.g., 'res.partner')
      • id (number): The record ID
    • Returns: Dictionary indicating success
  • execute_method

    • Execute a custom method on an Odoo model
    • Inputs:
      • model (string): The model name (e.g., 'res.partner')
      • method (string): Method name to execute
      • args (optional array): Positional arguments
      • kwargs (optional object): Keyword arguments
    • Returns: Dictionary with the method result
  • get_model_fields

    • Get field definitions for a model
    • Inputs:
      • model (string): The model name (e.g., 'res.partner')
    • Returns: Dictionary with field definitions
  • search_employee

    • Search for employees by name.
    • Inputs:
      • name (string): The name (or part of the name) to search for.
      • limit (optional number): The maximum number of results to return (default 20).
    • Returns: List of matching employee names and IDs.
  • search_holidays

    • Searches for holidays within a specified date range.
    • Inputs:
      • start_date (string): Start date in YYYY-MM-DD format.
      • end_date (string): End date in YYYY-MM-DD format.
      • employee_id (optional number): Optional employee ID to filter holidays.
    • Returns: List of holidays found.

Resources

  • odoo://models

    • Lists all available models in the Odoo system
    • Returns: JSON array of model information
  • odoo://model/{model_name}

    • Get information about a specific model including fields
    • Example: odoo://model/res.partner
    • Returns: JSON object with model metadata and field definitions
  • odoo://record/{model_name}/{record_id}

    • Get a specific record by ID
    • Example: odoo://record/res.partner/1
    • Returns: JSON object with record data
  • odoo://search/{model_name}/{domain}

    • Search for records that match a domain
    • Example: odoo://search/res.partner/[["is_company","=",true]]
    • Returns: JSON array of matching records (limited to 10 by default)

Configuration

Odoo Connection Setup

  1. Create a configuration file named odoo_config.json:
{
  "url": "https://your-odoo-instance.com",
  "db": "your-database-name",
  "username": "your-username",
  "password": "your-password-or-api-key"
}
  1. Alternatively, use environment variables:
    * ODOO_URL: Your Odoo server URL
    * ODOO_DB: Database name
    * ODOO_USERNAME: Login username
    * ODOO_PASSWORD: Password or API key
    * ODOO_TIMEOUT: Connection timeout in seconds (default: 30)
    * ODOO_VERIFY_SSL: Whether to verify SSL certificates (default: true)
    * HTTP_PROXY: Force the ODOO connection to use an HTTP proxy

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "odoo": {
      "command": "python",
      "args": [
        "-m",
        "odoo_mcp"
      ],
      "env": {
        "ODOO_URL": "https://your-odoo-instance.com",
        "ODOO_DB": "your-database-name",
        "ODOO_USERNAME": "your-username",
        "ODOO_PASSWORD": "your-password-or-api-key"
      }
    }
  }
}

Docker

{
  "mcpServers": {
    "odoo": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "ODOO_URL",
        "-e",
        "ODOO_DB",
        "-e",
        "ODOO_USERNAME",
        "-e",
        "ODOO_PASSWORD",
        "mcp/odoo"
      ],
      "env": {
        "ODOO_URL": "https://your-odoo-instance.com",
        "ODOO_DB": "your-database-name",
        "ODOO_USERNAME": "your-username",
        "ODOO_PASSWORD": "your-password-or-api-key"
      }
    }
  }
}

Installation

Python Package

pip install odoo-mcp

Running the Server

# Using the installed package
odoo-mcp

# Using the MCP development tools
mcp dev odoo_mcp/server.py

# With additional dependencies
mcp dev odoo_mcp/server.py --with pandas --with numpy

# Mount local code for development
mcp dev odoo_mcp/server.py --with-editable .

Build

Docker build:

docker build -t mcp/odoo:latest -f Dockerfile .

Parameter Formatting Guidelines

When using the MCP tools for Odoo, pay attention to these parameter formatting guidelines:

  1. Domain Parameter :
* The following domain formats are supported: 
  * List format: `[["field", "operator", value], ...]`
  * Object format: `{"conditions": [{"field": "...", "operator": "...", "value": "..."}]}`
  * JSON string of either format
* Examples: 
  * List format: `[["is_company", "=", true]]`
  * Object format: `{"conditions": [{"field": "date_order", "operator": ">=", "value": "2025-03-01"}]}`
  * Multiple conditions: `[["date_order", ">=", "2025-03-01"], ["date_order", "<=", "2025-03-31"]]`
  1. Fields Parameter :
* Should be an array of field names: `["name", "email", "phone"]`
* The server will try to parse string inputs as JSON

License

This MCP server is licensed under the MIT License.

Related MCP Servers & Clients