Odoo MCP Improved provides a bridge between large language models and your Odoo ERP system, enabling AI assistants to interact directly with your business data across sales, purchases, inventory, and accounting modules through the Model Context Protocol (MCP).
pip install odoo-mcp-improved
git clone https://github.com/hachecito/odoo-mcp-improved.git
cd odoo-mcp-improved
pip install -e .
Set up your Odoo connection details using environment variables:
export ODOO_URL=https://your-odoo-instance.com
export ODOO_DB=your_database
export ODOO_USERNAME=your_username
export ODOO_PASSWORD=your_password
Alternatively, create an odoo_config.json
file in your working directory:
{
"url": "https://your-odoo-instance.com",
"db": "your_database",
"username": "your_username",
"password": "your_password"
}
Start the MCP server with a simple command:
python -m odoo_mcp
To integrate with Claude Desktop, add the following 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",
"ODOO_USERNAME": "your_username",
"ODOO_PASSWORD": "your_password"
}
}
}
}
Here are some example interactions you can use with the Odoo MCP:
# Sales Analysis
Using the Odoo MCP, analyze our sales performance for the last quarter and identify our top-selling products.
# Inventory Check
Check the current stock levels for product XYZ across all warehouses.
# Financial Analysis
Calculate our current liquidity and profitability ratios based on the latest financial data.
# Customer Insights
Provide insights on customer ABC's purchase history and payment patterns.
The MCP server provides standardized access to Odoo data through URI patterns:
odoo://sales/orders
: List sales ordersodoo://sales/order/{order_id}
: Get details of a specific sales orderodoo://sales/products
: List sellable productsodoo://sales/customers
: List customersodoo://purchase/orders
: List purchase ordersodoo://purchase/order/{order_id}
: Get details of a specific purchase orderodoo://purchase/suppliers
: List suppliersodoo://inventory/products
: List products in inventoryodoo://inventory/stock/{location_id}
: Get stock levels at a specific locationodoo://inventory/movements
: List inventory movementsodoo://accounting/accounts
: List accounting accountsodoo://accounting/journal_entries
: List journal entriesodoo://accounting/reports/{report_type}
: Get financial reportsTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "odoo" '{"command":"python","args":["-m","odoo_mcp"],"env":{"ODOO_URL":"https://your-odoo-instance.com","ODOO_DB":"your_database","ODOO_USERNAME":"your_username","ODOO_PASSWORD":"your_password"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"odoo": {
"command": "python",
"args": [
"-m",
"odoo_mcp"
],
"env": {
"ODOO_URL": "https://your-odoo-instance.com",
"ODOO_DB": "your_database",
"ODOO_USERNAME": "your_username",
"ODOO_PASSWORD": "your_password"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"odoo": {
"command": "python",
"args": [
"-m",
"odoo_mcp"
],
"env": {
"ODOO_URL": "https://your-odoo-instance.com",
"ODOO_DB": "your_database",
"ODOO_USERNAME": "your_username",
"ODOO_PASSWORD": "your_password"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect