Odoo MCP Server
Provides tools for interacting with an Odoo ERP instance via XML-RPC, including searching models, listing fields, and creating, retrieving, updating, deleting, and counting records.
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., "@Odoo MCP Server Find all company contacts in res.partner and show their names and emails"
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.
Odoo MCP Server
A Model Context Protocol (MCP) server that enables AI assistants (like Claude) to interact with Odoo ERP systems through standardized tools for data retrieval and manipulation.
Features
đ Search Models: Find installed Odoo models by name pattern
đ List Fields: Inspect model structure and field properties
đ Get Record: Retrieve specific records by ID
đ Search Records: Query records using Odoo domain filters
â Create Record: Create new records with field validation
âī¸ Update Record: Modify existing records
đī¸ Delete Record: Remove records from the database
đĸ Count Records: Count matching records
âšī¸ Server Info: Get Odoo version and connection details
Related MCP server: MCP Server for Odoo
Prerequisites
Python 3.10 or higher
Access to an Odoo instance (any version with XML-RPC enabled)
Odoo user with appropriate permissions
Installation
1. Clone or Copy Files
git clone https://github.com/ajmalj/mcp-odoo-server.git
cd mcp-odoo-serverpip install -r requirements.txtOr install directly:
pip install fastmcp python-dotenvOption 2: Install as Package
Install in editable mode for development:
pip install -e .Or install with development dependencies:
pip install -e ".[dev]"Configuration
Copy the example environment file and fill in your Odoo credentials:
cp .env.example .envEdit .env with your values:
ODOO_URL=http://localhost:8069
ODOO_DB=your_database_name
ODOO_USER=admin
ODOO_PASSWORD=your_password_or_api_keyTip: For better security, use an API key instead of your password.
Running the Server
Direct Execution
python server.pyUsing FastMCP CLI
fastmcp run server.py:mcpWith HTTP Transport (for debugging)
fastmcp run server.py:mcp --transport http --port 8000Claude Desktop Configuration
Add the following to your Claude Desktop configuration file:
macOS
~/Library/Application Support/Claude/claude_desktop_config.json
Windows
%APPDATA%\Claude\claude_desktop_config.json
Configuration
{
"mcpServers": {
"odoo": {
"command": "python",
"args": ["/absolute/path/to/mcp_odoo_server/server.py"],
"env": {
"ODOO_URL": "http://localhost:8069",
"ODOO_DB": "your_database_name",
"ODOO_USER": "admin",
"ODOO_PASSWORD": "your_password_or_api_key"
}
}
}
}Alternative: Using UV (Recommended)
If you have UV installed:
{
"mcpServers": {
"odoo": {
"command": "uv",
"args": [
"run",
"--with", "fastmcp",
"--with", "python-dotenv",
"python",
"/absolute/path/to/mcp_odoo_server/server.py"
],
"env": {
"ODOO_URL": "http://localhost:8069",
"ODOO_DB": "your_database_name",
"ODOO_USER": "admin",
"ODOO_PASSWORD": "your_password_or_api_key"
}
}
}
}Available Tools
search_models
Search for installed Odoo models.
Arguments:
- name_pattern: Pattern to filter model names (optional)
- limit: Maximum results (default: 50)list_fields
List all fields of a specific model.
Arguments:
- model: Technical model name (e.g., 'res.partner')
- field_pattern: Pattern to filter field names (optional)get_record
Retrieve a specific record by ID.
Arguments:
- model: Technical model name
- record_id: ID of the record
- fields: List of fields to retrieve (optional)search_records
Search records using domain filters.
Arguments:
- model: Technical model name
- domain: Odoo domain filter (e.g., [['is_company', '=', True]])
- fields: List of fields to retrieve (optional)
- limit: Maximum results (default: 50)
- offset: Skip records for pagination
- order: Sort order (e.g., 'name asc')create_record
Create a new record.
Arguments:
- model: Technical model name
- values: Dictionary of field valuesupdate_record
Update an existing record.
Arguments:
- model: Technical model name
- record_id: ID of the record to update
- values: Dictionary of field values to updatedelete_record
Delete a record.
Arguments:
- model: Technical model name
- record_id: ID of the record to deletecount_records
Count records matching a domain.
Arguments:
- model: Technical model name
- domain: Odoo domain filter (optional)get_server_info
Get Odoo server version and connection info.
Arguments: NoneUsage Examples
Once configured in Claude Desktop, you can ask Claude:
"List all models in Odoo that contain 'sale'"
"Show me the fields of the res.partner model"
"Search for all company contacts in the system"
"Create a new customer named 'ACME Corp' with email 'contact@acme.com'"
"Update the phone number of partner ID 42"
"How many sale orders are in confirmed state?"
Security Considerations
Use API Keys: Instead of passwords, generate API keys in Odoo (Settings > Users > API Keys)
Limit Permissions: Create a dedicated Odoo user with only the necessary access rights
Secure Credentials: Never commit
.envfiles to version controlNetwork Security: Use HTTPS in production and consider firewall rules
Troubleshooting
Connection Refused
Verify Odoo is running and accessible at the configured URL
Check if XML-RPC is enabled (it's enabled by default)
Authentication Failed
Double-check credentials in
.envfileEnsure the database name is correct
Verify the user has XML-RPC access
Permission Denied
The Odoo user needs appropriate access rights for the models you're querying
Check security groups and access rules in Odoo
License
MIT License - Feel free to modify and use as needed.
Available Tools
9 toolscount_recordsCount RecordsB
Count records in an Odoo model matching a domain filter.
Inputs: model (required), domain. Returns: object
create_recordCreate RecordC
Create a new record in an Odoo model.
Inputs: model (required), values (required). Returns: object
delete_recordDelete RecordC
Delete a record from an Odoo model.
Inputs: model (required), record_id (required). Returns: object
get_recordGet RecordB
Get a specific record by ID from an Odoo model.
Inputs: model (required), record_id (required), fields. Returns: object
get_server_infoGet Server InfoA
Get the version and server information of the connected Odoo instance.
Inputs: no named parameters. Returns: object
list_fieldsList FieldsA
List all fields of a specific Odoo model with their types and properties.
Inputs: model (required), field_pattern. Returns: object
search_modelsSearch ModelsA
Search for installed Odoo models. Returns model names and descriptions.
Inputs: limit, name_pattern. Returns: object
search_recordsSearch RecordsB
Search records in an Odoo model using domain filters.
Inputs: model (required), limit, order, domain, +2 more. Returns: object
update_recordUpdate RecordC
Update an existing record in an Odoo model.
Inputs: model (required), values (required), record_id (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogâĻ
TDQS
Scored across 9 tools
Each tool maps to a distinct action on a distinct target: model introspection (search_models, list_fields), single-record access (get_record), filtered queries (search_records, count_records), mutations (create/update/delete_record), and server metadata (get_server_info). The only near-overlap, search_records vs count_records, is clearly separated by one returning records and the other an aggregate count. An agent can pick correctly from names alone.
Every tool follows a strict verb_noun snake_case pattern (search_models, list_fields, get_record, create_record, update_record, delete_record, count_records, get_server_info). No camelCase, no stray verbs, and plural/singular usage is logical (models/records plural for sets, record singular for single-ID ops).
Nine tools is well within the sweet spot and every tool earns its place: a clean introspection layer, full record CRUD, and two supporting utilities. Nothing feels redundant or bolted on for a generic Odoo ORM surface.
CRUD plus schema introspection and counting gives solid lifecycle coverage for generic record manipulation. The notable gap is method invocation (Odoo workflows like confirming orders or posting invoices typically require calling model methods) along with bulk operations and aggregation/grouping, which agents will have to work around.
Maintenance
Related MCP Connectors
Connect AI to Odoo ERP 14-20: search, create, update and manage records in natural language.
Odoo ERP for AI agents: hosted OAuth endpoint, gated writes, one endpoint for every instance.
Connect your Odoo to Claude and ChatGPT: ask about sales, stock, customers and invoices.
Read, write and run Odoo actions from any AI app, as each user, with approval rules per colleague.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Odoo ERP systems through XML-RPC communication. Provides access to Odoo models, records, methods, and data structures for comprehensive ERP integration.2MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to interact with Odoo ERP systems through natural language to search records, create entries, update data, and manage business operations. Supports secure authentication and configurable access controls for production environments.Mozilla Public 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with Odoo ERP systems through natural language, allowing users to search, create, update, and manage business records like customers, products, and invoices across any Odoo instance.1Mozilla Public 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to fully interact with Odoo ERP instances over XML-RPC, supporting read and write operations on any model without requiring Odoo module installation.5AGPL 3.0