Odoo ERP MCP server

Integrates with Odoo ERP systems through XML-RPC to enable business process automation across sales, purchasing, inventory, and accounting modules with tools for creating orders, managing invoices, and generating financial reports.
Back to servers
Setup instructions
Provider
Yhasmani Valdes
Release date
Jun 07, 2025
Stats
7 stars

Odoo MCP Improved provides a bridge between large language models and your Odoo ERP system, enabling AI assistants to interact directly with your business data across sales, purchases, inventory, and accounting modules through the Model Context Protocol (MCP).

Installation

Using pip

pip install odoo-mcp-improved

From Source

git clone https://github.com/hachecito/odoo-mcp-improved.git
cd odoo-mcp-improved
pip install -e .

Configuration

Environment Variables

Set up your Odoo connection details using environment variables:

export ODOO_URL=https://your-odoo-instance.com
export ODOO_DB=your_database
export ODOO_USERNAME=your_username
export ODOO_PASSWORD=your_password

Configuration File

Alternatively, create an odoo_config.json file in your working directory:

{
  "url": "https://your-odoo-instance.com",
  "db": "your_database",
  "username": "your_username",
  "password": "your_password"
}

Running the Server

Start the MCP server with a simple command:

python -m odoo_mcp

Claude Desktop Integration

To integrate with Claude Desktop, add the following 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",
        "ODOO_USERNAME": "your_username",
        "ODOO_PASSWORD": "your_password"
      }
    }
  }
}

Available Tools

Sales Tools

  • search_sales_orders: Search for sales orders with advanced filtering
  • create_sales_order: Create a new sales order
  • analyze_sales_performance: Analyze sales performance by period, product, or customer
  • get_customer_insights: Get detailed insights about a specific customer

Purchase Tools

  • search_purchase_orders: Search for purchase orders with advanced filtering
  • create_purchase_order: Create a new purchase order
  • analyze_supplier_performance: Analyze supplier performance metrics

Inventory Tools

  • check_product_availability: Check stock availability for products
  • create_inventory_adjustment: Create inventory adjustment entries
  • analyze_inventory_turnover: Calculate and analyze inventory turnover metrics

Accounting Tools

  • search_journal_entries: Search for accounting journal entries
  • create_journal_entry: Create a new journal entry
  • analyze_financial_ratios: Calculate key financial ratios

Example Interactions

Here are some example interactions you can use with the Odoo MCP:

# Sales Analysis
Using the Odoo MCP, analyze our sales performance for the last quarter and identify our top-selling products.

# Inventory Check
Check the current stock levels for product XYZ across all warehouses.

# Financial Analysis
Calculate our current liquidity and profitability ratios based on the latest financial data.

# Customer Insights
Provide insights on customer ABC's purchase history and payment patterns.

Resource URIs

The MCP server provides standardized access to Odoo data through URI patterns:

Sales Resources

  • odoo://sales/orders: List sales orders
  • odoo://sales/order/{order_id}: Get details of a specific sales order
  • odoo://sales/products: List sellable products
  • odoo://sales/customers: List customers

Purchase Resources

  • odoo://purchase/orders: List purchase orders
  • odoo://purchase/order/{order_id}: Get details of a specific purchase order
  • odoo://purchase/suppliers: List suppliers

Inventory Resources

  • odoo://inventory/products: List products in inventory
  • odoo://inventory/stock/{location_id}: Get stock levels at a specific location
  • odoo://inventory/movements: List inventory movements

Accounting Resources

  • odoo://accounting/accounts: List accounting accounts
  • odoo://accounting/journal_entries: List journal entries
  • odoo://accounting/reports/{report_type}: Get financial reports

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "odoo" '{"command":"python","args":["-m","odoo_mcp"],"env":{"ODOO_URL":"https://your-odoo-instance.com","ODOO_DB":"your_database","ODOO_USERNAME":"your_username","ODOO_PASSWORD":"your_password"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "odoo": {
            "command": "python",
            "args": [
                "-m",
                "odoo_mcp"
            ],
            "env": {
                "ODOO_URL": "https://your-odoo-instance.com",
                "ODOO_DB": "your_database",
                "ODOO_USERNAME": "your_username",
                "ODOO_PASSWORD": "your_password"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "odoo": {
            "command": "python",
            "args": [
                "-m",
                "odoo_mcp"
            ],
            "env": {
                "ODOO_URL": "https://your-odoo-instance.com",
                "ODOO_DB": "your_database",
                "ODOO_USERNAME": "your_username",
                "ODOO_PASSWORD": "your_password"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later