Skip to content

Tutorials & Guides

Step-by-step guides for connecting various AI agents to your Odoo instance.

To connect the Claude Desktop app to your Odoo instance:

  1. Open your Claude Desktop configuration file:
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  2. Add the Odoo MCP server to the mcpServers section:
{
"mcpServers": {
"odoo": {
"command": "curl",
"args": [
"-N", "-s", "-X", "GET",
"-H", "Authorization: Bearer YOUR_API_KEY",
"https://your-odoo-domain.com/mcp"
]
}
}
}
  1. Restart Claude Desktop. You should now see the Odoo tools available in the “Hammer” icon menu.
  1. Open Cursor and go to Settings → Cursor Settings.
  2. Navigate to Features → MCP.
  3. Click + Add New MCP Server.
  4. Configure as follows:
    • Name: Odoo
    • Type: sse
    • URL: https://your-odoo-domain.com/mcp
  5. Auth: Cursor version 0.40+ supports custom headers. If your version does not, you may need a local proxy to inject the Authorization header.

LM Studio supports MCP servers to give your local models access to external tools.

  1. Open LM Studio and navigate to the Settings or Developer panel.
  2. Find the Model Context Protocol (MCP) or External Tools section.
  3. Add a new MCP server connection:
    • Protocol / Type: SSE
    • Endpoint URL: https://your-odoo-domain.com/mcp
    • Custom Headers: Add Authorization: Bearer YOUR_API_KEY
  4. Load a tool-calling capable model (e.g., Llama-3-Instruct, Qwen) and ensure tools are enabled for the session.

If you are integrating with a custom web client like DeepChat or using Open WebUI:

  1. Locate the MCP / Tool Servers configuration in your application’s admin dashboard.
  2. Select SSE Transport (Server-Sent Events).
  3. Provide the connection details:
    • URL: https://your-odoo-domain.com/mcp
    • Headers: {"Authorization": "Bearer YOUR_API_KEY"}
  4. CORS: Since these are web-based clients, you must configure CORS in Odoo. Go to Odoo Settings → MCP Server and add your client’s URL to CORS Allowed Origins.

AI agents often struggle with Odoo’s Many2one fields because they try to pass names instead of IDs. Always instruct your agent to use this two-step pattern:

Scenario: Updating a Lead’s Stage.

  1. Step 1: Find the target record ID The agent should search crm.stage to find the ID of the “Qualified” stage.
    {
    "method": "tools/call",
    "params": {
    "name": "search_records",
    "arguments": {"model": "crm.stage", "domain": [["name", "ilike", "Qualified"]]}
    }
    }
  2. Step 2: Update the main record Once the ID (e.g., 5) is found, update the lead:
    {
    "method": "tools/call",
    "params": {
    "name": "update_record",
    "arguments": {
    "model": "crm.lead",
    "id": 123,
    "values": {"stage_id": 5}
    }
    }
    }