Odoo MCP Server
An enterprise-grade MCP server for interacting with Odoo ERP through AI assistants, enabling guided workflows, native BI, and deep introspection.
README
Odoo MCP Server — Agentic Edition
An enterprise-grade Model Context Protocol (MCP) server for interacting with Odoo ERP through AI assistants. Unlike a traditional database connector, this server is designed as an agentic bridge: it teaches the AI how to navigate Odoo, understand its business logic, and perform complex data analysis.
Why Agentic Edition?
- Guided Workflows (Prompts) — Native instructions that teach your AI how to audit inventory, analyse sales, or review security permissions step by step, without writing prompts from scratch.
- Native BI — Optimised support for
read_groupand advanced analytical operations, allowing the AI to generate financial reports or KPIs instantly. - Deep Introspection — Tools that grant the AI X-ray vision: discover available action buttons, inspect view XML architectures, evaluate security rules — reducing hallucinations to a minimum.
- Zero extra dependencies — Uses only Python stdlib (
urllib,json,csv,xml) plus themcppackage. Norequests, noodoorpc. - Built-in Security — Uses Odoo's own XML-RPC layer; the MCP server cannot bypass permissions the user doesn't already have.
Installation
# Recommended — isolated and fast
uv tool install odoo-mcp-server-conn
# Standard
pip install odoo-mcp-server-conn
Configuration
Environment variables
| Variable | Required | Description |
|---|---|---|
ODOO_URL |
✅ | Your Odoo URL (e.g. http://localhost:8069) |
ODOO_DB |
✅ | Database name |
ODOO_USERNAME |
✅ | User login or email |
ODOO_PASSWORD |
✅ | Password or API Key (strongly recommended) |
MCP_AUTH_CACHE_TTL |
❌ | Seconds before re-authenticating (default: 300) |
Tip: Always prefer an API Key over a plain password. Generate one in Odoo under Settings → Users → Your User → API Keys.
Claude Code (CLI)
Run this command once — it stores the configuration permanently for the current project:
claude mcp add odoo-server \
--env ODOO_URL=http://localhost:8069 \
--env ODOO_DB=my_database \
--env ODOO_USERNAME=admin \
--env ODOO_PASSWORD=my_api_key \
-- odoo-mcp-server-conn
Verify the connection inside Claude Code:
/mcp
<details> <summary>Project-scoped config — share with your team via <code>.mcp.json</code></summary>
Add --scope project to create a .mcp.json at the repository root that your whole team can use. Each developer supplies their own credentials via environment variables or CI secrets.
claude mcp add odoo-server \
--scope project \
--env ODOO_URL=http://localhost:8069 \
--env ODOO_DB=my_database \
--env ODOO_USERNAME=admin \
--env ODOO_PASSWORD=my_api_key \
-- odoo-mcp-server-conn
</details>
Claude Desktop
Locate your config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the following block:
{
"mcpServers": {
"odoo-server": {
"command": "odoo-mcp-server-conn",
"env": {
"ODOO_URL": "http://localhost:8069",
"ODOO_DB": "my_database",
"ODOO_USERNAME": "admin",
"ODOO_PASSWORD": "my_api_key"
}
}
}
}
VS Code (Copilot / Cline / Roo Code)
Add to your .vscode/mcp.json (workspace-level) or user MCP settings:
{
"servers": {
"odoo-server": {
"type": "stdio",
"command": "odoo-mcp-server-conn",
"env": {
"ODOO_URL": "http://localhost:8069",
"ODOO_DB": "my_database",
"ODOO_USERNAME": "admin",
"ODOO_PASSWORD": "my_api_key"
}
}
}
}
<details> <summary>Cline / Roo Code — <code>cline_mcp_settings.json</code></summary>
{
"mcpServers": {
"odoo-server": {
"command": "odoo-mcp-server-conn",
"env": {
"ODOO_URL": "http://localhost:8069",
"ODOO_DB": "my_database",
"ODOO_USERNAME": "admin",
"ODOO_PASSWORD": "my_api_key"
}
}
}
}
</details>
Cursor IDE
- Go to Settings → Features → MCP.
- Click Add new server → type
command. - Command:
odoo-mcp-server-conn. - Add each environment variable in the Env vars section.
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"odoo-server": {
"command": "odoo-mcp-server-conn",
"env": {
"ODOO_URL": "http://localhost:8069",
"ODOO_DB": "my_database",
"ODOO_USERNAME": "admin",
"ODOO_PASSWORD": "my_api_key"
}
}
}
}
Tools
CRUD — Core operations
| Tool | Odoo method | Description |
|---|---|---|
search_records |
search |
Return IDs matching a domain filter |
read_records |
read |
Read fields from records by ID |
search_read_records |
search_read |
Search + read in one optimised call |
create_record |
create |
Create a new record |
update_record |
write |
Update existing records |
delete_record |
unlink |
Delete records ⚠️ |
count_records |
search_count |
Count without loading records (fast) |
Introspection — understand the data model in real time
| Tool | Description |
|---|---|
get_model_fields |
Live schema of any model (types, relations, required flags) |
get_view_architecture |
Final merged XML of a view (form / tree / kanban / search) |
get_workflow_states |
States, stages, and transition buttons of a model |
get_action_buttons |
All buttons in a view with visibility conditions and groups |
get_related_records |
Auto-resolved Many2one / One2many / Many2many relations |
get_security_rules |
ACL and ir.rule records for a model |
explain_domain |
Translates an Odoo domain filter into plain English |
BI & Analytics
| Tool | Description |
|---|---|
read_group |
GROUP BY with sums, counts, averages. Supports :month / :year date grouping |
export_to_csv |
Export records to a CSV string (up to 1 000 rows) |
get_available_reports |
List PDF / HTML reports available for a model |
Wildcard
| Tool | Description |
|---|---|
execute_method |
Call any public Odoo method (e.g. action_confirm, button_validate) |
Guided Prompts (pre-trained workflows)
Invoke these prompts directly from your AI client to start a structured analysis:
| Prompt | What it does |
|---|---|
analyze_sales |
Sales KPIs — revenue trend, top customers, conversion rate |
diagnose_inventory |
Low-stock products, stuck transfers, warehouse utilisation |
audit_permissions |
Cross-reference security groups with ACL, flag over-privileged users |
financial_overview |
Cash flow overview — AR, AP, invoicing by period |
Resources (navigable URIs)
The AI can query these URIs directly as if browsing the ERP:
| URI | Description |
|---|---|
odoo://models |
Master list of all models installed in the instance |
odoo://fields/{model} |
Data dictionary for a specific model |
odoo://record/{model}/{id} |
Complete record sheet |
odoo://search/{model}/{domain} |
Instant search, e.g. odoo://search/res.partner/[["is_company","=",true]] |
Security
- The server operates entirely through Odoo's XML-RPC layer — it cannot bypass any permission the authenticated user doesn't already have in the ERP.
- No raw SQL, no forced commits, no ORM bypass.
- Credentials are read exclusively from environment variables — never hardcoded.
License: MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。