| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 3088 |
| Technical Name |
xf_mcp |
| License | OPL-1 |
| Website | https://odoo-addons.xfanis.dev/apps/modules/17.0/xf_mcp |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 3088 |
| Technical Name |
xf_mcp |
| License | OPL-1 |
| Website | https://odoo-addons.xfanis.dev/apps/modules/17.0/xf_mcp |
MCP Server for Odoo
Key Features:
- Native MCP protocol -Streamable HTTP transport, JSON-RPC 2.0, protocol version negotiation (2025-11-25 / 2024-11-05).
- Dual authentication -Bearer token (Odoo API key) and HTTP Basic auth (login / password). Brute-force protection with per-IP lockout.
- Full CRUD toolset -search, read, create, write, unlink, count, default_get, method_call, list_modules, list_companies -all configurable from the UI.
- MCP Resources -expose system info, model field schemas, per-model access info, module metadata, and individual record data as structured resources discoverable by the AI.
- Custom Prompts -admin-managed global prompts and user-created personal prompt templates with named argument substitution.
- Odoo-native ACL -the same access rights the user has in the browser are enforced for every MCP operation. No privilege escalation possible.
- Per-model MCP overrides -optional Access Control records let admins further restrict models: limit operations, filter fields, block methods, restrict groups.
- Full audit trail -every MCP request is logged with user, session, method, tool name, IP address, duration, and response status. Configurable retention.
- Session management -TTL-based MCP sessions with automatic expiry and manual termination via the DELETE endpoint.
- Rate limiting -per-user configurable request rate cap.
- IP filtering -allow-list or deny-list strategy with CIDR support.
- Timezone-aware datetimes -reads return values in the user's local timezone; writes accept local-timezone strings and convert to UTC automatically, mirroring browser behaviour.
How It Works
After installing the module, Odoo exposes a single MCP endpoint at /mcp.
Any MCP-compatible AI client (Claude Desktop, Cursor, VS Code with the MCP extension, etc.)
can connect using your Odoo URL, an API key or login credentials, and start interacting
with your ERP data through natural language.
The AI discovers available tools, resources, and prompts automatically through the MCP protocol's capability exchange. It can then search records, read field values, create or update data, call business methods -all subject to the same Odoo access rights as the authenticated user.
Compatible AI Clients and IDEs
The MCP Server for Odoo works out of the box with any tool that supports the Model Context Protocol. This includes desktop AI assistants, AI-powered code editors, browser extensions, and custom agent frameworks.
- Claude Desktop and Claude.ai - Connect Anthropic's Claude directly to your live Odoo data. Ask Claude to summarize sales pipelines, find overdue invoices, create new partners, or explain field relationships - all without leaving the chat interface.
- Cursor AI - Odoo developers using Cursor can connect the editor directly to a staging or production instance and have the AI read model definitions, search records, or validate business logic against real data while coding.
- VS Code with MCP extension / GitHub Copilot - Any VS Code AI extension that supports MCP tool calls can use this server to query Odoo models, retrieve field schemas, or run searches as part of an agentic workflow.
- Codex, Windsurf, Cline - AI coding agents like Codex, Windsurf and Cline can connect to Odoo to explore module structure, read configuration records, or automate repetitive ERP data tasks directly from the editor sidebar.
- Continue.dev and open-source MCP clients - Any open-source AI agent or MCP host that speaks Streamable HTTP or SSE transport is compatible.
- ChatGPT and OpenAI Codex - Connect ChatGPT (via OpenAI's MCP client support) or Codex-powered agents to Odoo for natural language ERP queries, record creation, and data retrieval workflows.
- Local AI models via LM Studio and Ollama - Run fully private, on-premise AI workflows by connecting LM Studio or Ollama (with an MCP-compatible agent layer) to Odoo. Your data never leaves your network.
- Custom AI agents and automation scripts - Build your own AI-powered Odoo automation using the MCP protocol with any LLM provider: OpenAI, Anthropic, Google Gemini, Mistral, or local models via Ollama and LM Studio.
Configurable Tools
All MCP tools are stored as Odoo records and can be reviewed, reordered, or extended
from the MCP → Configuration → Tools menu.
Each tool has a name, description, JSON Schema for its parameters, and maps to a
Python method on the mcp.tool model.
Each tool record stores the full JSON Schema used to describe parameters to the AI, the display title, description, category, and optional structured output schema.
MCP Resources
Resources provide structured, readable information to the AI without requiring a tool call. Manage them under MCP → Configuration → Resources. Built-in resources include system information, model field schemas, access metadata, module details, and dynamic record templates.
Custom Prompts
Prompt templates let admins define reusable instructions for the AI that users can invoke by name. Manage global prompts under MCP → Configuration → Global Prompts. Users can also create their own personal prompts from MCP → My Prompts.
Templates support named argument placeholders ({argument_name}) with required/optional
validation. The AI receives the rendered prompt as a structured message.
Per-Model Access Control
While Odoo's native ACL is always enforced as the primary security layer, the optional MCP Access Control records let administrators add an additional restriction layer per model: disable specific operations (read, write, create, delete, method calls), whitelist allowed fields, block specific methods, or restrict access to certain security groups.
Audit Trail
Every MCP request is recorded in the audit log -accessible under MCP → Monitoring → Audit Logs. Each entry captures the authenticated user, session ID, MCP method, tool or resource name, request data, response status, IP address, user agent, and processing duration.
Configuration & Settings
The MCP server is configured from Settings → General Settings → MCP Server. Options include enabling/disabling the server, setting the rate limit, session TTL, maximum records per response, audit log retention, allowed CORS origins, and IP filtering rules.
Use Cases
Odoo AI integration for developers. Connect Cursor, VS Code Copilot, or any MCP-compatible IDE to a live Odoo instance while building custom modules. Ask the AI to describe model field schemas, search for existing records to validate logic, or read configuration data - all without switching context from the editor.
Business intelligence and natural language queries. Let non-technical users ask plain-English questions about ERP data through Claude Desktop or a similar AI chat interface. "Show me all unpaid invoices from last month" or "Which sales orders are still in draft?" - the AI translates the request into Odoo domain queries and returns structured results.
AI agent automation for routine ERP tasks. Build agentic workflows that create records, update statuses, or process bulk operations using any MCP-compatible AI agent framework. The Odoo native ACL ensures the agent can only touch what the authenticated user is permitted to access.
Secure AI access for multi-company and multi-user Odoo setups. Each AI client authenticates with its own API key or credentials, inheriting exactly the same access rights as the corresponding Odoo user. Per-model MCP overrides let admins add extra restrictions on top of ACL without modifying security groups.
Private on-premise AI with local models. Run fully air-gapped AI workflows by pairing the MCP server with a local language model served via Ollama or LM Studio. Your Odoo data never leaves the network - the AI assistant runs on your own hardware while still accessing live ERP records through the MCP protocol. Ideal for organizations with strict data residency or confidentiality requirements.
Audit-ready AI usage in regulated environments. The full audit trail records every AI request - who asked, what was read or changed, from which IP address, and with what result. This makes the module suitable for organizations that need traceability of AI-driven ERP interactions.
Quick Start
- Install the MCP Server module.
- Generate an API key for your user: Settings → My Profile → API Keys → New.
-
Add your Odoo instance to your MCP client configuration:
- URL:
https://<your-odoo-host>/mcp - Authorization:
Bearer <your-api-key>
- URL:
- Ensure your user belongs to the MCP User or MCP Administrator security group.
- Start chatting -ask the AI to search records, summarise data, or update fields.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module