mcp odoo
An MCP server implementation that integrates with Odoo ERP systems, enabling AI assistants to interact with Odoo data and functionality through the Model Context Protocol.
An MCP server implementation that integrates with Odoo ERP systems, enabling AI assistants to interact with Odoo data and functionality through the Model Context Protocol.
An MCP server implementation that integrates with Odoo ERP systems, enabling AI assistants to interact with Odoo data and functionality through the Model Context Protocol.
model
(string): The model name (e.g., 'res.partner')domain
(array): Search domain (e.g., [['is_company', '=', true]])fields
(optional array): Optional fields to fetchlimit
(optional number): Maximum number of records to returnReturns: Matching records with requested fields
read_record
model
(string): The model name (e.g., 'res.partner')id
(number): The record IDfields
(optional array): Optional fields to fetchReturns: Record data with requested fields
create_record
model
(string): The model name (e.g., 'res.partner')values
(object): Dictionary of field valuesReturns: Dictionary with the new record ID
update_record
model
(string): The model name (e.g., 'res.partner')id
(number): The record IDvalues
(object): Dictionary of field values to updateReturns: Dictionary indicating success
delete_record
model
(string): The model name (e.g., 'res.partner')id
(number): The record IDReturns: Dictionary indicating success
execute_method
model
(string): The model name (e.g., 'res.partner')method
(string): Method name to executeargs
(optional array): Positional argumentskwargs
(optional object): Keyword argumentsReturns: Dictionary with the method result
get_model_fields
model
(string): The model name (e.g., 'res.partner')Returns: Dictionary with field definitions
search_employee
name
(string): The name (or part of the name) to search for.limit
(optional number): The maximum number of results to return (default 20).Returns: List of matching employee names and IDs.
search_holidays
start_date
(string): Start date in YYYY-MM-DD format.end_date
(string): End date in YYYY-MM-DD format.employee_id
(optional number): Optional employee ID to filter holidays.Returns: JSON array of model information
odoo://model/{model_name}
odoo://model/res.partner
Returns: JSON object with model metadata and field definitions
odoo://record/{model_name}/{record_id}
odoo://record/res.partner/1
Returns: JSON object with record data
odoo://search/{model_name}/{domain}
odoo://search/res.partner/[["is_company","=",true]]
odoo_config.json
:{
"url": "https://your-odoo-instance.com",
"db": "your-database-name",
"username": "your-username",
"password": "your-password-or-api-key"
}
ODOO_URL
: Your Odoo server URLODOO_DB
: Database nameODOO_USERNAME
: Login usernameODOO_PASSWORD
: Password or API keyODOO_TIMEOUT
: Connection timeout in seconds (default: 30)ODOO_VERIFY_SSL
: Whether to verify SSL certificates (default: true)HTTP_PROXY
: Force the ODOO connection to use an HTTP proxyAdd this to your claude_desktop_config.json
:
{
"mcpServers": {
"odoo": {
"command": "python",
"args": [
"-m",
"odoo_mcp"
],
"env": {
"ODOO_URL": "https://your-odoo-instance.com",
"ODOO_DB": "your-database-name",
"ODOO_USERNAME": "your-username",
"ODOO_PASSWORD": "your-password-or-api-key"
}
}
}
}
{
"mcpServers": {
"odoo": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"ODOO_URL",
"-e",
"ODOO_DB",
"-e",
"ODOO_USERNAME",
"-e",
"ODOO_PASSWORD",
"mcp/odoo"
],
"env": {
"ODOO_URL": "https://your-odoo-instance.com",
"ODOO_DB": "your-database-name",
"ODOO_USERNAME": "your-username",
"ODOO_PASSWORD": "your-password-or-api-key"
}
}
}
}
pip install odoo-mcp
# Using the installed package
odoo-mcp
# Using the MCP development tools
mcp dev odoo_mcp/server.py
# With additional dependencies
mcp dev odoo_mcp/server.py --with pandas --with numpy
# Mount local code for development
mcp dev odoo_mcp/server.py --with-editable .
Docker build:
docker build -t mcp/odoo:latest -f Dockerfile .
When using the MCP tools for Odoo, pay attention to these parameter formatting guidelines:
[["field", "operator", value], ...]
{"conditions": [{"field": "...", "operator": "...", "value": "..."}]}
Examples:
[["is_company", "=", true]]
{"conditions": [{"field": "date_order", "operator": ">=", "value": "2025-03-01"}]}
[["date_order", ">=", "2025-03-01"], ["date_order", "<=", "2025-03-31"]]
Fields Parameter:
["name", "email", "phone"]
This MCP server is licensed under the MIT License.