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 "Install 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 Shelllist 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.
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: the tool provides 'full access to Odoo models and environment', maintains 'persistent state between calls', and includes a warning that code 'can modify data' and should be used 'with appropriate caution'. This covers safety, statefulness, and permissions adequately.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and front-loaded with the core purpose, followed by details on environment access, parameter/return notes, and warnings. Each sentence adds value (e.g., state persistence, safety warning), with no redundant information, making it efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (executing arbitrary code in a database environment), no annotations, and no output schema, the description is largely complete: it covers purpose, behavior, parameters, and risks. However, it lacks details on error handling or output format specifics, which could be useful for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, so the description must compensate. It adds meaningful semantics: the 'code' parameter is 'Python code to execute in the Odoo context', and it notes the 'env' variable is available. This clarifies the parameter's purpose and context beyond the bare schema, though it could detail code format or examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Execute Python code') and resource ('in an Odoo shell environment'), distinguishing it from siblings like list_odoo_models (listing) and reset_odoo_shell (resetting). It specifies the environment has 'full access to Odoo models and environment', making the purpose explicit and distinct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool: for executing Python code in Odoo with ORM access. It mentions persistent state between calls, which implies usage for sequential operations. However, it doesn't explicitly state when NOT to use it or name alternatives (e.g., using other tools for non-code tasks), though the sibling tools suggest different purposes.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: the tool queries the Odoo registry, returns model names one per line, and has a 50-result limit to prevent overwhelming output. This covers important operational constraints that aren't in the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly structured and front-loaded with the core purpose, followed by implementation details, parameter documentation, and important notes. Every sentence adds value without redundancy, and the parameter documentation uses clear Python-style formatting that's easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter query tool with no annotations or output schema, the description provides complete context: purpose, usage, parameter semantics, return format, and important behavioral constraints (50-result limit). Nothing essential appears to be missing for an agent to understand and use this tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description fully compensates by explaining the single parameter's purpose ('pattern to filter model names'), type (str), and behavior ('case-sensitive', 'only models containing that pattern'). The return value is also clearly documented as 'List of model names, one per line'.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('List available Odoo models') and resource ('Odoo models'), distinguishing it from siblings like 'execute_odoo_code' or 'odoo_model_info' which perform different operations. The optional filtering capability is explicitly mentioned, providing a complete picture of the tool's function.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool (to list models with optional pattern filtering) and implicitly contrasts with 'odoo_model_info' which likely provides detailed information about a specific model. However, it doesn't explicitly state when NOT to use it or name alternatives, keeping it at a 4 rather than a perfect 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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
...
| Name | Required | Description | Default |
|---|---|---|---|
| model_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It describes the tool as a read operation ('Get information', 'Retrieves'), which implies it's non-destructive and likely read-only, but doesn't explicitly state safety aspects like permissions, rate limits, or error handling. The example shows output format, adding some behavioral context, but lacks details on what happens with invalid model names or other edge cases.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and appropriately sized. It starts with a clear purpose statement, details what information is retrieved, includes parameter and return type documentation, and provides a helpful example. The example is detailed but necessary for understanding output format. Minor verbosity in the example could be trimmed, but overall it's efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (1 parameter, no output schema, no annotations), the description is somewhat complete but has gaps. It covers purpose, parameter semantics, and output format via example, but lacks behavioral details like error handling or performance characteristics. Without annotations or output schema, more context on what 'Formatted information' entails would be beneficial.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that 'model_name' is the 'Name of the Odoo model' and provides examples ('res.partner', 'sale.order'), clarifying the parameter's purpose and format. This compensates fully for the schema's lack of documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get information about a specific Odoo model' and specifies what information is retrieved (description, table name, field definitions). It distinguishes from sibling tools like 'list_odoo_models' (which likely lists models rather than details) and 'execute_odoo_code' (which executes code). However, it doesn't explicitly contrast with siblings in the text itself.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by providing an example with 'res.partner', suggesting it's for retrieving metadata about Odoo models. It doesn't explicitly state when to use this vs. alternatives like 'list_odoo_models' (for listing models) or 'reset_odoo_shell' (for resetting), leaving the agent to infer from context. No explicit exclusions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: it terminates the current process, clears the manager, and causes a new shell on next execution, which are crucial for understanding its impact. It also mentions the return type (str) and possible outcomes (success or error), adding valuable context beyond basic functionality.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, starting with the core action and following with explanatory details. Every sentence earns its place by clarifying the process, purpose, and return value without unnecessary words, making it efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (a reset operation with no parameters) and the absence of annotations and output schema, the description is largely complete. It covers what the tool does, why to use it, and the return type. However, it could be more explicit about potential side effects or dependencies, such as whether it affects other sessions or requires specific permissions, slightly limiting completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description does not discuss parameters, which is appropriate. A baseline of 4 is applied as it compensates adequately for the lack of parameters by focusing on the tool's action and effects, adding value without redundancy.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('reset', 'restart', 'terminates', 'clears') and resource ('Odoo shell session', 'shell process', 'global shell manager'), distinguishing it from sibling tools like execute_odoo_code, list_odoo_models, and odoo_model_info. It precisely defines what the tool does without being vague or tautological.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool ('useful for clearing session state or recovering from errors'), which implies usage scenarios. However, it does not explicitly state when not to use it or name alternatives among the sibling tools, such as whether execute_odoo_code might be preferred for certain tasks, keeping it from a perfect score.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Manage CloudPepper servers, Odoo instances, backups, and deployments over MCP.
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Enterprise code intelligence for M&A, security audits, and tech debt. Hosted server with 200k free.
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.24GPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables 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
- AlicenseBqualityDmaintenanceSafety-first Model Context Protocol server for Odoo that enables AI assistants to safely inspect records, explain business data, prepare controlled changes, and rollback supported operations.71MIT
- AlicenseNot gradedqualityDmaintenanceSSH-based Model Context Protocol server for Odoo.sh - Build custom apps with AI assistance using Git workflow tools.5MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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