Odoo MCP Server
Provides tools for interacting with Odoo ERP instances, enabling AI agents to perform CRUD operations, discover models and fields, manage views and defaults, and execute model methods.
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., "@Odoo MCP ServerShow me the fields on res.partner"
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
An MCP (Model Context Protocol) server that connects AI agents to Odoo ERP instances. Works with Claude Code, Cursor, Windsurf, and any MCP-compatible client.
Supports Odoo 17-18 (JSON-RPC) and Odoo 19+ (JSON-2 API) — auto-detects the best protocol.

Quick Start
# Run directly (uv handles dependencies automatically)
ODOO_URL=https://my.odoo.com ODOO_DB=mydb ODOO_USER=admin ODOO_PASSWORD=secret \
uv run odoo_mcp_server.pyNo virtualenv or pip install needed — the script has inline metadata that uv resolves automatically.
Related MCP server: odoo-mcp
Configure in Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"odoo": {
"type": "stdio",
"command": "uv",
"args": ["run", "--python", "3.11", "--script", "/path/to/odoo_mcp_server.py"],
"env": {
"ODOO_URL": "https://your-instance.odoo.com",
"ODOO_DB": "your-database",
"ODOO_USER": "admin",
"ODOO_PASSWORD": "your-password"
}
}
}
}Or for Odoo 19+ with API key auth:
{
"mcpServers": {
"odoo": {
"type": "stdio",
"command": "uv",
"args": ["run", "--python", "3.11", "--script", "/path/to/odoo_mcp_server.py"],
"env": {
"ODOO_URL": "https://your-instance.odoo.com",
"ODOO_DB": "your-database",
"ODOO_USER": "admin",
"ODOO_API_KEY": "your-api-key"
}
}
}
}Configure in Cursor / Windsurf
Add to ~/.cursor/mcp.json or equivalent:
{
"mcpServers": {
"odoo": {
"command": "uv",
"args": ["run", "--python", "3.11", "--script", "/path/to/odoo_mcp_server.py"],
"env": {
"ODOO_URL": "https://your-instance.odoo.com",
"ODOO_DB": "your-database",
"ODOO_USER": "admin",
"ODOO_PASSWORD": "your-password"
}
}
}
}Environment Variables
Variable | Required | Description |
| Yes | Odoo instance URL |
| Yes | Database name |
| Yes | Login username |
| One of these | Password (Odoo 17-18) |
| required | API key (Odoo 19+, preferred) |
| No | Set to |
Read-Only Mode
Set ODOO_READONLY=true to disable create, update, delete, and execute tools. Useful for safe browsing of production instances:
{
"mcpServers": {
"odoo": {
"type": "stdio",
"command": "uv",
"args": ["run", "--python", "3.11", "--script", "/path/to/odoo_mcp_server.py"],
"env": {
"ODOO_URL": "https://production.odoo.com",
"ODOO_DB": "prod",
"ODOO_USER": "readonly-user",
"ODOO_PASSWORD": "secret",
"ODOO_READONLY": "true"
}
}
}
}Available Tools
Core CRUD
Tool | Description |
| Query records with domain filters, field selection, pagination |
| Count matching records without fetching data |
| Bulk export up to 2000 records per call for spreadsheets |
| Create new records |
| Update existing records by ID |
| Delete records by ID |
| Run any model method (action_confirm, action_post, etc.) |
Discovery
Tool | Description |
| Discover available models with keyword filter |
| Inspect field definitions for any model |
| Health diagnostics (version, modules, users, crons, errors) |
| Show current connection details |
Model Customization
Tool | Description |
| Get comprehensive model metadata in one call — fields, views, actions, defaults, sort order |
| Set, update, or clear a field's default value (handles ir.default + JSON encoding) |
| Get the fully rendered (merged) form/tree/search view XML |
| Change a window action's domain, context, sort order, limit, or view modes |
Example Usage
Once configured, ask your AI agent:
"List all sale orders from this month"
"Show me the fields on res.partner"
"Create a new contact named Acme Corp"
"Run a health check on the Odoo instance"
"Export all products to a spreadsheet"
"Confirm sale order 42"
Model Customization Examples
"What's the default sort order for sale.order?"
"Change the default invoice policy on products to 'delivery'"
"Show me the form view for res.partner"
"What window actions exist for account.move? Change the default sort to date desc"
"List all custom fields on res.partner"
"What fields are required on sale.order?"
Model Customization Tools — Detailed Reference
odoo_model_info
Returns everything about a model in one call, eliminating the need for multiple exploratory queries.
odoo_model_info(model="sale.order")Returns:
default_order— the model's_orderattribute (e.g."date_order desc, id desc")rec_name— the field used for display name in dropdownsfield_count— total number of fieldsfields_by_type— field count grouped by type (many2one: 12, char: 8, ...)custom_fields— user-created fields (x_ prefix or state=manual)relational_fields— all Many2one, One2many, Many2many with their targetsrequired_fields— fields that must be filledviews— base views (form, tree, search) with IDs and prioritiesactions— window actions with their domain, context, and view modesdefaults— current ir.default values set for this model's fields
odoo_set_default
Manages field defaults via ir.default with proper JSON encoding. The most common source of agent errors when done manually.
# Set global default
odoo_set_default(model="product.template", field_name="invoice_policy", value="delivery")
# Set user-specific default
odoo_set_default(model="sale.order", field_name="warehouse_id", value=2, user_id=5)
# Remove a default
odoo_set_default(model="product.template", field_name="invoice_policy", value=null)The tool:
Finds the field_id in ir.model.fields (validates the field exists)
JSON-encodes the value automatically
Creates or updates the ir.default record
Returns before/after values for confirmation
odoo_get_view
Returns the fully rendered view XML after all inheritance is applied — what the user actually sees, not the raw fragments stored in ir.ui.view.
odoo_get_view(model="sale.order", view_type="form")
odoo_get_view(model="res.partner", view_type="tree")
odoo_get_view(model="account.move", view_type="search")Returns:
arch— the complete merged XMLview_id— the base view IDfields_in_view— list of field names present in the view
odoo_modify_action
Changes how a model appears in the UI by modifying its window action (ir.actions.act_window).
# List actions for a model (read-only)
odoo_modify_action(model="sale.order")
# Change default sort order
odoo_modify_action(action_id=42, order="date_order desc")
# Change default filter and page size
odoo_modify_action(action_id=42, domain="[['state','=','sale']]", limit=200)
# Add default grouping via context
odoo_modify_action(action_id=42, context="{'group_by': 'partner_id'}")The tool returns before/after values so you can verify what changed.
How It Works
AI Agent (Claude, Cursor, etc.)
↕ MCP Protocol (stdio)
Odoo MCP Server
↕ JSON-RPC / JSON-2 API
Odoo InstanceThe server authenticates once at startup and maintains a persistent connection. All tools use the same authenticated session.
Requirements
Python 3.11+
uv (recommended) or
pip install fastmcp httpx
License
MIT
This server cannot be installed
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 Servers
- AlicenseBqualityDmaintenanceAn MCP server that enables AI assistants to interact with Odoo ERP apps like Inventory, CRM, Sales, and Manufacturing. It allows users to read, create, and manage Odoo records and workflows using natural language commands.25321ISC
- Alicense-qualityCmaintenanceAn MCP server that connects AI assistants to Odoo ERP instances via the built-in XML-RPC API without requiring any additional addons. It enables users to search, create, update, and manage Odoo records and models through natural language.238MIT
- Alicense-qualityDmaintenanceAn enterprise-grade MCP server for interacting with Odoo ERP through AI assistants, enabling guided workflows, native BI, and deep introspection.10MIT
- Alicense-qualityCmaintenanceAn MCP server that enables AI assistants to interact with Odoo ERP, allowing natural language queries, record creation, updates, and deletions.LGPL 3.0
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for AI dialogue using various LLM models via AceDataCloud
GibsonAI MCP server: manage your databases with natural language
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/oconsole/odoo-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server