Skip to main content
Glama

MCP Odoo Shell

by seletz
README.md1.97 kB
# MCP Odoo Shell A Model Context Protocol (MCP) server that provides access to an Odoo shell environment. > [!CAUTION] > **PRE-ALPHA SOFTWARE - DO NOT USE IN PRODUCTION** > > This software is in early development and should **NEVER** be used with production Odoo databases. It provides direct shell access to your Odoo database with full read/write capabilities and could cause data loss, corruption, or security vulnerabilities. > > **Use only with:** > - Test databases > - Development environments > - Disposable data > > **You have been warned!** 🚨 ## Overview This MCP server acts as a bridge between MCP clients and Odoo, allowing execution of Python code within an Odoo database context. It maintains a persistent Odoo shell subprocess and provides tools for code execution, model introspection, and session management. ## Installation ```bash # Install dependencies uv sync --dev # Install the package uv pip install -e . ``` ## Configuration Set these environment variables: - `ODOO_BIN_PATH`: Path to odoo-bin executable (default: `/usr/bin/odoo-bin`) - `ODOO_ADDONS_PATH`: Comma-separated addon directories (default: `/odoo/addons`) - `ODOO_DATABASE`: Database name (default: `odoo`) - `ODOO_CONFIG_FILE`: Optional Odoo configuration file path ## Usage ```bash # Run the MCP server uv run odoo-shell-mcp # Or run directly uv run python odoo_shell_mcp.py ``` ## MCP Tools The server exposes these tools: - **`execute_odoo_code`**: Execute Python code in Odoo shell context - **`reset_odoo_shell`**: Restart the shell process to clear state - **`list_odoo_models`**: Query available Odoo models with optional filtering - **`odoo_model_info`**: Get detailed information about specific models ## Development ```bash # Run tests uv run pytest # Run tests with coverage uv run pytest --cov=odoo_shell_mcp --cov-report=term-missing # Lint and format uv run ruff check . uv run ruff format . # Build package uv build ``` ## License MIT

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/seletz/mcp-odoo-shell'

If you have feedback or need assistance with the MCP directory API, please join our Discord server