MCP Odoo Shell
Provides direct access to an Odoo database environment, enabling execution of Python code within an Odoo context, model introspection, and session management with tools for listing available models and retrieving detailed model information.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Odoo Shell list all product models in the database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Odoo Shell
A Model Context Protocol (MCP) server that provides access to an Odoo shell environment.
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.
Related MCP server: Panda Odoo MCP Server
Installation
# 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
# Run the MCP server
uv run odoo-shell-mcp
# Or run directly
uv run python odoo_shell_mcp.pyMCP Tools
The server exposes these tools:
execute_odoo_code: Execute Python code in Odoo shell contextreset_odoo_shell: Restart the shell process to clear statelist_odoo_models: Query available Odoo models with optional filteringodoo_model_info: Get detailed information about specific models
Development
# 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 buildLicense
MIT
Available Tools
4 toolsexecute_odoo_codeA
Execute Python code in an Odoo shell environment with full access to Odoo models and environment.
This tool provides direct access to the Odoo ORM and all loaded modules through
the shell environment. The ``env`` variable is available for accessing models,
and all standard Odoo shell features are accessible.
:param code: Python code to execute in the Odoo context
:type code: str
:return: The output from executing the code
:rtype: str
.. note::
The shell maintains persistent state between calls, so variables
defined in one execution will be available in subsequent calls.
.. warning::
Code executed through this tool has full access to the Odoo database
and can modify data. Use with appropriate caution.
Inputs: code (required).
list_odoo_modelsA
List available Odoo models, optionally filtered by pattern.
Queries the Odoo registry to retrieve all available model names.
If a pattern is provided, only models containing that pattern
in their name will be returned.
:param pattern: Optional pattern to filter model names (case-sensitive)
:type pattern: str
:return: List of model names, one per line
:rtype: str
.. note::
Results are limited to the first 50 matches to prevent overwhelming output.
Inputs: pattern.
odoo_model_infoA
Get information about a specific Odoo model.
Retrieves detailed information about the specified model including
its description, database table name, and field definitions.
:param model_name: Name of the Odoo model (e.g., 'res.partner', 'sale.order')
:type model_name: str
:return: Formatted information about the model and its fields
:rtype: str
.. example::
>>> odoo_model_info('res.partner')
Model: res.partner
Description: Partner
Table: res_partner
Fields:
name: Char
email: Char
phone: Char
...
Inputs: model_name (required).
reset_odoo_shellA
Reset the Odoo shell session (restart the shell process).
Terminates the current shell process and clears the global shell manager,
which will cause a new shell to be started on the next code execution.
This is useful for clearing session state or recovering from errors.
:return: Success message or error description
:rtype: str
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose with no overlap: execute_odoo_code runs code, list_odoo_models enumerates models, odoo_model_info provides details on a specific model, and reset_odoo_shell clears session state. The descriptions reinforce these distinct roles, making misselection unlikely.
All tools follow a consistent snake_case naming pattern with clear verb_noun structure (e.g., execute_odoo_code, list_odoo_models). The 'odoo' prefix is uniformly applied across all tools, enhancing predictability and readability.
With 4 tools, the count is reasonable for an Odoo shell server, covering core operations like code execution, model listing, model inspection, and session reset. It feels slightly thin but well-scoped, as each tool serves a clear purpose without unnecessary duplication.
The toolset covers essential Odoo shell workflows: exploring models, inspecting details, executing code, and managing sessions. Minor gaps exist, such as no direct database query tools or model-specific CRUD operations, but agents can work around these using execute_odoo_code for custom operations.
Maintenance
Related MCP Connectors
Your AI agent deploys, migrates & upgrades self-hosted Odoo ERP on a server you own.
Manage Odoo hosting on Odotify: servers, instances, backups, deploys, and slow-database diagnosis.
Connect AI to Odoo ERP 14-20: search, create, update and manage records in natural language.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants to interact with Odoo ERP systems, providing comprehensive tools for searching, creating, updating, and managing Odoo records through a standardized interface.23GPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables seamless interaction with Odoo instances through the Model Context Protocol, supporting CRUD operations, custom method execution, and real-time updates. It offers versatile communication via stdio and HTTP protocols, including support for streaming and Server-Sent Events.8MIT
- AlicenseBqualityDmaintenanceSSH-based Model Context Protocol server for Odoo.sh - Build custom apps with AI assistance using Git workflow tools.197MIT
- AlicenseAqualityDmaintenanceA version-agnostic MCP server for Odoo that enables AI agents to interact with any Odoo app's data, schema, and source code, supporting tasks like data CRUD, schema mapping, code analysis, and feature implementation.148MIT