Get the FREE Ultimate OpenClaw Setup Guide →

odoo-18-cli-toolkit

Command-line toolkit for Odoo 18 Community Edition - Database management, module operations, and AI-powered PostgreSQL queries

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ihatesea69-odoo-18-cli-toolkit uv run --directory /path/to/postgres-mcp postgres-mcp postgresql://user:pass@localhost:5432/your_database

How to use

This MCP server enables AI-powered, natural language-style interactions with your PostgreSQL database via the postgres-mcp integration. It works in concert with the Odoo 18 CLI Toolkit components (click-odoo and click-odoo-contrib) to allow scripted database management, module operations, and custom Python scripting within a unified MCP environment. Use the provided MCP server to route AI-assisted queries or scripted commands to PostgreSQL, while leveraging the Odoo toolkit for transactional handling, backups, restores, and module management.

To use the tools, connect to the MCP-enabled PostgreSQL instance through the uv-based server you configured. Use the click-odoo CLI commands to manage databases, run custom Python scripts in the Odoo environment, and perform module operations. The AI-powered MCP layer can interpret natural language prompts into structured SQL or Odoo operations, enabling you to perform complex tasks like automated backups, migrations, or module updates with guided prompts and transactional safety.

How to install

Prerequisites

  • Python 3.10+
  • PostgreSQL 14+
  • Odoo 18 Community Edition
  • uv (Python package manager)

Installation steps

  1. Clone the repository and navigate to it:
# Clone repository
git clone https://github.com/nghidanh2005/odoo-18-cli-toolkit.git
cd odoo-18-cli-toolkit
  1. Create and activate a Python virtual environment:
uv venv
.venv\Scripts\activate  # Windows
source .venv/bin/activate  # Linux/macOS
  1. Install dependencies (Python):
uv pip install click-odoo click-odoo-contrib
  1. Install and configure the MCP server (PostgreSQL MCP):
  • Ensure PostgreSQL is installed and running.
  • Set up the postgres-mcp component from the postgres-mcp project as described in its docs.
  • Create the MCP configuration (see mcp_config example) and place it where your MCP runtime can load it.

Note: The MCP server is configured to run with uv and expects the PostgreSQL MCP module at the specified directory. Adjust the directory and database URL in the configuration to match your environment.

Additional notes

Tips and notes:

  • Ensure Python virtual environment is activated before running any click-odoo commands.
  • The MCP config example uses a placeholder PostgreSQL connection string; replace with your actual credentials and database name.
  • If you run into permission issues on Linux/macOS, ensure your user has access to the PostgreSQL database and the MCP module directory.
  • When running backups or module operations, rely on the transactional guarantees provided by click-odoo to maintain data integrity.
  • The iv (uv) runtime expects the /path/to/postgres-mcp to contain the postgres-mcp module; keep that path accurate to avoid startup errors.
  • For Windows, adapt the activation commands and paths as needed (e.g., using PowerShell or CMD equivalents).

Related MCP Servers

Sponsor this space

Reach thousands of developers