mcp-server-odoo
Enables 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.
README
🔌 mcp-server-odoo
A Model Context Protocol server that gives AI assistants full access to your Odoo ERP instance over XML-RPC.
No Odoo module installation required. Just point it at any Odoo 12+ instance.
🤖 AI Assistant (Claude Code, Claude Desktop, etc.)
│ MCP (stdio)
▼
📡 mcp-server-odoo
│ XML-RPC
▼
🏢 Odoo Instance
⚡ Quick Start
No cloning required — just run directly from GitHub with uv:
🖥️ With Claude Code
claude mcp add odoo \
-e ODOO_URL=http://localhost:8069 \
-e ODOO_DB=mydb \
-e ODOO_USER=admin \
-e ODOO_PASSWORD=admin \
-- uvx --from git+https://github.com/altinkaya-opensource/odoo-mcp mcp-server-odoo
🖱️ With Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"odoo": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/altinkaya-opensource/odoo-mcp",
"mcp-server-odoo"
],
"env": {
"ODOO_URL": "http://localhost:8069",
"ODOO_DB": "mydb",
"ODOO_USER": "admin",
"ODOO_PASSWORD": "admin"
}
}
}
}
🔒 Readonly Mode
Block all write operations by adding READONLY_MODE=true:
claude mcp add odoo \
-e ODOO_URL=http://localhost:8069 \
-e ODOO_DB=mydb \
-e ODOO_USER=admin \
-e ODOO_PASSWORD=admin \
-e READONLY_MODE=true \
-- uvx --from git+https://github.com/altinkaya-opensource/odoo-mcp mcp-server-odoo
🛠️ Tools
📖 Read Operations
| Tool | Description |
|---|---|
search_records |
🔍 Search any model with domain filters, field selection, pagination, and sorting |
read_record |
📄 Read a single record by ID with smart field selection |
get_record_count |
🔢 Count records matching a domain filter (lightweight, no data fetched) |
list_models |
📋 List all non-transient models available in the database |
get_model_fields |
🏗️ Inspect field definitions (type, required, help text, etc.) for any model |
read_group |
📊 Group records and compute aggregations (sum, avg, count) with date granularity |
save_binary_field |
💾 Save a binary/image field from a record directly to a local file |
✏️ Write Operations
| Tool | Description |
|---|---|
create_record |
➕ Create a new record in any model |
update_record |
📝 Update fields on an existing record |
delete_record |
🗑️ Delete a record by ID |
copy_record |
📋 Duplicate an existing record with optional field overrides |
execute_method |
⚙️ Call any business method (e.g. action_confirm, button_validate, action_post) |
🚫 Write tools are disabled when
READONLY_MODE=true.
✨ Features
🧠 Smart Field Selection
When you don't specify which fields to fetch, the server automatically picks the most
useful ones. It scores fields based on type, importance patterns (state, amount,
partner, etc.), and excludes noisy fields like message_ids, binary blobs, and
computed non-stored fields. You always get id, name, display_name, and active.
Pass fields=["__all__"] to override and get everything.
🔄 Flexible Domain Parsing
Domains can be passed as JSON strings, Python repr strings, or native lists:
# All of these work:
[["is_company", "=", true]]
'[["is_company", "=", true]]'
"[('is_company', '=', True)]"
📅 ISO 8601 Dates
Odoo's "2025-06-07 21:55:52" datetime strings are automatically converted to
"2025-06-07T21:55:52+00:00" for standard ISO 8601 output.
💡 Tool Usage Examples
🔍 Search for Turkish companies:
search_records("res.partner", [["is_company", "=", true], ["country_id.code", "=", "TR"]], limit=20)
🔢 Count open sale orders:
get_record_count("sale.order", [["state", "=", "sale"]])
📄 Read a specific product with all fields:
read_record("product.product", 42, fields=["__all__"])
✅ Confirm a sale order:
execute_method("sale.order", "action_confirm", [42])
📦 Validate a stock picking:
execute_method("stock.picking", "button_validate", [15])
💰 Post an invoice:
execute_method("account.move", "action_post", [100])
📋 Duplicate a sale order with a different partner:
copy_record("sale.order", 10, default={"partner_id": 99})
💾 Save a product image to disk:
save_binary_field("product.product", 42, "image_1920", "/tmp/product_image.png")
📊 Total sales by partner:
read_group("sale.order", "partner_id", domain=[["state", "=", "sale"]], fields=["amount_total:sum"])
📅 Monthly order counts:
read_group("sale.order", "date_order:month", fields=["id:count"])
📈 Average price by category:
read_group("product.template", "categ_id", fields=["list_price:avg"])
🏗️ Discover fields on a model:
get_model_fields("sale.order", attributes=["string", "type", "required"])
⚙️ Configuration
All configuration is done through environment variables:
| Variable | Required | Default | Description |
|---|---|---|---|
ODOO_URL |
✅ | Odoo server URL (e.g. http://localhost:8069) |
|
ODOO_DB |
✅ | Database name | |
ODOO_USER |
✅ | Username | |
ODOO_PASSWORD |
✅ | Password or API key | |
READONLY_MODE |
false |
Set to true to disable all write operations |
|
ODOO_MCP_LOG_LEVEL |
INFO |
Log level (DEBUG, INFO, WARNING, ERROR) |
|
ODOO_MCP_LOG_FILE |
stderr | Path to log file | |
ODOO_MCP_DEFAULT_LIMIT |
10 |
Default record limit for search operations |
Alternatively, create a .env file in the project root.
📋 Requirements
- 🐍 Python >= 3.10
- 📦 uv (recommended) or pip
- 🏢 Access to an Odoo instance (12.0+) with XML-RPC enabled
📜 License
AGPL-3.0-or-later
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。