🐍 ☁️/🏠 - Connect to Odoo ERP for business data access, record management and workflow automation
MCP Server for Odoo
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
An MCP server that enables AI assistants like Claude to interact with Odoo ERP systems. Access business data, search records, create new entries, update existing data, and manage your Odoo instance through natural language.
**Works with any Odoo instance!** Use YOLO mode for quick testing and demos with any standard Odoo installation. For enterprise security, access controls, and production use, install the Odoo MCP module.
Features
- 🔍 **Search and retrieve** any Odoo record (customers, products, invoices, etc.)
- ✨ **Create new records** with field validation and permission checks
- ✏️ **Update existing data** with smart field handling
- 🗑️ **Delete records** respecting model-level permissions
- 🔢 **Count records** matching specific criteria
- 📋 **Inspect model fields** to understand data structure
- 📊 **Server-side aggregation** — group, sum, and count without pulling raw rows
- ⚡ **Workflow actions** — invoke public business methods (post invoice, confirm SO, etc.) via an opt-in escape hatch
- 📎 **Binary & attachment resources** — fetch images, documents, and ir.attachment files via resource URIs
- 👤 **Personalized session context** — the connected user, timezone, and company scope injected into the session instructions
- 🔐 **Secure access** with API key or username/password authentication
- 🎯 **Smart pagination** for large datasets
- 🧠 **Smart field selection** — automatically picks the most relevant fields per model
- 💬 **LLM-optimized output** with hierarchical text formatting
- 🌍 **Multi-language support** — get responses in your preferred language
- 🚀 **YOLO Mode** for quick access with any Odoo instance (no module required)
Installation
Prerequisites
- Python 3.10 or higher
- Access to an Odoo instance:
- **Standard mode** (production): Version 16.0+ with the Odoo MCP module installed
- **YOLO mode** (testing/demos): Any Odoo version with XML-RPC enabled (no module required)
Install UV First
The MCP server runs on your **local computer** (where Claude Desktop is installed), not on your Odoo server. You need to install UV on your local machine:
macOS/Linux
Windows
After installation, restart your terminal to ensure UV is in your PATH.
Installing via MCP Settings (Recommended)
Add this configuration to your MCP settings:
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Claude Code
Add to .mcp.json in your project root:
Or use the CLI:
Cursor
Add to ~/.cursor/mcp.json:
VS Code (with GitHub Copilot)
Add to .vscode/mcp.json in your workspace:
> **Note:** VS Code uses "servers" as the root key, not "mcpServers".
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
Zed
Add to ~/.config/zed/settings.json:
Alternative Installation Methods
Using Docker
Run with Docker — no Python installation required:
> **Note:** Use host.docker.internal instead of localhost to connect to Odoo running on the host machine.
For HTTP transport:
> ⚠️ **Security**: the HTTP transport has no built-in authentication — anyone who can reach the port gets Odoo access through the server's credentials. Publish the port only on trusted networks, or front it with an authenticating reverse proxy. See Transport Options.
The image is also available on GHCR: ghcr.io/ivnvxd/mcp-server-odoo
Using pip
Then use mcp-server-odoo as the command in your MCP configuration.
From source
Then use the full path to the package in your MCP configuration.
Configuration
Environment Variables
The server requires the following environment variables:
| Variable | Required | Description | Example |
|----------|----------|-------------|---------|
| ODOO_URL | Yes | Your Odoo instance URL | https://mycompany.odoo.com |
| ODOO_API_KEY | Yes* | API key for authentication | 0ef5b399e9ee9c11b053dfb6eeba8de473c29fcd |
| ODOO_USER | Yes* | Username (if not using API key) | admin |
| ODOO_PASSWORD | Yes* | Password (if not using API key) | admin |
| ODOO_DB | No | Database name (auto-detected if not set) | mycompany |
| ODOO_LOCALE | No | Language/locale for Odoo responses | es_ES, fr_FR, de_DE |
| ODOO_ALLOWED_COMPANIES | No | Comma-separated company IDs to scope all operations to (multi-company setups) | 1, 1,3 |
| ODOO_YOLO | No | YOLO mode - bypasses MCP security (⚠️ DEV ONLY) | off, read, true |
| ODOO_MCP_ENABLE_METHOD_CALLS | No | Enable the call_model_method tool — requires ODOO_YOLO=true (⚠️ Dangerous, see call_model_method) | false, true |
| ODOO_RPC_TRANSPORT | No | RPC protocol in YOLO mode: auto (JSON-2 on Odoo 19 and later with an API key, else XML-RPC), xmlrpc, or json2 for Odoo's JSON-2 API (Odoo 19 and later, API key only) | auto, json2 |