| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Community Apps Dependencies | Show |
| Lines of code | 2029 |
| Technical Name |
oql_mcp |
| License | LGPL-3 |
| Website | https://github.com/chrisking94/odoo_addons/tree/main/oql_mcp |
OQL MCP Integration
Expose OQL query capabilities to AI agents via Model Context Protocol (MCP). Enable natural language queries on Odoo data through Claude, ChatGPT, Cursor and other AI assistants.
Key Features
- @mcp_tool decorated methods - Expose search_reado and get_oql_hints to AI agents
- Natural language queries - AI can use OQL syntax like "Waterproof and Size = '40'"
- Seamless integration - Works with all MCP-compatible AI clients
- Business terminology - Use terms and aliases instead of technical field paths
Quick Example
AI asks: "Find waterproof Danner boots in size 40"
MCP Tool Call:
env['product.product'].search_reado(
where="CatgS = 'Boot' and Brand = 'Danner' and EuShoeSize = '40' and Waterproof",
fields=['name', 'default_code', 'list_price']
)
MCP Tool Call:
env['product.product'].search_reado(
where="CatgS = 'Boot' and Brand = 'Danner' and EuShoeSize = '40' and Waterproof",
fields=['name', 'default_code', 'list_price']
)
Requirements
- mcp_base - MCP framework for Odoo
- oql - OQL query engine
- Odoo 13.0 or higher
How It Works
The module extends base models with two MCP-enabled methods:
- search_reado - Search and read records using OQL where clause
- get_oql_hints - Get autocomplete suggestions for OQL queries
Usage Tips for AI Agents
- Use
get_oql_hintsto discover available fields and terms - Start with simple queries, then add complexity
- Leverage configured Terms for business-friendly queries
- Use Aliases to shorten field paths
Support
For issues or contributions, visit:
https://github.com/chrisking94/odoo_addons/tree/main/oql_mcp
Please log in to comment on this module