mcp-server-odoo

alberto-re/mcp-server-odoo

3.2

If you are the rightful owner of mcp-server-odoo and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

An extensible Model Context Protocol server that integrates Odoo with LLMs, currently in early development.

Tools
  1. search_partners

    Tool to search for partners in Odoo.

  2. search_quotations

    Tool to search for quotations in Odoo.

  3. search_sales_orders

    Tool to search for sales orders in Odoo.

  4. search_customer_invoices

    Tool to search for customer invoices in Odoo.

mcp-server-odoo

An extensible Model Context Protocol server that provides integration between Odoo and LLMs.

Beware: the project is in very early development. Expect rough edges. We welcome any feedback!

MCP server in action

Here's a demonstration of what kind of capabilities the MCP enables in Claude for Desktop:

MCP in action

Prerequisites

Configuration

The server looks for the following variables in the execution environment:

VariableRequiredDescriptionExample
ODOO_BASE_URLYesThe URL of the Odoo instancehttp://localhost:8069
ODOO_DATABASEYesThe database name to connect tomydatabase
ODOO_USERNAMEYesUsername for authenticationadmin
ODOO_PASSWORDYesPassword or API Key for authenticationadmin
ODOO_VERSIONYesMajor version of your Odoo server18
LOG_LEVELNoDesided logging level (see Python logging levels), default is INFOINFO
TRANSPORT_PROTOCOLYesThe MCP transport protocol to use. Valid values are stdio for local-only communication or sse / streamable-http for remote communicationstdio
HOSTNoThe IP address(es) on which the server is to listen for connections from clients127.0.0.1
TOOLS_TO_REGISTERYesComma-separated list of tools to expose to the MCP client. Tools can be chosen from those included within this project (see directory src/mcp_server_odoo/tools), or custom ones provided by external files (see EXT_DIRECTORIES)search_partners,search_quotations,search_sales_orders,search_customer_invoices
EXT_DIRECTORIESNoComma-separated list of paths to search for additional tools that can be loaded at runtime/your/custom/path

Installation

Install the tool with uv tool:

uv tool install --from git+https://github.com/alberto-re/mcp-server-odoo mcp-server-odoo

Run the server

Execute it directly with uvx:

uvx mcp-server-odoo

Run within Docker

A Dockerfile is included if you wish to run the MCP server inside a Docker container.

To build the container execute this command from the root directory of the repository:

docker build -t mcp-server-odoo .

Now you can execute the container from the built image with:

docker run --rm --env-file /path/to/env/file -p 8000:8000 mcp-server-odoo

When running inside a container remember to use an HTTP based transport protocol (i.e. set TRANSPORT_PROTOCOL to sse or streamable-http) and to make the server listen to all interfaces (i.e. set HOST to 0.0.0.0).

Integrations

Connecting to Claude Desktop

  1. Edit the Claude for Desktop configuration file.
  • In MacOS the configuration is located at ~/Library/Application Support/Claude/claude_desktop_config.json.
  • In Windows the configuration is located at %APPDATA%\Claude\claude_desktop_config.json
  1. Add the server configuration under the mcpServers section.
{
  "mcpServers": {
    "mcp-server-odoo": {
      "command": "uvx",
      "args": [
        "mcp-server-odoo"
      ],
      "env": {
        "ODOO_BASE_URL": "http://localhost:8069",
        "ODOO_DATABASE": "mydatabase",
        "ODOO_USERNAME": "admin",
        "ODOO_PASSWORD": "admin",
        "ODOO_VERSION": "18",
        "TRANSPORT_PROTOCOL": "stdio",
        "TOOLS_TO_REGISTER": "search_partners,search_quotations,search_sales_orders,search_customer_invoices"
      }
    }
  }
}
  1. Restart Claude for Desktop.

Connecting to mcphost

  1. Edit the mcphost configuration file. See the documentation for where it looks for configuration files.

  2. Add the server configuration under the mcpServers section.

{
  "mcpServers": {
    "mcp-server-odoo": {
      "command": "uvx",
      "args": [
        "mcp-server-odoo"
      ],
      "env": {
        "ODOO_BASE_URL": "http://localhost:8069",
        "ODOO_DATABASE": "mydatabase",
        "ODOO_USERNAME": "admin",
        "ODOO_PASSWORD": "admin",
        "ODOO_VERSION": "18",
        "TRANSPORT_PROTOCOL": "stdio",
        "TOOLS_TO_REGISTER": "search_partners,search_quotations,search_sales_orders,search_customer_invoices"
      }
    }
  }
}
  1. Execute the mcphost command.