| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 1259 |
| Technical Name |
mcp_base |
| License | LGPL-3 |
| Website | https://github.com/chrisking94/odoo_addons/tree/main/mcp_base |
| Versions | 13.0 14.0 15.0 16.0 17.0 18.0 19.0 |
Odoo MCP Framework
Connect Odoo to AI Agents with One Decorator. Transform your Odoo into a Model Context Protocol (MCP) Server for seamless integration with Claude, ChatGPT, Cursor and other AI agents.
Simple. Elegant. Powerful.
@mcp_tool, AI Integration, MCP Server, Automation
The Simplest Way
@mcp_tool def search_customers(self, name: str): """Search customers by name.""" # That's it! No config, no schema - just decorate and go
Type hints → JSON Schema Docstring → Descriptions Zero configuration
Why @mcp_tool?
The simplest decorator to expose Odoo methods to AI agents. Just add it and go - no complex setup required.
One-Line Setup
Just @mcp_tool. Your methods are instantly AI-ready.
Zero Config
Automatic JSON schema from type hints. No manual work.
Smart Docs
Extracts parameter descriptions from docstrings automatically.
Production Ready
Streamable HTTP, JSON-RPC 2.0, enterprise-grade reliability.
Get Started in 3 Steps
Install Module
Download and install the mcp_base module to your Odoo instance:
-
Download from Odoo App Store
You'll receive a file namedmcp_base-x.x.x.zip -
Extract and Place in Addons Directory
Extract the zip file and copy themcp_basefolder to your Odoo addons path, for example:
/opt/odoo/addons/mcp_base(Linux) orC:\Program Files\Odoo 15.0\server\addons\mcp_base(Windows)
Can't find your addons path? Check your Odoo config file:
- Linux:/etc/odoo/odoo.conf(look foraddons_path)
- Windows:C:\Program Files\Odoo 15.0\server\odoo.conf -
Install via Odoo Interface
Enable Developer Mode by adding?debug=1to your URL (e.g.,http://localhost:8069/web?debug=1)
Then go to: Apps → Click Update Apps List (top menu) → Search "mcp_base" → Click Install
Decorate Your Methods
Add the @mcp_tool decorator to any Odoo model method you want to expose to AI agents:
from odoo import models from odoo.addons.mcp_base import mcp_tool class ResPartner(models.Model): _inherit = 'res.partner' @mcp_tool def search_customers(self, name: str, limit: int = 10): """Search customers by name. :param name: Customer name to search for :param limit: Maximum number of results """ return self.search_read([('name', 'ilike', name)], fields=['name', 'email'], limit=limit)
Connect AI Clients
Configure your AI client to connect to the MCP server endpoint:
Your MCP Endpoint:
http://your-odoo-server:8069/mcp
Authentication:
If you have auth_api_key module installed, add HTTP header below to your client configuration.
Api-Key: your-api-key-here
Popular AI Clients:
Settings → MCP → Add Server
Settings → MCP → Add Server
Edit config.json
You're All Set!
Your Odoo methods are now accessible to AI agents. Start asking natural language questions about your data!
Security & Authentication
Protect your Odoo data with proper authentication. We strongly recommend using API key authentication for production environments.
Important: If the auth_api_key module is not installed, the MCP server runs with administrator privileges. This is convenient for development but NOT recommended for production.
Production Setup (Strongly Recommended)
Create API Key
Settings Technical API Keys
Configure Client
Add Api-Key header to requests
For detailed API key configuration, please refer to the Auth Api Key module documentation
With auth_api_key Installed
API key required User-level permissions Production-ready Secure
Without auth_api_key
No authentication Admin privileges Development only Security risk
Secure Your MCP Server Today
Install auth_api_key and protect your Odoo data with enterprise-grade authentication.
Ready to Make Your Odoo AI-Ready?
Install Odoo MCP Framework and expose your first method with @mcp_tool in under 2 minutes.
Please log in to comment on this module