MCP Server for Odoo
ivnvxd
README
MCP Server for Odoo
A Model Context Protocol (MCP) server implementation for Odoo. This package allows AI models to interact with Odoo data and functionality through a standardized MCP interface, enabling AI assistants like Claude to search, retrieve, and eventually manipulate Odoo data.
Features
- Expose Odoo data as MCP resources through a standardized interface
- Search functionality with domain filters and complex queries
- Pagination and summarization for large datasets
- Smart formatting of Odoo data optimized for LLM consumption
- Progressive disclosure of data with URIs for detailed access
- Follows existing Odoo permission model and security constraints
- Easy configuration through environment variables or CLI arguments
- Auto-detection of default database when not specified
Installation
pip install mcp-server-odoo
# or
uv install mcp-server-odoo
Configuration
Configure the MCP server using environment variables:
ODOO_URL
: URL of your Odoo instanceODOO_DB
: Database name (optional - will auto-detect if not specified)ODOO_MCP_TOKEN
: Authentication token from the Odoo MCP moduleODOO_USERNAME
: Odoo usernameODOO_PASSWORD
: Odoo passwordODOO_MCP_LOG_LEVEL
: Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)ODOO_MCP_DEFAULT_LIMIT
: Default record limit (default: 50)ODOO_MCP_MAX_LIMIT
: Maximum allowed record limit (default: 100)
Or use command-line arguments:
mcp-server-odoo --url https://example.odoo.com --token abc123
Authentication
The MCP server supports two authentication methods:
-
Token-based authentication (recommended):
- Generate a token in the Odoo MCP module settings
- Set the token in environment variables or use the
--token
argument - Secure and maintains user permissions from Odoo
-
Username/password authentication:
- Use when token authentication is not available
- Specify using
ODOO_USERNAME
andODOO_PASSWORD
environment variables
All operations through the MCP server inherit the permissions of the authenticated Odoo user, respecting existing Odoo security constraints.
Database Auto-detection
If the ODOO_DB
environment variable or --db
argument is not provided, the server will attempt to detect the default database for the Odoo instance automatically. This is particularly useful for single-database Odoo installations.
The auto-detection process:
- Tries to query the database list endpoint (
/web/database/list
) - If that fails, attempts to extract the database from the login page
If auto-detection fails, you'll need to specify the database explicitly.
Resource URI Format
The Odoo MCP server uses the following URI format for resources:
odoo://{model}/{operation}?{parameters}
Operations
record/{id}
- Fetch a specific recordsearch
- Search for records using domainbrowse
- Retrieve multiple records by IDscount
- Count matching recordsfields
- Get field definitions
Parameters
domain
- Odoo domain expression (URL-encoded)fields
- Comma-separated list of fields to returnlimit
- Maximum number of records to returnoffset
- Pagination offsetorder
- Sorting criteria
Example URIs
odoo://res.partner/record/42
odoo://product.product/search?domain=[('type','=','product')]&limit=10
odoo://sale.order/browse?ids=1,2,3,4
odoo://res.partner/count?domain=[('country_id.code','=','US')]
odoo://product.template/fields
Data Representation
Resources are returned in a human-readable text format, optimized for LLM consumption:
Resource: res.partner/record/42
Name: Deco Addict
Email: deco.addict82@example.com
Phone: +1 555-123-4567
Address:
Street: 77 Santa Barbara Rd
City: Pleasant Hill
ZIP: 94523
Country: United States
Related Contacts: [odoo://res.partner/search?domain=[('parent_id','=',42)]]
Recent Orders: [odoo://sale.order/search?domain=[('partner_id','=',42)]&limit=5]
For large datasets, smart summarization is provided:
Search Results: res.partner (1247 total matches)
Showing: Records 1-15 of 1247
Summary:
- Customer type: 923 companies, 324 individuals
- By country: US (412), France (287), Germany (203), Other (345)
- Active status: 1198 active, 49 archived
Records:
1. Deco Addict (Company) - US, Active [odoo://res.partner/record/1]
...
Refinement options:
- Filter by country: odoo://res.partner/search?domain=[('country_id.code','=','US')]
- Next page: odoo://res.partner/search?offset=15&limit=15
Usage with Claude Desktop App
Add to your mcp.conf
:
{
"odoo": {
"command": "mcp-server-odoo",
"args": []
}
}
For more customization, you can use environment variables:
{
"odoo": {
"command": "mcp-server-odoo",
"args": [],
"env": {
"ODOO_URL": "https://example.odoo.com",
"ODOO_DB": "mydb",
"ODOO_MCP_TOKEN": "abc123"
}
}
}
Example AI Assistant Interactions
Once configured, you can interact with your Odoo instance using natural language. Here are some examples:
Basic Information Retrieval
- "Find all customers in California who purchased something last month"
- "Show me the top 5 products by sales volume this quarter"
- "What's the payment status of invoice INV/2023/00423?"
Complex Data Analysis
- "Summarize our sales performance by region for Q1 2023"
- "Compare inventory levels across all warehouses"
- "Show me customers who haven't ordered in the last 6 months"
Contextual Follow-ups
- "How many of them are in the technology sector?"
- "Which one has the highest lifetime value?"
- "Can you give me more details about this customer?"
The AI assistant will translate these natural language queries into appropriate MCP resource requests to retrieve and present the relevant information.
Development
# Clone the repository
git clone https://github.com/ivnvxd/mcp-server-odoo.git
cd mcp-server-odoo
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run the development server with MCP Inspector
mcp dev mcp_server_odoo
# Install the server in Claude Desktop
mcp install mcp_server_odoo
Odoo Module Integration
This Python package is designed to work alongside the mcp_server
Odoo module. The complete system consists of two components:
-
Odoo Module (
mcp_server
)- Installed within the Odoo environment
- Handles configuration and security settings
- Manages model access permissions
- Provides authentication tokens for the Python package
-
Python Package (
mcp-server-odoo
)- This package - implements the MCP protocol
- Connects to Odoo via XML-RPC
- Uses stdio transport for MCP client communication
- Handles resource formatting and pagination
Integration Flow
┌─────────────────┐ ┌─────────────────────┐ ┌──────────────────┐
│ │ │ │ │ │
│ MCP Client │◄────►│ mcp-server-odoo │◄─────►│ Odoo Instance │
│ (Claude/etc) │ stdio│ (Python Package) │XML-RPC│ with mcp_server │
│ │ │ │ │ │
└─────────────────┘ └─────────────────────┘ └──────────────────┘
The Odoo module must be installed in your Odoo instance before using this Python package. For information on installing and configuring the Odoo module, please refer to the mcp_server module documentation.
Support
Thank you for using this project! If you find it helpful and would like to support my work, kindly consider buying me a coffee. Your support is greatly appreciated!
<a href="https://www.buymeacoffee.com/ivnvxd" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
And do not forget to give the project a star if you like it! :star:
License
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the LICENSE file for details.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor

Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.