Odoo mcp server

From NaveedTechLab/skills-library · View interactive version

Odoo mcp server is an AI agent skill from the GitHub repository NaveedTechLab/skills-library. Integrate with Odoo ERP systems via MCP to perform accounting, invoicing, and financial operations with HITL approval controls. Use when connecting Claude Code to Odoo for business process automation.

How to use this skill

Skill file

Odoo MCP Server

Description

The Odoo MCP Server provides Model Context Protocol integration with Odoo ERP systems (version 19+), enabling Claude Code to interact with accounting, invoicing, and financial operations through a secure, HITL (Human-in-the-Loop) controlled interface.

Purpose

This skill enables Claude Code to perform accounting operations in Odoo while maintaining strict approval workflows for financial transactions. It provides read access to account data and requires human approval for any operations that create or modify financial records.

Key Features

Accounting Operations

Human-in-the-Loop Controls

| Operation | HITL Required | Threshold |

|-----------|---------------|-----------|

| Search records | No | - |

| Get account balance | No | - |

| Create invoice | Yes (>$1000) | Amount threshold |

| Post invoice | Yes (always) | - |

| Create payment | Yes (always) | - |

Security

Configuration

Environment Variables

ODOO_URL=https://your-odoo-instance.com
ODOO_DATABASE=your_database
ODOO_USERNAME=api_user
ODOO_API_KEY=your_api_key
ODOO_APPROVAL_THRESHOLD=1000.00

Default Configuration

{
  "odoo": {
    "url": "https://localhost:8069",
    "database": "odoo_db",
    "username": "",
    "api_key": "",
    "timeout_seconds": 30,
    "verify_ssl": true
  },
  "approval": {
    "invoice_threshold": 1000.00,
    "always_require_approval": ["post_invoice", "create_payment"],
    "approval_timeout_hours": 24
  },
  "rate_limiting": {
    "requests_per_minute": 60,
    "burst_limit": 10
  }
}

MCP Tools

odoo_search_records

Search any Odoo model with domain filters.

Parameters:

Example:

await odoo_search_records(
    model="account.move",
    domain=[("move_type", "=", "out_invoice"), ("state", "=", "posted")],
    fields=["name", "partner_id", "amount_total", "invoice_date"],
    limit=10
)

odoo_create_invoice

Create a draft invoice in Odoo.

Parameters:

HITL: Required if total amount > $1000

odoo_post_invoice

Validate and post a draft invoice.

Parameters:

HITL: Always required

odoo_create_payment

Register a payment for an invoice.

Parameters:

HITL: Always required

odoo_get_account_balance

Get balance for an account.

Parameters:

HITL: Not required

Usage Scenarios

Query Customer Invoices

# Get all posted invoices for a customer
invoices = await odoo_search_records(
    model="account.move",
    domain=[
        ("partner_id", "=", 42),
        ("move_type", "=", "out_invoice"),
        ("state", "=", "posted")
    ],
    fields=["name", "amount_total", "amount_residual", "invoice_date"]
)

Create and Approve Invoice

# Create draft invoice
invoice_id = await odoo_create_invoice(
    partner_id=42,
    move_type="out_invoice",
    invoice_lines=[
        {"product_id": 1, "quantity": 5, "price_unit": 100.00}
    ]
)
# Note: If amount > $1000, will require human approval

# Post invoice (always requires approval)
await odoo_post_invoice(invoice_id=invoice_id)

Integration Points

With Audit Logger

All operations are logged with:

With Safety Enforcer

Financial operations respect safety boundaries:

With Vault System

Approval requests are stored in:

Docker Setup (Odoo 19 Community)

# docker-compose.yml
version: '3'
services:
  odoo:
    image: odoo:19
    ports:
      - "8069:8069"
    environment:
      - HOST=db
      - USER=odoo
      - PASSWORD=odoo
    volumes:
      - odoo-data:/var/lib/odoo
    depends_on:
      - db

  db:
    image: postgres:15
    environment:
      - POSTGRES_USER=odoo
      - POSTGRES_PASSWORD=odoo
      - POSTGRES_DB=postgres
    volumes:
      - postgres-data:/var/lib/postgresql/data

volumes:
  odoo-data:
  postgres-data:

Dependencies

When NOT to Use This Skill

Common Mistakes

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.